mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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).
This commit is contained in:
parent
e3fc16fd71
commit
4d4c73da5a
1 changed files with 7 additions and 5 deletions
|
|
@ -599,11 +599,13 @@ An alternative value is \" . \", if you use a font with a narrow period."
|
|||
;; Citation args.
|
||||
(list (concat slash citations opt arg) 3 'font-lock-constant-face)
|
||||
;;
|
||||
;; Text between `` quotes ''.
|
||||
(cons (concat (regexp-opt '("``" "\"<" "\"`" "<<" "«") t)
|
||||
"[^'\">{]+" ;a bit pessimistic
|
||||
(regexp-opt '("''" "\">" "\"'" ">>" "»") t))
|
||||
'font-lock-string-face)
|
||||
;; Text between `` quotes ''.
|
||||
(list (concat (regexp-opt '("``" "\"<" "\"`" "<<" "«") t)
|
||||
"\\(\\(.\\|\n\\)+?\\)"
|
||||
(regexp-opt `("''" "\">" "\"'" ">>" "»") t))
|
||||
'(1 font-lock-keyword-face)
|
||||
'(2 font-lock-string-face)
|
||||
'(4 font-lock-keyword-face))
|
||||
;;
|
||||
;; Command names, special and general.
|
||||
(cons (concat slash specials-1) 'font-lock-warning-face)
|
||||
|
|
|
|||
Loading…
Reference in a new issue