summaryrefslogtreecommitdiff
path: root/lisp/progmodes/asm-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/asm-mode.el')
-rw-r--r--lisp/progmodes/asm-mode.el30
1 files changed, 14 insertions, 16 deletions
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index 370fb1b80b4..aaf063b5174 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -24,16 +24,16 @@
;;; Commentary:
;; This mode was written by Eric S. Raymond <esr@snark.thyrsus.com>,
-;; inspired by an earlier asm-mode by Martin Neitzel.
+;; inspired by an earlier `asm-mode' by Martin Neitzel.
-;; This major mode is based on prog mode. It defines a private abbrev table
-;; that can be used to save abbrevs for assembler mnemonics. It binds just
-;; five keys:
+;; This major mode is based on `prog-mode'. It defines a private
+;; abbrev table that can be used to save abbrevs for assembler
+;; mnemonics. It binds just five keys:
;;
;; TAB tab to next tab stop
;; : outdent preceding label, tab to tab stop
;; comment char place or move comment
-;; asm-comment-char specifies which character this is;
+;; `asm-comment-char' specifies which character this is;
;; you can use a different character in different
;; Asm mode buffers.
;; C-j, C-m newline and tab to tab stop
@@ -41,9 +41,9 @@
;; Code is indented to the first tab stop level.
;; This mode runs two hooks:
-;; 1) An asm-mode-set-comment-hook before the part of the initialization
-;; depending on asm-comment-char, and
-;; 2) an asm-mode-hook at the end of initialization.
+;; 1) `asm-mode-set-comment-hook' before the part of the initialization
+;; depending on `asm-comment-char', and
+;; 2) `asm-mode-hook' at the end of initialization.
;;; Code:
@@ -68,13 +68,11 @@
"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."
@@ -130,7 +128,7 @@ Special commands:
(setq-local tab-always-indent nil)
(run-hooks 'asm-mode-set-comment-hook)
- ;; Make our own local child of asm-mode-map
+ ;; Make our own local child of `asm-mode-map'
;; so we can define our own comment character.
(use-local-map (nconc (make-sparse-keymap) asm-mode-map))
(local-set-key (vector asm-comment-char) #'asm-comment)