aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2020-08-10 16:26:34 +0200
committerLars Ingebrigtsen2020-08-10 16:26:34 +0200
commitdcce2b57bb91d490787dffd437b61196f1029b41 (patch)
tree5ac0c80780f5b50cbb86a4d83116b972a1d4ee0e
parent170faae31b13defc35a26ee6429dcb82066a6a66 (diff)
downloademacs-dcce2b57bb91d490787dffd437b61196f1029b41.tar.gz
emacs-dcce2b57bb91d490787dffd437b61196f1029b41.zip
Fix fontification of outdated TeX form
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): End the expression before the terminating $ in constructions like $\it identifiername$ (bug#28277). This avoids italicising the final $ character. This fixes the final $ of the final test case here: $foo$ \textit{foo} {\it foo} $\mathit{identifiername}$ $\textit{identifiername}$ ${\it identifiername}$ $\it identifiername$
-rw-r--r--lisp/textmodes/tex-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index e3d5759579a..a905d148009 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -593,7 +593,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
593 ;; Miscellany. 593 ;; Miscellany.
594 (slash "\\\\") 594 (slash "\\\\")
595 (opt " *\\(\\[[^]]*\\] *\\)*") 595 (opt " *\\(\\[[^]]*\\] *\\)*")
596 (args "\\(\\(?:[^{}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)") 596 (args "\\(\\(?:[^${}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
597 (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) 597 (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
598 (list 598 (list
599 ;; 599 ;;