]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer command remapping in allout.el
authorStefan Kangas <stefan@marxist.se>
Tue, 14 Dec 2021 19:19:32 +0000 (20:19 +0100)
committerStefan Kangas <stefan@marxist.se>
Tue, 14 Dec 2021 19:19:32 +0000 (20:19 +0100)
* lisp/allout.el (allout-compose-and-institute-keymap): Use command
remapping instead of substitute-key-definition.

lisp/allout.el

index 174184fc7adea6adc953f369e36f99d8675c3160..f684751a2a402f3ddc36efa78f69200f600e697f 100644 (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)