GNU bug report logs -
#64439
28.2; auto-fill-mode gets turned on all over the place
Previous Next
Full log
View this message in rfc822 format
On 7/11/2023 4:31 AM, Eli Zaretskii wrote:
>> Date: Mon, 10 Jul 2023 16:53:41 -0700
>> From: Jim Porter <jporterbugs <at> gmail.com>
>> Cc: dhowells <at> redhat.com, Michael Albinus <michael.albinus <at> gmx.de>,
>> 64439 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
>>
>> On 7/10/2023 2:54 PM, Jim Porter wrote:
>>> Interestingly, I can't reproduce this on Emacs 30 (latest master), but I
>>> *can* on Emacs 28.2 and the latest rev on the Emacs 29 branch. I haven't
>>> dug any further yet to see which commit could have changed this though.
>>
>> ... and it looks like you're the one who fixed this, Stefan! Should this
>> get backported into the emacs-29 branch?
>
> Sorry, no. We've lived with this subtle problem for 40 years, we can
> live another one or two.
Ok, just thought I'd ask. It's not too hard to work around anyway.
For anyone who's interested, here's what I did to work around the bug in
Emacs 29 and earlier:
--------------------
(use-package text-mode
:preface
(defun user/turn-on-auto-fill (&optional recursive)
"Turn on `auto-fill-mode', but fix things if it got set globally.
See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64439>."
(turn-on-auto-fill)
(when (default-value 'auto-fill-function)
(message "`auto-fill-function' got set globally; fixing it...")
(setq-default auto-fill-function nil)
(when recursive
(error (concat "Recursively setting the default value of "
"`auto-fill-function'!")))
(run-with-timer 0 nil
(lambda (buf)
(with-current-buffer buf
(user/turn-on-auto-fill)))
(current-buffer))))
:init
(add-hook 'text-mode-hook (if (< emacs-major-version 30)
#'user/turn-on-auto-fill
#'turn-on-auto-fill)))
This bug report was last modified 1 year and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.