|Subject:||Re: make pred customable in auto-save-visited-mode|
|Date:||Sat, 31 Mar 2018 10:28:58 +0000|
> (setq auto-save--timer
> (when auto-save-visited-mode
> auto-save-visited-interval :repeat
> #'save-some-buffers :no-prompt
> (lambda () ;;<————————————how about make this customable
> (not (and buffer-auto-save-file-name
Letting users customize a non-trivial function is not the best way of
affecting this behavior. I think you can have what you want by adding
a function to ediff-startup-hook, and in that function set
buffer-auto-save-file-name of the *ediff-merge* buffer to nil.
I agree that customization isn't the best solution here. However, I'm suprised that `save-some-buffers' still prompts even if :noprompt is passed.The issue might be in `save-some-buffers': Its docstring says "If PRED is t, then certain non-file buffers will also be considered.", but later it only checks whether PRED is non-nil:(or(buffer-file-name buffer)(with-current-buffer buffer(or (eq buffer-offer-save 'always)(and pred buffer-offer-save (> (buffer-size) 0)))))Maybe instead of `pred' here we should say (eq pred t). Alternative, the predicate lambda should check whether `buffer-file-name' is non-nil.
Description: Text document
|[Prev in Thread]||Current Thread||[Next in Thread]|