summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cperl-mode.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-12-14 04:41:45 +0100
committerStefan Kangas <stefan@marxist.se>2021-12-14 12:27:54 +0100
commitb86ab359725fcab09215512709d2b3b06bea9bd8 (patch)
treea991123d55a856e0776dbbd962a5bfeb514b0626 /lisp/progmodes/cperl-mode.el
parent8c0f9be0d1ace6437d4c604b9af79b7b0006dec4 (diff)
downloademacs-b86ab359725fcab09215512709d2b3b06bea9bd8.tar.gz
Prefer command remapping in cperl-mode.el
* lisp/progmodes/cperl-mode.el (cperl-mode-map): Use command remapping instead of substitute-key-definition.
Diffstat (limited to 'lisp/progmodes/cperl-mode.el')
-rw-r--r--lisp/progmodes/cperl-mode.el12
1 files 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.")