changeset 7847:43045a12cb34

(tex-font-lock-keywords): Make the pattern for macros respect TeX's idea of identifiers. (font-lock-set-defaults): Don't check for 'tex-mode, but instead for 'plain-tex-mode, 'latex-mode, and 'slitex-mode which is what tex-mode.el uses.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 Jun 1994 12:11:27 +0000
parents 46db50437ebb
children 163a9c1b5394
files lisp/font-lock.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/font-lock.el	Fri Jun 10 23:02:04 1994 +0000
+++ b/lisp/font-lock.el	Sat Jun 11 12:11:27 1994 +0000
@@ -634,7 +634,7 @@
 
 (defvar tex-font-lock-keywords
   (list
-   '("\\(\\\\\\w+\\)" 1 font-lock-keyword-face t)
+   '("\\(\\\\\\([a-zA-Z@]+\\|.\\)\\)" 1 font-lock-keyword-face t)
    '("{\\\\em\\([^}]+\\)}" 1 font-lock-comment-face t)
    '("{\\\\bf\\([^}]+\\)}" 1 font-lock-keyword-face t)
    '("^[ \t\n]*\\\\def[\\\\@]\\(\\w+\\)" 1 font-lock-function-name-face t)
@@ -707,7 +707,9 @@
 		  ((eq major-mode 'c++-c-mode)	    c-font-lock-keywords)
 		  ((eq major-mode 'c++-mode)	    c++-font-lock-keywords)
 		  ((eq major-mode 'perl-mode) 	    perl-font-lock-keywords)
-		  ((eq major-mode 'tex-mode)        tex-font-lock-keywords)
+		  ((eq major-mode 'plain-tex-mode)  tex-font-lock-keywords)
+		  ((eq major-mode 'latex-mode)      tex-font-lock-keywords)
+		  ((eq major-mode 'slitex-mode)     tex-font-lock-keywords)
 		  ((eq major-mode 'texinfo-mode)    texi-font-lock-keywords)
 		  ((eq major-mode 'shell-mode)      shell-font-lock-keywords)
 		  ((eq major-mode 'dired-mode)      dired-font-lock-keywords)