GNU bug report logs - #72240
The commit 17e26cf57e1 broke font-locking in maxima-mode

Previous Next

Package: emacs;

Reported by: Eduardo Ochs <eduardoochs <at> gmail.com>

Date: Mon, 22 Jul 2024 03:07:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Kangas <stefankangas <at> gmail.com>

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 72240 in the body.
You can then email your comments to 72240 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#72240; Package emacs. (Mon, 22 Jul 2024 03:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eduardo Ochs <eduardoochs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 22 Jul 2024 03:07:02 GMT) Full text and rfc822 format available.

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

From: Eduardo Ochs <eduardoochs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: The commit 17e26cf57e1 broke font-locking in maxima-mode
Date: Mon, 22 Jul 2024 00:05:50 -0300
Hi all,

there are two Maxima modes around - one in Melpa and one in Maxima
itself. They have different bugs, and lots of people, including me,
prefer the Maxima mode that comes with Maxima. This bug report is
about a change in Emacs that broke the font-locking in the Maxima mode
that comes with Maxima - I didn't test the other Maxima mode.

Something happened between these two commits:

3f7e26e2bed 2024-04-13 10:10:19 (define-globalized-minor-mode): Fix bug#58888
17e26cf57e1 2024-04-13 10:31:28 (define-globalized-minor-mode):
Require the use of `run-mode-hooks`

Until 3f7e26e2bed font-locking in .mac files worked, but from
17e26cf57e1 onwards it doesn't work anymore. In the current Emacs from
git - where "current" means 2024jul21 - it doesn't work.

Note that 3f7e26e2bed is 17e26cf57e1~1.
I'm on Debian 11 ("oldstable").

Here's how to test it.

--snip--snip--
rm -Rv /tmp/test-maxima-mode/
mkdir  /tmp/test-maxima-mode/
cd     /tmp/test-maxima-mode/

wget -O maxima.el \
  "https://sourceforge.net/p/maxima/code/ci/master/tree/interfaces/emacs/emaxima/maxima.el?format=raw"
wget -O maxima-font-lock.el \
  "https://sourceforge.net/p/maxima/code/ci/master/tree/interfaces/emacs/emaxima/maxima-font-lock.el?format=raw"

cat > test.mac <<'%%%'
max(2, 4);
min(2, 4);
q(t)   := max(0, t-2);
r(t)   := min(q(t), 2);
S(x,y) := max(r(x), r(y));
plot2d (r(t), [t, 0, 6]);
plot3d (S(x,y), [x, 0, 6], [y, 0, 6]);
%%%

cat > test.el <<'%%%'
(progn
  (load "/tmp/test-maxima-mode/maxima-font-lock.el")
  (load "/tmp/test-maxima-mode/maxima.el")
  (add-to-list 'auto-mode-alist '("\\.mac$"  . maxima-mode))
  (find-file "/tmp/test-maxima-mode/test.mac")
  )
%%%

emacs -Q test.el
--snip--snip--

  Cheers,
    Eduardo Ochs
    http://anggtwu.net/#eev




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72240; Package emacs. (Mon, 22 Jul 2024 07:31:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eduardo Ochs <eduardoochs <at> gmail.com>, 72240 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#72240: The commit 17e26cf57e1 broke font-locking in
 maxima-mode
Date: Mon, 22 Jul 2024 00:29:05 -0700
tags 72240 + notabug
thanks

Eduardo Ochs <eduardoochs <at> gmail.com> writes:

> there are two Maxima modes around - one in Melpa and one in Maxima
> itself. They have different bugs, and lots of people, including me,
> prefer the Maxima mode that comes with Maxima. This bug report is
> about a change in Emacs that broke the font-locking in the Maxima mode
> that comes with Maxima - I didn't test the other Maxima mode.
>
> Something happened between these two commits:
>
> 3f7e26e2bed 2024-04-13 10:10:19 (define-globalized-minor-mode): Fix bug#58888
> 17e26cf57e1 2024-04-13 10:31:28 (define-globalized-minor-mode):
> Require the use of `run-mode-hooks`
>
> Until 3f7e26e2bed font-locking in .mac files worked, but from
> 17e26cf57e1 onwards it doesn't work anymore. In the current Emacs from
> git - where "current" means 2024jul21 - it doesn't work.

This should be reported to the maxima.el developers, I think.

They should change `maxima-mode' to use `run-mode-hooks' instead of
`run-hooks'. This is documented in etc/NEWS:

> ** 'define-globalized-minor-mode' requires that modes use 'run-mode-hooks'.
> Minor modes defined with 'define-globalized-minor-mode', such as
> 'global-font-lock-mode', will not be enabled any more in those buffers
> whose major modes fail to use 'run-mode-hooks'.  Major modes defined
> with 'define-derived-mode' are not affected.  'run-mode-hooks' has been the
> recommended way to run major mode hooks since Emacs 22.




Added tag(s) notabug. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 22 Jul 2024 07:31:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Sat, 05 Oct 2024 01:17:02 GMT) Full text and rfc822 format available.

Notification sent to Eduardo Ochs <eduardoochs <at> gmail.com>:
bug acknowledged by developer. (Sat, 05 Oct 2024 01:17:02 GMT) Full text and rfc822 format available.

Message #15 received at 72240-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eduardo Ochs <eduardoochs <at> gmail.com>
Cc: 72240-done <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#72240: The commit 17e26cf57e1 broke font-locking in
 maxima-mode
Date: Fri, 4 Oct 2024 18:15:07 -0700
Stefan Kangas <stefankangas <at> gmail.com> writes:

> tags 72240 + notabug
> thanks
>
> Eduardo Ochs <eduardoochs <at> gmail.com> writes:
>
>> there are two Maxima modes around - one in Melpa and one in Maxima
>> itself. They have different bugs, and lots of people, including me,
>> prefer the Maxima mode that comes with Maxima. This bug report is
>> about a change in Emacs that broke the font-locking in the Maxima mode
>> that comes with Maxima - I didn't test the other Maxima mode.
>>
>> Something happened between these two commits:
>>
>> 3f7e26e2bed 2024-04-13 10:10:19 (define-globalized-minor-mode): Fix bug#58888
>> 17e26cf57e1 2024-04-13 10:31:28 (define-globalized-minor-mode):
>> Require the use of `run-mode-hooks`
>>
>> Until 3f7e26e2bed font-locking in .mac files worked, but from
>> 17e26cf57e1 onwards it doesn't work anymore. In the current Emacs from
>> git - where "current" means 2024jul21 - it doesn't work.
>
> This should be reported to the maxima.el developers, I think.
>
> They should change `maxima-mode' to use `run-mode-hooks' instead of
> `run-hooks'. This is documented in etc/NEWS:
>
>> ** 'define-globalized-minor-mode' requires that modes use 'run-mode-hooks'.
>> Minor modes defined with 'define-globalized-minor-mode', such as
>> 'global-font-lock-mode', will not be enabled any more in those buffers
>> whose major modes fail to use 'run-mode-hooks'.  Major modes defined
>> with 'define-derived-mode' are not affected.  'run-mode-hooks' has been the
>> recommended way to run major mode hooks since Emacs 22.

No further comments within 2 months, so I'm closing this bug.

If this conclusion is incorrect and this is still an issue, please reply
to this email (use "Reply to all" in your email client) and we can
reopen the bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 02 Nov 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 243 days ago.

Previous Next


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