aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPhilipp Stephani2020-04-01 19:54:01 +0200
committerPhilipp Stephani2020-05-25 21:11:59 +0200
commitf8e99938ec41a9af8d42b2ed78af1370fc2c1bc2 (patch)
tree7b8c109989b5320506eddf8e13d4bd61277dfe90 /lisp
parentc812223c9fc2684d0edc9cb848cfa6d83c6fdb9a (diff)
downloademacs-f8e99938ec41a9af8d42b2ed78af1370fc2c1bc2.tar.gz
emacs-f8e99938ec41a9af8d42b2ed78af1370fc2c1bc2.zip
Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
At least for me, 'auto-save-visited-mode' is very slow and blocks user interaction for files visited over TRAMP. Therefore, I'd like a mechanism to disable it for some buffers (namely, those visiting remote files). * (auto-save-visited-mode): Document that 'auto-save-visited-mode' can be set to nil buffer-locally. * etc/NEWS: Document new behavior.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index dba704f7a4b..cb370476496 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -430,7 +430,13 @@ idle for `auto-save-visited-interval' seconds."
430 430
431Unlike `auto-save-mode', this mode will auto-save buffer contents 431Unlike `auto-save-mode', this mode will auto-save buffer contents
432to the visited files directly and will also run all save-related 432to the visited files directly and will also run all save-related
433hooks. See Info node `Saving' for details of the save process." 433hooks. See Info node `Saving' for details of the save process.
434
435You can also set the buffer-local value of the variable
436`auto-save-visted-mode' to nil. A buffer where the buffer-local
437value of this variable is nil is ignored for the purpose of
438`auto-save-visited-mode', even if `auto-save-visited-mode' is
439enabled."
434 :group 'auto-save 440 :group 'auto-save
435 :global t 441 :global t
436 (when auto-save--timer (cancel-timer auto-save--timer)) 442 (when auto-save--timer (cancel-timer auto-save--timer))
@@ -441,6 +447,7 @@ hooks. See Info node `Saving' for details of the save process."
441 #'save-some-buffers :no-prompt 447 #'save-some-buffers :no-prompt
442 (lambda () 448 (lambda ()
443 (and buffer-file-name 449 (and buffer-file-name
450 auto-save-visited-mode
444 (not (and buffer-auto-save-file-name 451 (not (and buffer-auto-save-file-name
445 auto-save-visited-file-name)))))))) 452 auto-save-visited-file-name))))))))
446 453