diff options
| author | Stefan Monnier | 2004-10-25 20:35:24 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-10-25 20:35:24 +0000 |
| commit | b119fdd59d7b97df5ce02a89b0d4e5205b02058e (patch) | |
| tree | d2ecc6f10c2efa7d31bbec466c695b7166e04961 /lisp | |
| parent | f9a8480b56fbcd7ed6bdfb81113c650dcd1d25d7 (diff) | |
| download | emacs-b119fdd59d7b97df5ce02a89b0d4e5205b02058e.tar.gz emacs-b119fdd59d7b97df5ce02a89b0d4e5205b02058e.zip | |
(tex-font-lock-keywords-1): Fix up the spurious
verbatim face on the \ of \end{verbatim}.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 5c5e0a4d1c7..cb5bf24badd 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -468,6 +468,10 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 468 | ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)")) | 468 | ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)")) |
| 469 | (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) | 469 | (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) |
| 470 | (list | 470 | (list |
| 471 | ;; font-lock-syntactic-keywords causes the \ of \end{verbatim} to be | ||
| 472 | ;; highlighted as tex-verbatim-face. Let's undo that. | ||
| 473 | ;; This is ugly and brittle :-( --Stef | ||
| 474 | '("^\\(\\\\\\)end" (1 (get-text-property (match-end 1) 'face) t)) | ||
| 471 | ;; display $$ math $$ | 475 | ;; display $$ math $$ |
| 472 | ;; We only mark the match between $$ and $$ because the $$ delimiters | 476 | ;; We only mark the match between $$ and $$ because the $$ delimiters |
| 473 | ;; themselves have already been marked (along with $..$) by syntactic | 477 | ;; themselves have already been marked (along with $..$) by syntactic |
| @@ -619,6 +623,8 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 619 | ;; 2 - font-lock considers the preceding \n as being part of the | 623 | ;; 2 - font-lock considers the preceding \n as being part of the |
| 620 | ;; preceding line, so things gets screwed every time the previous | 624 | ;; preceding line, so things gets screwed every time the previous |
| 621 | ;; line is re-font-locked on its own. | 625 | ;; line is re-font-locked on its own. |
| 626 | ;; There's a hack in tex-font-lock-keywords-1 to remove the verbatim | ||
| 627 | ;; face from the \ but C-M-f still jumps to the wrong spot :-( --Stef | ||
| 622 | (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) | 628 | (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) |
| 623 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") | 629 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") |
| 624 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") | 630 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") |