diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-05-15 00:10:22 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-05-15 00:10:22 -0400 |
commit | 7aefa4457f3017db6d6daee95841a2185c5113cd (patch) | |
tree | 8ec374486f8c065a450bf184453c912ca7ab4e85 /lisp/progmodes/asm-mode.el | |
parent | 13973643c9e26a06239a6da13cc72cbd4a5ec22a (diff) | |
download | emacs-7aefa4457f3017db6d6daee95841a2185c5113cd.tar.gz emacs-7aefa4457f3017db6d6daee95841a2185c5113cd.tar.bz2 emacs-7aefa4457f3017db6d6daee95841a2185c5113cd.zip |
* progmodes/asm-mode.el (asm-mode): Use define-derived-mode.
Diffstat (limited to 'lisp/progmodes/asm-mode.el')
-rw-r--r-- | lisp/progmodes/asm-mode.el | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 0ce7d780d1f..f5fef76a009 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -109,7 +109,7 @@ "Additional expressions to highlight in Assembler mode.") ;;;###autoload -(defun asm-mode () +(define-derived-mode asm-mode prog-mode "Assembler" "Major mode for editing typical assembler code. Features a private abbrev table and the following bindings: @@ -128,13 +128,8 @@ Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. Special commands: \\{asm-mode-map}" - (interactive) - (kill-all-local-variables) - (setq mode-name "Assembler") - (setq major-mode 'asm-mode) (setq local-abbrev-table asm-mode-abbrev-table) - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(asm-font-lock-keywords)) + (set (make-local-variable 'font-lock-defaults) '(asm-font-lock-keywords)) (set (make-local-variable 'indent-line-function) 'asm-indent-line) ;; Stay closer to the old TAB behavior (was tab-to-tab-stop). (set (make-local-variable 'tab-always-indent) nil) @@ -157,8 +152,7 @@ Special commands: (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") (make-local-variable 'comment-end) (setq comment-end "") - (setq fill-prefix "\t") - (run-mode-hooks 'asm-mode-hook)) + (setq fill-prefix "\t")) (defun asm-indent-line () "Auto-indent the current line." |