Make valign-mode opt-out in org-mode-hook (#14211)

* Make valign-mode opt-out in org-mode-hook

* Clean org-enable-valign documentation
This commit is contained in:
Claude 2020-12-19 07:01:31 +08:00 committed by GitHub
parent 0174002ebf
commit 1254095217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View File

@ -1240,6 +1240,8 @@ Other:
- Refactor layers/+chat|email|fun|readers|web-services packages to use
relative key binding, migrating most key bindings to lower cases and
expanding room for further aliases (thanks to John Stevenson)
- Added a =org-enable-valign= variable to make =valign-mode= opt-out
in org-mode-hook (thanks to Claude Ray)
- Fixed:
- Fixed ~h~ key binding in compilation and grep buffers
(thanks to Sylvain Benner)

View File

@ -0,0 +1,15 @@
;;; config.el --- spacemacs-org layer configuration file for Spacemacs.
;;
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Variables
(defvar org-enable-valign t
"If non-nil, enable valign-mode in org-mode buffers.")

View File

@ -80,7 +80,8 @@
(use-package valign
:init
(progn
(add-hook 'org-mode-hook 'valign-mode)
(when org-enable-valign
(add-hook 'org-mode-hook 'valign-mode))
(add-hook 'valign-mode-hook (lambda () (unless valign-mode
(valign-remove-advice)))))))