diff options
| author | Stefan Monnier | 2010-05-15 00:10:22 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-05-15 00:10:22 -0400 |
| commit | 7aefa4457f3017db6d6daee95841a2185c5113cd (patch) | |
| tree | 8ec374486f8c065a450bf184453c912ca7ab4e85 | |
| parent | 13973643c9e26a06239a6da13cc72cbd4a5ec22a (diff) | |
| download | emacs-7aefa4457f3017db6d6daee95841a2185c5113cd.tar.gz emacs-7aefa4457f3017db6d6daee95841a2185c5113cd.zip | |
* progmodes/asm-mode.el (asm-mode): Use define-derived-mode.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/progmodes/asm-mode.el | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 32785d928cc..047d0d640e6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | 2010-05-15 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-05-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/asm-mode.el (asm-mode): | ||
| 3 | * progmodes/prolog.el (prolog-mode): Use define-derived-mode. | 4 | * progmodes/prolog.el (prolog-mode): Use define-derived-mode. |
| 4 | 5 | ||
| 5 | * pcomplete.el (pcomplete-completions-at-point): New function, | 6 | * pcomplete.el (pcomplete-completions-at-point): New function, |
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 @@ | |||
| 109 | "Additional expressions to highlight in Assembler mode.") | 109 | "Additional expressions to highlight in Assembler mode.") |
| 110 | 110 | ||
| 111 | ;;;###autoload | 111 | ;;;###autoload |
| 112 | (defun asm-mode () | 112 | (define-derived-mode asm-mode prog-mode "Assembler" |
| 113 | "Major mode for editing typical assembler code. | 113 | "Major mode for editing typical assembler code. |
| 114 | Features a private abbrev table and the following bindings: | 114 | Features a private abbrev table and the following bindings: |
| 115 | 115 | ||
| @@ -128,13 +128,8 @@ Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. | |||
| 128 | 128 | ||
| 129 | Special commands: | 129 | Special commands: |
| 130 | \\{asm-mode-map}" | 130 | \\{asm-mode-map}" |
| 131 | (interactive) | ||
| 132 | (kill-all-local-variables) | ||
| 133 | (setq mode-name "Assembler") | ||
| 134 | (setq major-mode 'asm-mode) | ||
| 135 | (setq local-abbrev-table asm-mode-abbrev-table) | 131 | (setq local-abbrev-table asm-mode-abbrev-table) |
| 136 | (make-local-variable 'font-lock-defaults) | 132 | (set (make-local-variable 'font-lock-defaults) '(asm-font-lock-keywords)) |
| 137 | (setq font-lock-defaults '(asm-font-lock-keywords)) | ||
| 138 | (set (make-local-variable 'indent-line-function) 'asm-indent-line) | 133 | (set (make-local-variable 'indent-line-function) 'asm-indent-line) |
| 139 | ;; Stay closer to the old TAB behavior (was tab-to-tab-stop). | 134 | ;; Stay closer to the old TAB behavior (was tab-to-tab-stop). |
| 140 | (set (make-local-variable 'tab-always-indent) nil) | 135 | (set (make-local-variable 'tab-always-indent) nil) |
| @@ -157,8 +152,7 @@ Special commands: | |||
| 157 | (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") | 152 | (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") |
| 158 | (make-local-variable 'comment-end) | 153 | (make-local-variable 'comment-end) |
| 159 | (setq comment-end "") | 154 | (setq comment-end "") |
| 160 | (setq fill-prefix "\t") | 155 | (setq fill-prefix "\t")) |
| 161 | (run-mode-hooks 'asm-mode-hook)) | ||
| 162 | 156 | ||
| 163 | (defun asm-indent-line () | 157 | (defun asm-indent-line () |
| 164 | "Auto-indent the current line." | 158 | "Auto-indent the current line." |