emacs-devel
[Top][All Lists]
Advanced

[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: Kaushal Modi
Subject: Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins with a space in save-some-buffers
Date: Tue, 19 Sep 2017 10:48:38 +0000

On Mon, Sep 18, 2017, 10:44 PM Stefan Monnier <address@hidden> wrote:
>     Ignore buffers whose name begins with a space in save-some-buffers
>     * lisp/files.el (save-some-buffers): Consider these buffers
>       "internal", and don't prompt the user to save them.
>     * doc/lispref/files.texi: Document.

Why?  Currently we only prompt for buffers with a leading space
in 2 case:
- the buffer is associated with a file: rather unlikely, but if it
  occurs, it's probably a good idea not to ignore this buffer.
- the buffer has buffer-offer-save set to a non-nil value: here again if
  someone bothered to set this, it's a good idea not to ignore this buffer.

The previous commit that started promoting for file save if write-file-functions was non-nil starting breaking my use case (ggtags.el + verilog-mode). 

Details here: https://github.com/leoliu/ggtags/issues/157

Summary:
- ggtags.el create an internal buffer with name starting with space " *Code-Fontify*"
- verilog-mode is enabled in that buffer
- verilog-mode sets write-file-functions to a non-nil value
- So now I was promoted to save that " *Code-Fontify*" each time I quit emacs. 

ANDing the internal buffer check with OR of the 2 cases you mentioned will work fine (won't undo the fix that Eric made in this commit). 
--

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]