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 #8 received at 79198 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: sbaugh <at> janestreet.com, jonas <at> bernoul.li, 79198 <at> debbugs.gnu.org
Subject: Re: bug#79198: 31.0.50; Problem with multiple global auto-revert modes
Date: Sat, 09 Aug 2025 03:47:23 -0400
> 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". ]


        Stefan





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.