Mercurial > emacs
changeset 108589:b818f9578731
* progmodes/asm-mode.el (asm-mode): Use define-derived-mode.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 15 May 2010 00:10:22 -0400 |
parents | 7c03bbe03019 |
children | c84578d13e42 |
files | lisp/ChangeLog lisp/progmodes/asm-mode.el |
diffstat | 2 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat May 15 00:08:03 2010 -0400 +++ b/lisp/ChangeLog Sat May 15 00:10:22 2010 -0400 @@ -1,5 +1,6 @@ 2010-05-15 Stefan Monnier <monnier@iro.umontreal.ca> + * progmodes/asm-mode.el (asm-mode): * progmodes/prolog.el (prolog-mode): Use define-derived-mode. * pcomplete.el (pcomplete-completions-at-point): New function,
--- a/lisp/progmodes/asm-mode.el Sat May 15 00:08:03 2010 -0400 +++ b/lisp/progmodes/asm-mode.el Sat May 15 00:10:22 2010 -0400 @@ -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 @@ 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 @@ (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."