chiark / gitweb /
el/dot-emacs.el: Fix `asm-mode' comment highlighting.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 16 Oct 2018 18:45:01 +0000 (19:45 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 16 Oct 2018 18:45:01 +0000 (19:45 +0100)
I think this actually works with all three comment syntaxes now.  Go me.

el/dot-emacs.el

index ac20c56354611444819c51479471053fd58774c4..f0569e6758166ac48bbeada6c4e2ab3f813c5b04 100644 (file)
@@ -3007,13 +3007,17 @@ (defun mdw-fontify-asm ()
   (modify-syntax-entry ?. "w")
   (modify-syntax-entry ?\n ">")
   (setf fill-prefix nil)
+  (modify-syntax-entry ?. "_")
+  (modify-syntax-entry ?* ". 23")
+  (modify-syntax-entry ?/ ". 124b")
+  (modify-syntax-entry ?\n "> b")
   (local-set-key ";" 'self-insert-command)
   (mdw-standard-fill-prefix "\\([ \t]*;+[ \t]*\\)"))
 
 (defun mdw-asm-set-comment ()
   (modify-syntax-entry ?; "."
                       )
-  (modify-syntax-entry asm-comment-char "<b")
+  (modify-syntax-entry asm-comment-char "< b")
   (setq comment-start (string asm-comment-char ? )))
 (add-hook 'asm-mode-local-variables-hook 'mdw-asm-set-comment)
 (put 'asm-comment-char 'safe-local-variable 'characterp)