aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marshall1995-08-10 15:13:43 +0000
committerSimon Marshall1995-08-10 15:13:43 +0000
commit32fad956742b98f51c080641995de86aaad1bc4f (patch)
tree2a2dc4da1ebd689a53f0a5aa48ecd90c84bb611d
parentd232ea9da09685f1a0d824779c9628769af1339d (diff)
downloademacs-32fad956742b98f51c080641995de86aaad1bc4f.tar.gz
emacs-32fad956742b98f51c080641995de86aaad1bc4f.zip
Rewrite texinfo-font-lock-keywords; don't fontify syntactically.
-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 b72b378b6fc..ee215d28a75 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -207,16 +207,19 @@ chapter."
207 207
208(defvar texinfo-font-lock-keywords 208(defvar texinfo-font-lock-keywords
209 (list 209 (list
210 '("^\\(@c\\|@comment\\)[ \t].*" . font-lock-comment-face) ;comments 210 ;; All but the first 2 had an OVERRIDE of t.
211 ;; It didn't seem to be any better, and it's slower--simon.
212 '("^\\(@c\\|@comment\\)\\>.*" . font-lock-comment-face) ;comments
213 ;; Robert J. Chassell <bob@gnu.ai.mit.edu> says remove this line.
214 ;'("\\$\\([^$]*\\)\\$" 1 font-lock-string-face t)
211 "@\\(@\\|[^}\t \n{]+\\)" ;commands 215 "@\\(@\\|[^}\t \n{]+\\)" ;commands
212 '("^\\(*.*\\)[\t ]*$" 1 font-lock-function-name-face t) ;menu items 216 '("^\\(*.*\\)[\t ]*$" 1 font-lock-function-name-face t) ;menu items
213 '("@\\(emph\\|strong\\|b\\|i\\){\\([^}]+\\)" 2 font-lock-comment-face t) 217 '("@\\(emph\\|strong\\|b\\|i\\){\\([^}]+\\)" 2 font-lock-comment-face)
214 '("@\\(file\\|kbd\\|key\\){\\([^}]+\\)" 2 font-lock-string-face t) 218 '("@\\(file\\|kbd\\|key\\){\\([^}]+\\)" 2 font-lock-string-face)
215 '("@\\(samp\\|code\\|var\\){\\([^}]+\\)" 2 font-lock-function-name-face t) 219 '("@\\(samp\\|code\\|var\\|math\\){\\([^}]+\\)"
216 '("@\\(xref\\|pxref\\){\\([^}]+\\)" 2 font-lock-keyword-face t) 220 2 font-lock-variable-name-face)
217 '("@end *\\([a-zA-Z0-9]+\\)[ \t]*$" 1 font-lock-function-name-face t) 221 '("@\\(cite\\|xref\\|pxref\\){\\([^}]+\\)" 2 font-lock-reference-face)
218 '("@item \\(.*\\)$" 1 font-lock-function-name-face t) 222 '("@\\(end\\|item\\) *\\(.+\\)" 2 font-lock-function-name-face keep)
219 '("\\$\\([^$]*\\)\\$" 1 font-lock-string-face t)
220 ) 223 )
221 "Additional expressions to highlight in TeXinfo mode.") 224 "Additional expressions to highlight in TeXinfo mode.")
222 225
@@ -396,7 +399,7 @@ value of texinfo-mode-hook."
396 (make-local-variable 'imenu-generic-expression) 399 (make-local-variable 'imenu-generic-expression)
397 (setq imenu-generic-expression texinfo-imenu-generic-expression) 400 (setq imenu-generic-expression texinfo-imenu-generic-expression)
398 (make-local-variable 'font-lock-defaults) 401 (make-local-variable 'font-lock-defaults)
399 (setq font-lock-defaults '(texinfo-font-lock-keywords)) 402 (setq font-lock-defaults '(texinfo-font-lock-keywords t))
400 (make-local-variable 'tex-start-of-header) 403 (make-local-variable 'tex-start-of-header)
401 (setq tex-start-of-header "%**start") 404 (setq tex-start-of-header "%**start")
402 (make-local-variable 'tex-end-of-header) 405 (make-local-variable 'tex-end-of-header)