GNU bug report logs -
#76701
31.0.50; recent regression in [global] font-lock-mode?
Previous Next
Reported by: Madhu <enometh <at> meer.net>
Date: Mon, 3 Mar 2025 03:16:01 UTC
Severity: normal
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 76701 in the body.
You can then email your comments to 76701 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#76701
; Package
emacs
.
(Mon, 03 Mar 2025 03:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Madhu <enometh <at> meer.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 03 Mar 2025 03:16: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 posted a query
https://lists.gnu.org/archive/html/help-gnu-emacs/2025-03/msg00005.html
on help-gnu-emacs but the discussion didn't proceed, so I'm reposting
here]
Attached is a test case named `debug-font-lock-foo-spec-mode.el' which
sets up a minor-mode foo-spec-mode for *.foospec files which
highlights the string "FOO-SPEC" with font-lock-warning-space.
On invoking the following sequence
```
echo FOO-SPEC > /tmp/foo.foospec
emacs -Q -l debug-font-lock-foo-spec-mode.el /tmp/foo.foospec
```
I expect to open "/tmp/foo.foospec" in a buffer and have it fontified
in red. However the buffer ends up with font-lock-mode: nil even
though global-font-lock-mode is t (under emacs -Q).
I think this used to work until recently. Is this a possible
regression or is the testcase flawed because of some recent changes?
--Best Regards, Madhu
[debug-font-lock-foo-spec-mode.el (text/plain, inline)]
(defvar foo-spec-mode-font-lock-keywords
(list
(cons "^FOO-SPEC$" '(0 font-lock-warning-face))))
(defun foo-spec-mode ()
(interactive)
(kill-all-local-variables)
(setq major-mode 'foo-spec-mode)
(setq mode-name "FooSpec")
(setq-local font-lock-defaults '(foo-spec-mode-font-lock-keywords nil t))
(run-hooks 'foo-spec-mode-hook))
(add-to-list 'auto-mode-alist '("\\.foospec$" . foo-spec-mode))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76701
; Package
emacs
.
(Tue, 04 Mar 2025 12:25:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
This bug report can be closed without being opened.
The question has been answered in
https://lists.gnu.org/archive/html/help-gnu-emacs/2025-03/msg00050.html
"The commit changes the macro-expansion of
`define-globalized-minor-mode`, so it will only manifest after
you recompile the file that uses `define-globalized-minor-mode`
to define the minor mode."
and subthreads.
This is in reference to the commit 17e26cf57e1 2024-04-13 20:01:28
"(define-globalized-minor-mode): Require the use of `run-mode-hooks`"
[the effects didn't show up in incremental builds until this year,
when it took effect probably after the copyright updates.]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Tue, 04 Mar 2025 15:16:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Madhu <enometh <at> meer.net>
:
bug acknowledged by developer.
(Tue, 04 Mar 2025 15:16:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 76701-done <at> debbugs.gnu.org (full text, mbox):
> From: Madhu <enometh <at> meer.net>
> Date: Tue, 04 Mar 2025 17:54:43 +0530
>
>
> This bug report can be closed without being opened.
>
> The question has been answered in
> https://lists.gnu.org/archive/html/help-gnu-emacs/2025-03/msg00050.html
>
> "The commit changes the macro-expansion of
> `define-globalized-minor-mode`, so it will only manifest after
> you recompile the file that uses `define-globalized-minor-mode`
> to define the minor mode."
>
> and subthreads.
>
> This is in reference to the commit 17e26cf57e1 2024-04-13 20:01:28
> "(define-globalized-minor-mode): Require the use of `run-mode-hooks`"
>
> [the effects didn't show up in incremental builds until this year,
> when it took effect probably after the copyright updates.]
Thanks, closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 02 Apr 2025 11:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.