From: Stefan Kangas Date: Tue, 14 Dec 2021 19:19:32 +0000 (+0100) Subject: Prefer command remapping in allout.el X-Git-Tag: emacs-29.0.90~3593^2~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75eac285af405ccd8f2cba89b1047992984a7b7d;p=emacs.git Prefer command remapping in allout.el * lisp/allout.el (allout-compose-and-institute-keymap): Use command remapping instead of substitute-key-definition. --- diff --git a/lisp/allout.el b/lisp/allout.el index 174184fc7ad..f684751a2a4 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -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)