aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSimon Marshall <[email protected]>1995-08-10 15:13:43 +0000
committerSimon Marshall <[email protected]>1995-08-10 15:13:43 +0000
commit32fad956742b98f51c080641995de86aaad1bc4f (patch)
tree2a2dc4da1ebd689a53f0a5aa48ecd90c84bb611d /lisp
parentd232ea9da09685f1a0d824779c9628769af1339d (diff)
Rewrite texinfo-font-lock-keywords; don't fontify syntactically.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/texinfo.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index b72b378b6f..ee215d28a7 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -207,16 +207,19 @@ chapter."
(defvar texinfo-font-lock-keywords
(list
- '("^\\(@c\\|@comment\\)[ \t].*" . font-lock-comment-face) ;comments
+ ;; All but the first 2 had an OVERRIDE of t.
+ ;; It didn't seem to be any better, and it's slower--simon.
+ '("^\\(@c\\|@comment\\)\\>.*" . font-lock-comment-face) ;comments
+ ;; Robert J. Chassell <[email protected]> says remove this line.
+ ;'("\\$\\([^$]*\\)\\$" 1 font-lock-string-face t)
"@\\(@\\|[^}\t \n{]+\\)" ;commands
- '("^\\(*.*\\)[\t ]*$" 1 font-lock-function-name-face t) ;menu items
- '("@\\(emph\\|strong\\|b\\|i\\){\\([^}]+\\)" 2 font-lock-comment-face t)
- '("@\\(file\\|kbd\\|key\\){\\([^}]+\\)" 2 font-lock-string-face t)
- '("@\\(samp\\|code\\|var\\){\\([^}]+\\)" 2 font-lock-function-name-face t)
- '("@\\(xref\\|pxref\\){\\([^}]+\\)" 2 font-lock-keyword-face t)
- '("@end *\\([a-zA-Z0-9]+\\)[ \t]*$" 1 font-lock-function-name-face t)
- '("@item \\(.*\\)$" 1 font-lock-function-name-face t)
- '("\\$\\([^$]*\\)\\$" 1 font-lock-string-face t)
+ '("^\\(*.*\\)[\t ]*$" 1 font-lock-function-name-face t) ;menu items
+ '("@\\(emph\\|strong\\|b\\|i\\){\\([^}]+\\)" 2 font-lock-comment-face)
+ '("@\\(file\\|kbd\\|key\\){\\([^}]+\\)" 2 font-lock-string-face)
+ '("@\\(samp\\|code\\|var\\|math\\){\\([^}]+\\)"
+ 2 font-lock-variable-name-face)
+ '("@\\(cite\\|xref\\|pxref\\){\\([^}]+\\)" 2 font-lock-reference-face)
+ '("@\\(end\\|item\\) *\\(.+\\)" 2 font-lock-function-name-face keep)
)
"Additional expressions to highlight in TeXinfo mode.")
@@ -396,7 +399,7 @@ value of texinfo-mode-hook."
(make-local-variable 'imenu-generic-expression)
(setq imenu-generic-expression texinfo-imenu-generic-expression)
(make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults '(texinfo-font-lock-keywords))
+ (setq font-lock-defaults '(texinfo-font-lock-keywords t))
(make-local-variable 'tex-start-of-header)
(setq tex-start-of-header "%**start")
(make-local-variable 'tex-end-of-header)