GNU bug report logs - #73291
31.0.50; `clean-buffer-list' activates `midnight-mode'

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Mon, 16 Sep 2024 07:51:02 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 31.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 73291 <at> debbugs.gnu.org
Subject: bug#73291: 31.0.50; `clean-buffer-list' activates `midnight-mode'
Date: Wed, 18 Sep 2024 16:52:25 -0700
Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> I think the following patch does the trick.

Previously, putting this in your init file enabled midnight-mode:

    (require 'midnight)

Now, one needs to say this instead:

    (midnight-mode +1)

Right?  If yes, this change is backwards-incompatible and should be
called out in NEWS.

I still think this is worth doing, because we want to avoid side-effects
like enabling modes just from loading an Emacs Lisp library.  This is
one of few such places that we have left.  Not having midnight-mode on
should also usually not be a very big problem.

Since the latter will work on previous versions of Emacs all the way
back to 25.1, I think we might as well install the below documentation
patch on the emacs-30 branch too.

diff --git a/lisp/midnight.el b/lisp/midnight.el
index bfa99d6a7a8..cc9150ccc9e 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -23,7 +23,7 @@

 ;;; Commentary:

-;; To use the file, put (require 'midnight) into your .emacs.  Then, at
+;; To use the file, put (midnight-mode) into your .emacs.  Then, at
 ;; midnight, Emacs will run the normal hook `midnight-hook'.  You can
 ;; put whatever you like there, say, `calendar'; by default there is
 ;; only one function there - `clean-buffer-list'.  It will kill the




This bug report was last modified 239 days ago.

Previous Next


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