emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8704165 1/2: Remove Emacs 21 compat code for command-remapping


From: Stefan Kangas
Subject: master 8704165 1/2: Remove Emacs 21 compat code for command-remapping
Date: Tue, 14 Dec 2021 10:11:19 -0500 (EST)

branch: master
commit 8704165197d987bc91bce336a73d23fc45669fa3
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Remove Emacs 21 compat code for command-remapping
    
    * lisp/arc-mode.el (archive-mode-map):
    * lisp/obsolete/iswitchb.el (iswitchb-global-map): Remove Emacs 21
    compat code.
---
 lisp/arc-mode.el          | 8 ++------
 lisp/obsolete/iswitchb.el | 4 +---
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 5576ae3..1fd1d66 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -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)
 
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index 807f548..f1e4414 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -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'.")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]