# HG changeset patch # User Richard M. Stallman # Date 781524422 0 # Node ID 297f0781c8aea12b971e3ce1186e149c2b021720 # Parent 798467725c8dca85c438ec1caa4c94fea8e812e6 (asm-font-lock-keywords): New variable. (asm-mode): Set font-lock-keywords locally. diff -r 798467725c8d -r 297f0781c8ae lisp/progmodes/asm-mode.el --- a/lisp/progmodes/asm-mode.el Fri Oct 07 10:05:49 1994 +0000 +++ b/lisp/progmodes/asm-mode.el Fri Oct 07 10:07:02 1994 +0000 @@ -72,6 +72,12 @@ (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 @@ (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)