1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

Prefer command remapping in allout.el

* lisp/allout.el (allout-compose-and-institute-keymap): Use command
remapping instead of substitute-key-definition.
This commit is contained in:
Stefan Kangas 2021-12-14 20:19:32 +01:00
parent 71ff4b97ab
commit 75eac285af

View File

@ -133,15 +133,10 @@ respective `allout-mode' keybinding variables, `allout-command-prefix',
(when (boundp 'allout-unprefixed-keybindings)
(dolist (entry allout-unprefixed-keybindings)
(define-key map (car (read-from-string (car entry))) (cadr entry))))
(substitute-key-definition #'beginning-of-line #'allout-beginning-of-line
map global-map)
(substitute-key-definition #'move-beginning-of-line
#'allout-beginning-of-line
map global-map)
(substitute-key-definition #'end-of-line #'allout-end-of-line
map global-map)
(substitute-key-definition #'move-end-of-line #'allout-end-of-line
map global-map)
(define-key map [remap beginning-of-line] #'allout-beginning-of-line)
(define-key map [remap move-beginning-of-line] #'allout-beginning-of-line)
(define-key map [remap end-of-line] #'allout-end-of-line)
(define-key map [remap move-end-of-line] #'allout-end-of-line)
(allout-institute-keymap map)))
;;;_ > allout-institute-keymap (map)
(defun allout-institute-keymap (map)