diff options
Diffstat (limited to 'lisp/progmodes/asm-mode.el')
-rw-r--r-- | lisp/progmodes/asm-mode.el | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index f5fef76a009..12179e8f9b8 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -77,15 +77,14 @@ (define-key map "\C-c;" 'comment-region) (define-key map "\C-j" 'newline-and-indent) (define-key map "\C-m" 'newline-and-indent) - (define-key map [menu-bar] (make-sparse-keymap)) - (define-key map [menu-bar asm-mode] (cons "Asm" map)) - (define-key map [comment-region] + (define-key map [menu-bar asm-mode] (cons "Asm" (make-sparse-keymap))) + (define-key map [menu-bar asm-mode comment-region] '(menu-item "Comment Region" comment-region :help "Comment or uncomment each line in the region")) - (define-key map [newline-and-indent] + (define-key map [menu-bar asm-mode newline-and-indent] '(menu-item "Insert Newline and Indent" newline-and-indent :help "Insert a newline, then indent according to major mode")) - (define-key map [asm-colon] + (define-key map [menu-bar asm-mode asm-colon] '(menu-item "Insert Colon" asm-colon :help "Insert a colon; if it follows a label, delete the label's indentation")) map) @@ -142,16 +141,12 @@ Special commands: (set-syntax-table (make-syntax-table asm-mode-syntax-table)) (modify-syntax-entry asm-comment-char "< b") - (make-local-variable 'comment-start) - (setq comment-start (string asm-comment-char)) - (make-local-variable 'comment-add) - (setq comment-add 1) - (make-local-variable 'comment-start-skip) - (setq comment-start-skip "\\(?:\\s<+\\|/[/*]+\\)[ \t]*") - (make-local-variable 'comment-end-skip) - (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") - (make-local-variable 'comment-end) - (setq comment-end "") + (set (make-local-variable 'comment-start) (string asm-comment-char)) + (set (make-local-variable 'comment-add) 1) + (set (make-local-variable 'comment-start-skip) + "\\(?:\\s<+\\|/[/*]+\\)[ \t]*") + (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\\*+/\\)") + (set (make-local-variable 'comment-end) "") (setq fill-prefix "\t")) (defun asm-indent-line () |