From b86ab359725fcab09215512709d2b3b06bea9bd8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 14 Dec 2021 04:41:45 +0100 Subject: [PATCH] Prefer command remapping in cperl-mode.el * lisp/progmodes/cperl-mode.el (cperl-mode-map): Use command remapping instead of substitute-key-definition. --- lisp/progmodes/cperl-mode.el | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index a23505a9d3b..fe9612a09a9 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1019,15 +1019,9 @@ Unless KEEP, removes the old indentation." (define-key map [(control ?c) (control ?h) ?v] ;;(concat (char-to-string help-char) "v") ; does not work 'cperl-get-help)) - (substitute-key-definition - 'indent-sexp 'cperl-indent-exp - map global-map) - (substitute-key-definition - 'indent-region 'cperl-indent-region - map global-map) - (substitute-key-definition - 'indent-for-comment 'cperl-indent-for-comment - map global-map) + (define-key map [remap indent-sexp] #'cperl-indent-exp) + (define-key map [remap indent-region] #'cperl-indent-region) + (define-key map [remap indent-for-comment] #'cperl-indent-for-comment) map) "Keymap used in CPerl mode.") -- 2.39.5