From 8704165197d987bc91bce336a73d23fc45669fa3 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 14 Dec 2021 12:35:57 +0100 Subject: [PATCH] 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 5576ae35053..1fd1d66c360 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 807f5485d5f..f1e4414e93f 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'.") -- 2.39.5