]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove Emacs 21 compat code for command-remapping
authorStefan Kangas <stefan@marxist.se>
Tue, 14 Dec 2021 11:35:57 +0000 (12:35 +0100)
committerStefan Kangas <stefan@marxist.se>
Tue, 14 Dec 2021 15:10:54 +0000 (16:10 +0100)
* lisp/arc-mode.el (archive-mode-map):
* lisp/obsolete/iswitchb.el (iswitchb-global-map): Remove Emacs 21
compat code.

lisp/arc-mode.el
lisp/obsolete/iswitchb.el

index 5576ae3505394de1bc9b09352bbb19dc0b265d45..1fd1d66c3601f6e6a050e4c81e343441c371ae9f 100644 (file)
@@ -431,12 +431,8 @@ be added."
     ;; Let mouse-1 follow the link.
     (define-key map [follow-link] 'mouse-face)
 
-    (if (fboundp 'command-remapping)
-        (progn
-          (define-key map [remap advertised-undo] 'archive-undo)
-          (define-key map [remap undo] 'archive-undo))
-      (substitute-key-definition 'advertised-undo 'archive-undo map global-map)
-      (substitute-key-definition 'undo 'archive-undo map global-map))
+    (define-key map [remap advertised-undo] #'archive-undo)
+    (define-key map [remap undo] #'archive-undo)
 
     (define-key map [mouse-2] 'archive-extract)
 
index 807f5485d5fe3b4d50900c84158bec77ed91bf79..f1e4414e93f46613eb2a7347ec50d216e1759170 100644 (file)
@@ -467,9 +467,7 @@ interfere with other minibuffer usage.")
                  (switch-to-buffer-other-window . iswitchb-buffer-other-window)
                  (switch-to-buffer-other-frame . iswitchb-buffer-other-frame)
                  (display-buffer . iswitchb-display-buffer)))
-      (if (fboundp 'command-remapping)
-          (define-key map (vector 'remap (car b)) (cdr b))
-        (substitute-key-definition (car b) (cdr b) map global-map)))
+      (define-key map (vector 'remap (car b)) (cdr b)))
     map)
   "Global keymap for `iswitchb-mode'.")