]> git.eshelyaron.com Git - emacs.git/commitdiff
(asm-font-lock-keywords): New variable.
authorRichard M. Stallman <rms@gnu.org>
Fri, 7 Oct 1994 10:07:02 +0000 (10:07 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 7 Oct 1994 10:07:02 +0000 (10:07 +0000)
(asm-mode): Set font-lock-keywords locally.

lisp/progmodes/asm-mode.el

index 7362e739adec60003296a176db1d221faa05abd9..a825fd4eca458da8b85f7888d3175affc5db7a04 100644 (file)
   (define-key asm-mode-map "\C-m"      'asm-newline)
   )
 
+(defconst asm-font-lock-keywords
+ '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\)?"
+    (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
+   ("^\\s +\\(\\(\\sw\\|\\s_\\)+\\)" 1 font-lock-keyword-face))
+ "Additional expressions to highlight in Assembler mode.")
+
 (defvar asm-code-level-empty-comment-pattern nil)
 (defvar asm-flush-left-empty-comment-pattern nil)
 (defvar asm-inline-empty-comment-pattern nil)
@@ -103,6 +109,8 @@ Special commands:
   (setq mode-name "Assembler")
   (setq major-mode 'asm-mode)
   (setq local-abbrev-table asm-mode-abbrev-table)
+  (make-local-variable 'font-lock-keywords)
+  (setq font-lock-keywords asm-font-lock-keywords)
   (make-local-variable 'asm-mode-syntax-table)
   (setq asm-mode-syntax-table (make-syntax-table))
   (set-syntax-table asm-mode-syntax-table)