"Abbrev table used while in Asm mode.")
(define-abbrev-table 'asm-mode-abbrev-table ())
-(defvar asm-mode-map
- (let ((map (make-sparse-keymap)))
- ;; Note that the comment character isn't set up until asm-mode is called.
- (define-key map ":" 'asm-colon)
- (define-key map "\C-c;" 'comment-region)
- map)
- "Keymap for Asm mode.")
+(defvar-keymap asm-mode-map
+ :doc "Keymap for Asm mode."
+ ;; Note that the comment character isn't set up until asm-mode is called.
+ ":" #'asm-colon
+ "C-c ;" #'comment-region)
(easy-menu-define asm-mode-menu asm-mode-map
"Menu for Asm mode."
;; Somewhat arbitrary, by analogy with eg goto-address.
:group 'comm)
-(defvar bug-reference-map
- (let ((map (make-sparse-keymap)))
- (define-key map [mouse-2] 'bug-reference-push-button)
- (define-key map (kbd "C-c RET") 'bug-reference-push-button)
- map)
- "Keymap used by bug reference buttons.")
+(defvar-keymap bug-reference-map
+ :doc "Keymap used by bug reference buttons."
+ "<mouse-2>" #'bug-reference-push-button
+ "C-c RET" #'bug-reference-push-button)
;; E.g., "https://gcc.gnu.org/PR%s"
(defvar bug-reference-url-format nil
"Face used for displaying specification test start markers."
:group 'erts-mode)
-(defvar erts-mode-map
- (let ((map (make-keymap)))
- (set-keymap-parent map prog-mode-map)
- (define-key map "\C-c\C-r" 'erts-tag-region)
- (define-key map "\C-c\C-c" 'erts-run-test)
- map))
+(defvar-keymap erts-mode-map
+ :parent prog-mode-map
+ "C-c C-r" #'erts-tag-region
+ "C-c C-c" #'erts-run-test)
(defvar erts-mode-font-lock-keywords
;; Specifications.
(flymake--run-backend backend backend-args)))
nil))))))))
-(defvar flymake-mode-map
- (let ((map (make-sparse-keymap))) map)
- "Keymap for `flymake-mode'.")
+(defvar-keymap flymake-mode-map
+ :doc "Keymap for `flymake-mode'.")
;;;###autoload
(define-minor-mode flymake-mode
(defvar-local flymake--diagnostics-buffer-source nil)
-(defvar flymake-diagnostics-buffer-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map (kbd "RET") 'flymake-goto-diagnostic)
- (define-key map (kbd "SPC") 'flymake-show-diagnostic)
- map))
+(defvar-keymap flymake-diagnostics-buffer-mode-map
+ "RET" #'flymake-goto-diagnostic
+ "SPC" #'flymake-show-diagnostic)
(defun flymake-show-diagnostic (pos &optional other-window)
"Show location of diagnostic at POS."
"Abbrev table in use in Icon-mode buffers.")
(define-abbrev-table 'icon-mode-abbrev-table ())
-(defvar icon-mode-map
- (let ((map (make-sparse-keymap "Icon")))
- (define-key map "{" 'electric-icon-brace)
- (define-key map "}" 'electric-icon-brace)
- (define-key map "\e\C-h" 'mark-icon-function)
- (define-key map "\e\C-a" 'beginning-of-icon-defun)
- (define-key map "\e\C-e" 'end-of-icon-defun)
- (define-key map "\e\C-q" 'indent-icon-exp)
- (define-key map "\177" 'backward-delete-char-untabify)
- map)
- "Keymap used in Icon mode.")
+(defvar-keymap icon-mode-map
+ :doc "Keymap used in Icon mode."
+ :name "Icon"
+ "{" #'electric-icon-brace
+ "}" #'electric-icon-brace
+ "C-M-h" #'mark-icon-function
+ "C-M-a" #'beginning-of-icon-defun
+ "C-M-e" #'end-of-icon-defun
+ "C-M-q" #'indent-icon-exp
+ "DEL" #'backward-delete-char-untabify)
(easy-menu-define icon-mode-menu icon-mode-map
"Menu for Icon mode."
:type 'integer
:safe 'integerp)
-;;; KeyMap
+;;; Keymap
-(defvar js-mode-map
- (let ((keymap (make-sparse-keymap)))
- (define-key keymap [(meta ?.)] #'js-find-symbol)
- keymap)
- "Keymap for `js-mode'.")
+(defvar-keymap js-mode-map
+ :doc "Keymap for `js-mode'."
+ "M-." #'js-find-symbol)
;;; Syntax table and parsing
("#" (0 (when (m4--quoted-p (match-beginning 0))
(string-to-syntax "."))))))
-(defvar m4-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-c\C-b" 'm4-m4-buffer)
- (define-key map "\C-c\C-r" 'm4-m4-region)
- (define-key map "\C-c\C-c" 'comment-region)
- map)
- "Keymap for M4 Mode.")
+(defvar-keymap m4-mode-map
+ :doc "Keymap for M4 Mode."
+ "C-c C-b" #'m4-m4-buffer
+ "C-c C-r" #'m4-m4-region
+ "C-c C-c" #'comment-region)
(easy-menu-define m4-mode-menu m4-mode-map
"Menu for M4 Mode."
;;; Code:
(defvar compile-command)
-;;; Key map
-(defvar mixal-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-c\C-c" 'compile)
- (define-key map "\C-c\C-r" 'mixal-run)
- (define-key map "\C-c\C-d" 'mixal-debug)
- (define-key map "\C-h\C-o" 'mixal-describe-operation-code)
- map)
- "Keymap for `mixal-mode'.")
-;; (makunbound 'mixal-mode-map)
+;;; Keymap
+(defvar-keymap mixal-mode-map
+ :doc "Keymap for `mixal-mode'."
+ "C-c C-c" #'compile
+ "C-c C-r" #'mixal-run
+ "C-c C-d" #'mixal-debug
+ "C-h C-o" #'mixal-describe-operation-code)
;;; Syntax table
(defvar mixal-mode-syntax-table
;;; scheme.el --- Scheme (and DSSSL) editing mode -*- lexical-binding: t; -*-
-;; Copyright (C) 1986-1988, 1997-1998, 2001-2022 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1986-2022 Free Software Foundation, Inc.
;; Author: Bill Rozas <jinx@martigny.ai.mit.edu>
;; Adapted-by: Dave Love <d.love@dl.ac.uk>
(defvar scheme-mode-line-process "")
-(defvar scheme-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map lisp-mode-shared-map)
- map)
- "Keymap for Scheme mode.
-All commands in `lisp-mode-shared-map' are inherited by this map.")
+(defvar-keymap scheme-mode-map
+ :doc "Keymap for Scheme mode.
+All commands in `lisp-mode-shared-map' are inherited by this map."
+ :parent lisp-mode-shared-map)
(easy-menu-define scheme-mode-menu scheme-mode-map
"Menu for Scheme mode."