GNU bug report logs -
#68318
30.0.50; Fontification of \{m\} and \{m,n\} in a regexp
Previous Next
Reported by: Arash Esbati <arash <at> gnu.org>
Date: Mon, 8 Jan 2024 09:27:02 UTC
Severity: minor
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#68318: 30.0.50; Fontification of \{m\} and \{m,n\} in a regexp
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 68318 <at> debbugs.gnu.org.
--
68318: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68318
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> From: Arash Esbati <arash <at> gnu.org>
> Cc: Roland Winkler <winkler <at> gnu.org>, 74308 <at> debbugs.gnu.org
> Date: Sat, 16 Nov 2024 22:33:55 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > merge 74308 74307
> > thanks
> >
> >> From: Roland Winkler <winkler <at> gnu.org>
> >> Date: Mon, 11 Nov 2024 00:30:46 -0600
> >>
> >> Starting from emacs -Q, put the following into a buffer with
> >> emacs-lisp-mode
> >>
> >> (setq foo "\\<foo\\>")
> >>
> >> The part "foo\\" of the string "\\<foo\\>" will get
> >> font-lock-variable-name-face, which looks odd.
> >>
> >> I believe, this is due to a clause in lisp-mode.el that says
> >>
> >> ;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
> >> ;; `substitute-command-keys'.
> >>
> >> But this assumption is not always correct, in particular if ">" is
> >> preceded by "\\", which happens when constructing regexps.
> >
> > This is an exact duplicate of bug#74307 that you submitted just 2
> > minutes earlier, so I'm merging them.
>
> I think bug#68318 is also about the same issue; it can be merged into
> this one as well.
Thanks. Since this bug was already closed, I'm therefore closing
bug#68318 as well.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hi all,
to reproduce, start 'emacs -Q' and paste the following lines into
scratch:
(re-search-forward "a\\{7\\}")
(re-search-forward "a\\{7,\\}")
(re-search-forward "a\\{,7\\}")
For me, it looks like this:
[string.png (image/png, inline)]
[Message part 6 (text/plain, inline)]
Hitting 'C-u C-x =' on the first 7 and the backslashes says:
There are text properties here:
face (font-lock-variable-name-face font-lock-string-face)
fontified t
On the next two forms, I get:
There are text properties here:
face font-lock-string-face
fontified t
Is this difference on purpose?
Best, Arash
In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.2.0, NS
appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-01-07 built on
MacMutant.fritz.box
Repository revision: f866c85ac4e32df8061b285b6b44b15346994f3d
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2487
System Description: macOS 14.2.1
Configured using:
'configure --with-ns --without-pop --without-mailutils --with-threads
--with-modules --with-native-compilation --without-compress-install
'CFLAGS=-O2 -g0 -pipe'
'CPPFLAGS=-I/opt/homebrew/Cellar/gcc/13.2.0/include
-I/opt/homebrew/Cellar/libgccjit/13.2.0/include
-I/opt/homebrew/Cellar/gmp/6.3.0/include'
'LDFLAGS=-L/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current
-L/opt/homebrew/Cellar/gmp/6.3.0/lib''
Configured features:
ACL GLIB GMP GNUTLS JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE
NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER WEBP
XIM ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
This bug report was last modified 188 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.