;;; asm-mode.el --- mode for editing assembler code
-;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1991, 2001-2011 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Maintainer: FSF
(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)
(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 ()
(provide 'asm-mode)
-;; arch-tag: 210e695f-f338-4376-8913-a4c5c72ac848
;;; asm-mode.el ends here