unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: richard.banach@manchester.ac.uk (Richard Banach)
Cc: 28277@debbugs.gnu.org
Subject: bug#28277: emacs -nw bug?
Date: Wed, 30 Oct 2019 17:43:33 +0100	[thread overview]
Message-ID: <87mudiqj4a.fsf@gnus.org> (raw)
In-Reply-To: <20170829124623.6EC32301033@cspc120.cs.man.ac.uk> (Richard Banach's message of "Tue, 29 Aug 2017 13:46:23 +0100")

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





  parent reply	other threads:[~2019-10-30 16:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 12:46 bug#28277: emacs -nw bug? Richard Banach
2017-08-29 15:56 ` Glenn Morris
2017-08-29 16:36   ` Richard Banach
2017-08-29 16:53     ` Glenn Morris
2017-08-30  9:45       ` Richard Banach
2017-08-30 16:48         ` Glenn Morris
2019-10-30 16:43 ` Lars Ingebrigtsen [this message]
2019-11-04 14:53   ` Richard Banach
2020-08-10 14:28   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mudiqj4a.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=28277@debbugs.gnu.org \
    --cc=richard.banach@manchester.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).