emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dcce2b5: Fix fontification of outdated TeX form


From: Lars Ingebrigtsen
Subject: master dcce2b5: Fix fontification of outdated TeX form
Date: Mon, 10 Aug 2020 10:28:57 -0400 (EDT)

branch: master
commit dcce2b57bb91d490787dffd437b61196f1029b41
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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$
---
 lisp/textmodes/tex-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index e3d5759..a905d14 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."
            ;; Miscellany.
            (slash "\\\\")
            (opt " *\\(\\[[^]]*\\] *\\)*")
-           (args "\\(\\(?:[^{}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
+           (args "\\(\\(?:[^${}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
            (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
        (list
        ;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]