bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28277: emacs -nw bug?


From: Lars Ingebrigtsen
Subject: bug#28277: emacs -nw bug?
Date: Wed, 30 Oct 2019 17:43:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

richard.banach@manchester.ac.uk (Richard Banach) writes:

> I use   emacs -nw  and see what looks like a bug
>
> * in tex mode, if I type   $\it identifiername$   it doesn't recognise
> the second $ as closing the scope of \it ... and wants to underline
> everything that follows ... i haven't found how to turn this off

The following patch fixes the problem -- but I'm not sure whether it
could cause any regressions.

Is

\it foobar $math-stuff$

or something like it possible?  It's been a while since I wrote any TeX.


diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index f277defecf..9d9490602a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -593,7 +593,7 @@ tex-font-lock-keywords-2
            ;; Miscellany.
            (slash "\\\\")
            (opt " *\\(\\[[^]]*\\] *\\)*")
-           (args "\\(\\(?:[^{}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
+           (args "\\(\\(?:[^${}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
            (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
        (list
        ;;


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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