diff options
| author | Keith David Bershatsky | 2021-05-29 13:45:59 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-05-29 13:45:59 +0200 |
| commit | 4d4c73da5a0aa4233b1dcdcf7db068fc79db6513 (patch) | |
| tree | fe96eff17d5f5ff42d22e04bb8fe9f96b542c81f /lisp/textmodes | |
| parent | e3fc16fd71a46990503a71b11a2ad592e99d9edb (diff) | |
| download | emacs-4d4c73da5a0aa4233b1dcdcf7db068fc79db6513.tar.gz emacs-4d4c73da5a0aa4233b1dcdcf7db068fc79db6513.zip | |
Improve tex fontification of quoted strings
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): Fontify
``text like this'' that has an apostrophe correctly (bug#16881).
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 8d7f459190b..a805c8952fd 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -599,11 +599,13 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 599 | ;; Citation args. | 599 | ;; Citation args. |
| 600 | (list (concat slash citations opt arg) 3 'font-lock-constant-face) | 600 | (list (concat slash citations opt arg) 3 'font-lock-constant-face) |
| 601 | ;; | 601 | ;; |
| 602 | ;; Text between `` quotes ''. | 602 | ;; Text between `` quotes ''. |
| 603 | (cons (concat (regexp-opt '("``" "\"<" "\"`" "<<" "«") t) | 603 | (list (concat (regexp-opt '("``" "\"<" "\"`" "<<" "«") t) |
| 604 | "[^'\">{]+" ;a bit pessimistic | 604 | "\\(\\(.\\|\n\\)+?\\)" |
| 605 | (regexp-opt '("''" "\">" "\"'" ">>" "»") t)) | 605 | (regexp-opt `("''" "\">" "\"'" ">>" "»") t)) |
| 606 | 'font-lock-string-face) | 606 | '(1 font-lock-keyword-face) |
| 607 | '(2 font-lock-string-face) | ||
| 608 | '(4 font-lock-keyword-face)) | ||
| 607 | ;; | 609 | ;; |
| 608 | ;; Command names, special and general. | 610 | ;; Command names, special and general. |
| 609 | (cons (concat slash specials-1) 'font-lock-warning-face) | 611 | (cons (concat slash specials-1) 'font-lock-warning-face) |