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

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

bug#68318: closed (30.0.50; Fontification of \{m\} and \{m,n\} in a rege


From: GNU bug Tracking System
Subject: bug#68318: closed (30.0.50; Fontification of \{m\} and \{m,n\} in a regexp)
Date: Sun, 17 Nov 2024 06:23:02 +0000

Your message dated Sun, 17 Nov 2024 08:22:23 +0200
with message-id <86o72ewfa8.fsf@gnu.org>
and subject line Re: bug#74308: 30.0.92; emacs-lisp font-locking word regexp
has caused the debbugs.gnu.org bug report #68318,
regarding 30.0.50; Fontification of \{m\} and \{m,n\} in a regexp
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
68318: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68318
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; Fontification of \{m\} and \{m,n\} in a regexp Date: Mon, 08 Jan 2024 10:26:16 +0100 User-agent: Gnus/5.13 (Gnus v5.13)
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:

PNG image

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

--- End Message ---
--- Begin Message --- Subject: Re: bug#74308: 30.0.92; emacs-lisp font-locking word regexp Date: Sun, 17 Nov 2024 08:22:23 +0200
> From: Arash Esbati <arash@gnu.org>
> Cc: Roland Winkler <winkler@gnu.org>,  74308@debbugs.gnu.org
> Date: Sat, 16 Nov 2024 22:33:55 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > merge 74308 74307
> > thanks
> >
> >> From: Roland Winkler <winkler@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.


--- End Message ---

reply via email to

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