[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b86ab35 1/2: Prefer command remapping in cperl-mode.el
From: |
Stefan Kangas |
Subject: |
master b86ab35 1/2: Prefer command remapping in cperl-mode.el |
Date: |
Tue, 14 Dec 2021 06:28:08 -0500 (EST) |
branch: master
commit b86ab359725fcab09215512709d2b3b06bea9bd8
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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 a23505a..fe9612a 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.")