[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make pred customable in auto-save-visited-mode
From: |
Eli Zaretskii |
Subject: |
Re: make pred customable in auto-save-visited-mode |
Date: |
Sat, 31 Mar 2018 11:43:22 +0300 |
> From: 纪秀峰 <address@hidden>
> Date: Sat, 31 Mar 2018 00:59:19 +0800
> Feedback-ID: esmtp:qq.com:bgforeign:bgforeign1
>
> When I enable auto-save-visited-mode and start an ediff merge session
> It always prompt me save "*ediff-merge*” to a file.
Why is that a problem? *ediff-merge* is a buffer where you prepare
the merge, and that merge will eventually be saved to some file,
right? So it doesn't sound wrong to offer to save it.
> (setq auto-save--timer
> (when auto-save-visited-mode
> (run-with-idle-timer
> auto-save-visited-interval :repeat
> #'save-some-buffers :no-prompt
> (lambda () ;;<————————————how about make this customable
> (not (and buffer-auto-save-file-name
> auto-save-visited-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.