GNU bug report logs - #74308
30.0.92; emacs-lisp font-locking word regexp

Previous Next

Package: emacs;

Reported by: Roland Winkler <winkler <at> gnu.org>

Date: Mon, 11 Nov 2024 06:32:02 UTC

Severity: normal

Merged with 74307

Found in version 30.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74308 in the body.
You can then email your comments to 74308 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#74308; Package emacs. (Mon, 11 Nov 2024 06:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roland Winkler <winkler <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Nov 2024 06:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Roland Winkler <winkler <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.92; emacs-lisp font-locking word regexp
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74308; Package emacs. (Mon, 11 Nov 2024 12:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 74308 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Roland Winkler <winkler <at> gnu.org>
Cc: 74308 <at> debbugs.gnu.org
Subject: Re: bug#74308: 30.0.92; emacs-lisp font-locking word regexp
Date: Mon, 11 Nov 2024 14:30:35 +0200
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.




Merged 74307 74308. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 11 Nov 2024 12:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74308; Package emacs. (Sat, 16 Nov 2024 21:35:01 GMT) Full text and rfc822 format available.

Message #13 received at 74308 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Roland Winkler <winkler <at> gnu.org>, 74308 <at> debbugs.gnu.org
Subject: Re: bug#74308: 30.0.92; emacs-lisp font-locking word regexp
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.

Best, Arash




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74308; Package emacs. (Sun, 17 Nov 2024 06:23:02 GMT) Full text and rfc822 format available.

Message #16 received at 74308 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: 68318-done <at> debbugs.gnu.org, winkler <at> gnu.org, 74308 <at> debbugs.gnu.org
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 <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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 02 Jan 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 262 days ago.

Previous Next


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