Merge branch 'maint'

This commit is contained in:
Bastien 2021-05-01 22:26:06 +02:00
commit f84033b088
1 changed files with 12 additions and 0 deletions

View File

@ -4918,6 +4918,18 @@ The following commands are available:
(when org-startup-numerated (require 'org-num) (org-num-mode 1))
(when org-startup-indented (require 'org-indent) (org-indent-mode 1))))
;; Add a custom keymap for `visual-line-mode' so that activating
;; this minor mode does not override Org's keybindings.
;; FIXME: Probably `visual-line-mode' should take care of this.
(let ((oldmap (cdr (assoc 'visual-line-mode minor-mode-map-alist)))
(newmap (make-sparse-keymap)))
(set-keymap-parent newmap oldmap)
(define-key newmap [remap move-beginning-of-line] nil)
(define-key newmap [remap move-end-of-line] nil)
(define-key newmap [remap kill-line] nil)
(make-local-variable 'minor-mode-overriding-map-alist)
(push `(visual-line-mode . ,newmap) minor-mode-overriding-map-alist))
;; Activate `org-table-header-line-mode'
(when org-table-header-line-p
(org-table-header-line-mode 1))