GNU bug report logs - #28277
tex-mode font-lock of \it escapes math mode

Previous Next

Package: emacs;

Reported by: richard.banach <at> manchester.ac.uk (Richard Banach)

Date: Tue, 29 Aug 2017 15:13:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 25.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: richard.banach <at> manchester.ac.uk (Richard Banach)
To: richard.banach <at> manchester.ac.uk, larsi <at> gnus.org
Cc: 28277 <at> debbugs.gnu.org
Subject: bug#28277: emacs -nw bug?
Date: Mon, 04 Nov 2019 14:53:39 +0000
hi,

thanks for the suggestion .......

ages ago, someone suggested

===============================================

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes nil))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(italic ((t (:underline nil))))
 '(underline ((t (:underline t)))))

===============================================

... and it seems to work fine :-)

richard.

===============================================
===============================================

Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

| richard.banach <at> 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




This bug report was last modified 4 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.