]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer defvar-keymap in perl-mode.el
authorStefan Kangas <stefankangas@gmail.com>
Fri, 13 Dec 2024 03:48:33 +0000 (04:48 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 15 Dec 2024 16:37:11 +0000 (17:37 +0100)
* lisp/progmodes/perl-mode.el (perl-mode-map): Convert to
defvar-keymap.

(cherry picked from commit 4bdadbdc215aacdc474b33426bf8eb1a1bd54e1f)

lisp/progmodes/perl-mode.el

index a182e3038800cbd94d5307d0c5dbd8a566adcc9c..8490fddebd2edba203cb2f840443c469aae25ef6 100644 (file)
   "Abbrev table in use in `perl-mode' buffers.")
 (define-abbrev-table 'perl-mode-abbrev-table ())
 
-(defvar perl-mode-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map "\e\C-a" 'perl-beginning-of-function)
-    (define-key map "\e\C-e" 'perl-end-of-function)
-    (define-key map "\e\C-h" 'perl-mark-function)
-    (define-key map "\e\C-q" 'perl-indent-exp)
-    (define-key map "\177" 'backward-delete-char-untabify)
-    map)
-  "Keymap used in Perl mode.")
+(defvar-keymap perl-mode-map
+  :doc "Keymap used in Perl mode."
+  "C-M-a" #'perl-beginning-of-function
+  "C-M-e" #'perl-end-of-function
+  "C-M-h" #'perl-mark-function
+  "C-M-q" #'perl-indent-exp
+  "DEL"   #'backward-delete-char-untabify)
 
 (defvar perl-mode-syntax-table
   (let ((st (make-syntax-table (standard-syntax-table))))