mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 19:07:34 +00:00
New user option auto-save-visited-remote-files
* lisp/files.el (auto-save-visited-remote-files): New user option. (auto-save-visited-mode): Use above new variable to decide whether or not to save remote files. (Bug#41333)
This commit is contained in:
parent
ac7f76528f
commit
3631355dcb
2 changed files with 13 additions and 0 deletions
5
etc/NEWS
5
etc/NEWS
|
|
@ -2008,6 +2008,11 @@ This user option is a predicate function which is called by
|
|||
You can use it to automatically save only specific buffers, for
|
||||
example buffers using a particular mode or in some directory.
|
||||
|
||||
---
|
||||
*** New user option 'auto-save-visited-remote-files'.
|
||||
This user option controls whether or not 'auto-save-visited-mode' will
|
||||
save remote buffers. The default is t.
|
||||
|
||||
+++
|
||||
*** New package vtable.el for formatting tabular data.
|
||||
This package allows formatting data using variable-pitch fonts.
|
||||
|
|
|
|||
|
|
@ -468,6 +468,12 @@ true."
|
|||
:risky t
|
||||
:version "29.1")
|
||||
|
||||
(defcustom auto-save-visited-remote-files t
|
||||
"If non-nil, `auto-save-visited-mode' will save remote files."
|
||||
:group 'auto-save
|
||||
:type 'boolean
|
||||
:version "29.1")
|
||||
|
||||
(define-minor-mode auto-save-visited-mode
|
||||
"Toggle automatic saving to file-visiting buffers on or off.
|
||||
|
||||
|
|
@ -501,6 +507,8 @@ For more details, see Info node `(emacs) Auto Save Files'."
|
|||
auto-save-visited-mode
|
||||
(not (and buffer-auto-save-file-name
|
||||
auto-save-visited-file-name))
|
||||
(or (not (file-remote-p buffer-file-name))
|
||||
auto-save-visited-remote-files)
|
||||
(or (not (functionp auto-save-visited-predicate))
|
||||
(funcall auto-save-visited-predicate))))))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue