GNU bug report logs - #79198
31.0.50; Problem with multiple global auto-revert modes

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Fri, 8 Aug 2025 12:48:01 UTC

Severity: normal

Found in version 31.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Full log


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

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: Sean Whitton <spwhitton <at> spwhitton.name>, Stefan Monnier
 <monnier <at> iro.umontreal.ca>
Cc: sbaugh <at> janestreet.com, 79198-done <at> debbugs.gnu.org
Subject: Re: bug#79198: 31.0.50; Problem with multiple global auto-revert modes
Date: Sat, 09 Aug 2025 16:57:42 +0200
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello,
>
> On Sat 09 Aug 2025 at 03:47am -04, Stefan Monnier wrote:
>
>>> I think that the following would fix the problem; how does it look:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
>>> index 46c99052090..f2d21d7ef45 100644
>>> --- a/lisp/emacs-lisp/easy-mmode.el
>>> +++ b/lisp/emacs-lisp/easy-mmode.el
>>> @@ -500,7 +500,8 @@ define-globalized-minor-mode
>>>  	  (intern (concat global-mode-name "-enable-in-buffer")))
>>>  	 (minor-MODE-hook (intern (concat mode-name "-hook")))
>>>  	 (MODE-set-explicitly (intern (concat mode-name "-set-explicitly")))
>>> -	 (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode")))
>>> +	 (MODE-major-mode (intern (concat (symbol-name global-mode)
>>> +                                          "-major-mode")))
>>>           (MODE-predicate (intern (concat (replace-regexp-in-string
>>>                                            "-mode\\'" "" global-mode-name)
>>>                                           "-modes")))
>>> --8<---------------cut here---------------end--------------->8---
>>
>> I tend to agree and would suggest to put a "--" in there as well, since
>> it's used internally by the global major mode and is not meant to be
>> used by other code.
>> [ Same for the "-set-explicitly" which should be "--set-explicitly". ]
>
> Thanks for reviewing, now done.

Makes sense to me too.

Instead of (symbol-name global-mode) you could use global-mode-name.

     Cheers,
     Jonas




This bug report was last modified 26 days ago.

Previous Next


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