[Top][All Lists]

[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: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins with a space in save-some-buffers
Date: Fri, 22 Sep 2017 12:18:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> (and pred
>      (progn
>        (set-buffer buffer)
>        (and buffer-offer-save (> (buffer-size) 0))))

> Unless a user has customized `save-some-buffers-default-predicate', PRED
> is only t when Emacs is exiting.

But it's also non-nil in some other cases (e.g. it was non-nil when
the function was called as a part of running a command in PCL-CVS, and
presumably the VC-Dir interface should do the same, where the pred` is
used to only prompt saving of buffers within the relevant directory).

> If we can come to a consensus about those two questions, it shouldn't be
> hard to come up with a clean solution.

How 'bout turning buffer-offer-save into a 3-value variable (instead of
a boolean):
- nil = as before (i.e. never)
- t = as before (i.e. only when pred is non-nil and the buffer is not empty)
- `always` = regardless of pred and buffer's size (i.e. always)


reply via email to

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