[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make pred customable in auto-save-visited-mode
From: |
纪秀峰 |
Subject: |
make pred customable in auto-save-visited-mode |
Date: |
Sat, 31 Mar 2018 00:59:19 +0800 |
When I enable auto-save-visited-mode and start an ediff merge session
It always prompt me save "*ediff-merge*” to a file.
(define-minor-mode auto-save-visited-mode
"Toggle automatic saving to file-visiting buffers on or off.
With a prefix argument ARG, enable regular saving of all buffers
visiting a file if ARG is positive, and disable it otherwise.
Unlike `auto-save-mode', this mode will auto-save buffer contents
to the visited files directly and will also run all save-related
hooks. See Info node `Saving' for details of the save process.
If called from Lisp, enable the mode if ARG is omitted or nil,
and toggle it if ARG is `toggle'."
:group 'auto-save
:global t
(when auto-save--timer (cancel-timer auto-save--timer))
(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)))))))
- make pred customable in auto-save-visited-mode,
纪秀峰 <=