]> git.eshelyaron.com Git - emacs.git/commitdiff
(asm-mode): Set comment-start properly from asm-comment-char.
authorRichard M. Stallman <rms@gnu.org>
Thu, 2 Sep 1999 04:48:09 +0000 (04:48 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 2 Sep 1999 04:48:09 +0000 (04:48 +0000)
(asm-font-lock-keywords): Recognize instruction width suffixes.

lisp/progmodes/asm-mode.el

index 7a2d74343fa575251c46c0e5f86cb08d9bedb5fa..490b34f4b55ddd09698a81f710febb9b46debfaf 100644 (file)
@@ -80,9 +80,9 @@
   )
 
 (defconst asm-font-lock-keywords
- '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\)?"
+ '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.[lLwWbBsS]\\)?\\)?"
     (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
-   ("^\\s +\\(\\(\\sw\\|\\s_\\)+\\)" 1 font-lock-keyword-face))
+   ("^\\s +\\(\\(\\sw\\|\\s_\\)+\\(\\.[lLwWbBsS]\\)?\\)" 1 font-lock-keyword-face))
  "Additional expressions to highlight in Assembler mode.")
 
 (defvar asm-code-level-empty-comment-pattern nil)
@@ -133,7 +133,7 @@ Special commands:
                         ">" asm-mode-syntax-table)
   (let ((cs (regexp-quote (char-to-string asm-comment-char))))
     (make-local-variable 'comment-start)
-    (setq comment-start (concat cs " "))
+    (setq comment-start (concat (char-to-string asm-comment-char) " "))
     (make-local-variable 'comment-start-skip)
     (setq comment-start-skip (concat cs "+[ \t]*"))
     (setq asm-inline-empty-comment-pattern (concat "^.+" cs "+ *$"))