chiark / gitweb /
emacs, dot-emacs: Support for assembler programming.
[profile] / dot-emacs.el
index 478043581174174dce06c2a1c098f56dcc1b04f4..09c1415119ebf751256beb43c50b884c56a1a82d 100644 (file)
@@ -489,11 +489,14 @@ (defun mdw-misc-mode-config ()
   (and mdw-auto-indent
        (cond ((eq major-mode 'lisp-mode)
              (local-set-key "\C-m" 'mdw-indent-newline-and-indent))
-            ((eq major-mode 'slime-repl-mode) nil)
+            ((or (eq major-mode 'slime-repl-mode)
+                 (eq major-mode 'asm-mode))
+             nil)
             (t
              (local-set-key "\C-m" 'newline-and-indent))))
   (local-set-key [C-return] 'newline)
-  (local-set-key [?\;] 'self-insert-command)
+  (or (eq major-mode 'asm-mode)
+      (local-set-key [?\;] 'self-insert-command))
   (local-set-key [?\#] 'self-insert-command)
   (local-set-key [?\"] 'self-insert-command)
   (setq comment-column 40)
@@ -1298,6 +1301,14 @@ (defun arm-assembler-mode ()
 
   (run-hooks 'arm-assembler-mode-hook))
 
+;;;----- Assembler mode -----------------------------------------------------
+
+(defun mdw-fontify-asm ()
+  (modify-syntax-entry ?' "\"")
+  (modify-syntax-entry ?. "w")
+  (setf fill-prefix nil)
+  (mdw-standard-fill-prefix "\\([ \t]*;+[ \t]*\\)"))
+
 ;;;----- TCL configuration --------------------------------------------------
 
 (defun mdw-fontify-tcl ()