1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Prefer command remapping in cperl-mode.el

* lisp/progmodes/cperl-mode.el (cperl-mode-map): Use command remapping
instead of substitute-key-definition.
This commit is contained in:
Stefan Kangas 2021-12-14 04:41:45 +01:00
parent 8c0f9be0d1
commit b86ab35972

View file

@ -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.")