[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins wit
From: |
Eric Abrahamsen |
Subject: |
Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins with a space in save-some-buffers |
Date: |
Tue, 19 Sep 2017 08:44:02 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Kaushal Modi <address@hidden> writes:
> On Tue, Sep 19, 2017 at 9:00 AM Stefan Monnier <address@hidden> wrote:
>
> > This was fallout from 9b980e269, aka bug #28412, where now we prompt for
> > buffers that have functions in the `write-contents-functions' hook.
>
> Ah, I see I was looking at the wrong version of the code, sorry.
> So the question becomes: why does " *Code-Fontify*" have a non-nil
> write-contents-functions?
>
> It's because ggtags.el enables the major mode from the actual file in this
> temp " *Code-Fontify*" buffer by calling (funcall mode) in
> ggtags-fontify-code.
I do think ggtags is doing something weird here. But on the other hand,
it does seem better if `save-some-buffers' required `buffer-offer-save'
to be explicitly set non-nil, rather than drawing an implicit conclusion
from the presence of `write-contents-functions'.
Ie maybe I should just revert the change to this function, and make sure
to set `buffer-offer-save' to t in my use-case. No one will get
surprised by save prompts they didn't ask for. That way I could also
remove the buffer name check.
WDYT?
Eric
Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins with a space in save-some-buffers, Kaushal Modi, 2017/09/19