GNU bug report logs -
#77005
31.0.50; Add note about font-lock-keywords-case-fold-search usage
Previous Next
Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Date: Fri, 14 Mar 2025 05:43:02 UTC
Severity: wishlist
Found in version 31.0.50
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 77005 in the body.
You can then email your comments to 77005 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Fri, 14 Mar 2025 05:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Elijah Gabe Pérez <eg642616 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 14 Mar 2025 05:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I have seen that font-lock-keywords-case-fold-search is more preferably
used by major modes than minor modes.
However, I have not found a note in documentation that says where to use
it.
Shouldn't a note be added to the documentation about this?
[Message part 2 (text/html, inline)]
[Message part 3 (text/plain, inline)]
--
- E.G via GNU Emacs and Org.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Fri, 14 Mar 2025 12:20:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77005 <at> debbugs.gnu.org (full text, mbox):
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Date: Thu, 13 Mar 2025 23:41:53 -0600
>
> I have seen that font-lock-keywords-case-fold-search is more preferably used by major modes than minor
> modes.
How did you see that, and where?
> However, I have not found a note in documentation that says where to use it.
>
> Shouldn't a note be added to the documentation about this?
We need to understand the issue better to reply to this question. So
please provide more details.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Fri, 14 Mar 2025 19:21:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 77005 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
#+begin_quote
How did you see that, and where?
#+end_quote
Mostly in third-party major-mode. But also in built-in ones, for
example css-mode that have font-lock-keywords-case-fold-search set to 't.
I haven't seen any minor mode that uses this variable. I guess the
reason is to avoid conflicts with the major mode.
#+begin_quote
We need to understand the issue better to reply to this question. So
please provide more details.
#+end_quote
My idea is to add a kind of note to
font-lock-keywords-case-fold-search documentation in lispref tex file
to avoid any confusion that this can be used in minor modes.
Something like this:
#+begin_src diff
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 768d78229aa..02e7a6f553f 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3573,6 +3573,9 @@ Search-based Fontification
@defvar font-lock-keywords-case-fold-search
Non-@code{nil} means that regular expression matching for the sake of
@code{font-lock-keywords} should be case-insensitive.
+
+@strong{Warning:} This variable is intended to be used by major modes
+and it's not recommended change it by minor modes
@end defvar
@node Customizing Keywords
#+end_src
[Message part 2 (text/html, inline)]
[Message part 3 (text/plain, inline)]
--
- E.G via GNU Emacs and Org.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Sat, 15 Mar 2025 08:34:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 77005 <at> debbugs.gnu.org (full text, mbox):
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Cc: 77005 <at> debbugs.gnu.org
> Date: Fri, 14 Mar 2025 13:20:06 -0600
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> How did you see that, and where?
>
> Mostly in third-party major-mode. But also in built-in ones, for example css-mode that have
> font-lock-keywords-case-fold-search set to 't.
>
> I haven't seen any minor mode that uses this variable. I guess the reason is to avoid conflicts with the major
> mode.
>
> We need to understand the issue better to reply to this question. So please provide more details.
>
> My idea is to add a kind of note to font-lock-keywords-case-fold-search documentation in lispref tex file to
> avoid any confusion that this can be used in minor modes.
I wonder why is this necessary. Minor modes are not supposed to
affect font-lock in the first place, are they?
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 15 Mar 2025 12:03:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Sat, 15 Mar 2025 18:58:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 77005 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
>> Cc: 77005 <at> debbugs.gnu.org
>> Date: Fri, 14 Mar 2025 13:20:06 -0600
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> How did you see that, and where?
>>
>> Mostly in third-party major-mode. But also in built-in ones, for example css-mode that have
>> font-lock-keywords-case-fold-search set to 't.
>>
>> I haven't seen any minor mode that uses this variable. I guess the reason is to avoid conflicts with the major
>> mode.
>>
>> We need to understand the issue better to reply to this question. So please provide more details.
>>
>> My idea is to add a kind of note to font-lock-keywords-case-fold-search documentation in lispref tex file to
>> avoid any confusion that this can be used in minor modes.
>
> I wonder why is this necessary. Minor modes are not supposed to
> affect font-lock in the first place, are they?
Right, they should not, however for case-insensitive fontification this can lead to
newcomer users that wants to define a minor mode /(such as for highlight something)/
use this variable.
Otherwise this bug could already be closed.
[Message part 2 (text/html, inline)]
[Message part 3 (text/plain, inline)]
--
- E.G via GNU Emacs and Org.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Sat, 15 Mar 2025 20:11:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 77005 <at> debbugs.gnu.org (full text, mbox):
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Cc: 77005 <at> debbugs.gnu.org
> Date: Sat, 15 Mar 2025 12:57:45 -0600
>
> My idea is to add a kind of note to font-lock-keywords-case-fold-search documentation in lispref
> tex file to avoid any confusion that this can be used in minor modes.
>
> I wonder why is this necessary. Minor modes are not supposed to affect font-lock in the first place, are
> they?
>
> Right, they should not, however for case-insensitive fontification this can lead to newcomer users that wants
> to define a minor mode (such as for highlight something) use this variable.
>
> Otherwise this bug could already be closed.
Stefan, WDYT?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77005
; Package
emacs
.
(Sun, 16 Mar 2025 21:25:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 77005 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
>> Cc: 77005 <at> debbugs.gnu.org
>> Date: Sat, 15 Mar 2025 12:57:45 -0600
>>
>> My idea is to add a kind of note to font-lock-keywords-case-fold-search documentation in lispref
>> tex file to avoid any confusion that this can be used in minor modes.
>>
>> I wonder why is this necessary. Minor modes are not supposed to affect font-lock in the first place, are
>> they?
>>
>> Right, they should not, however for case-insensitive fontification this can lead to newcomer users that wants
>> to define a minor mode (such as for highlight something) use this variable.
>>
>> Otherwise this bug could already be closed.
>
> Stefan, WDYT?
I'd tend to agree with Eli.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Mon, 17 Mar 2025 12:40:06 GMT)
Full text and
rfc822 format available.
Notification sent
to
Elijah Gabe Pérez <eg642616 <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 17 Mar 2025 12:40:07 GMT)
Full text and
rfc822 format available.
Message #30 received at 77005-done <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 16 Mar 2025 14:24:07 -0700
> Cc: 77005 <at> debbugs.gnu.org
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> >> Cc: 77005 <at> debbugs.gnu.org
> >> Date: Sat, 15 Mar 2025 12:57:45 -0600
> >>
> >> My idea is to add a kind of note to font-lock-keywords-case-fold-search documentation in lispref
> >> tex file to avoid any confusion that this can be used in minor modes.
> >>
> >> I wonder why is this necessary. Minor modes are not supposed to affect font-lock in the first place, are
> >> they?
> >>
> >> Right, they should not, however for case-insensitive fontification this can lead to newcomer users that wants
> >> to define a minor mode (such as for highlight something) use this variable.
> >>
> >> Otherwise this bug could already be closed.
> >
> > Stefan, WDYT?
>
> I'd tend to agree with Eli.
Thanks, closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 15 Apr 2025 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.