From fe82c0743b3feecb9b80549ef4bb3dc8529891a8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 5 Jul 2022 19:37:55 +0200 Subject: [PATCH] Rename new option to remote-file-name-inhibit-auto-save-visited * lisp/files.el (remote-file-name-inhibit-auto-save-visited): Rename from 'auto-save-visited-remote-files' and invert logic. (auto-save-visited-mode): Adjust accordingly. (Bug#41333) Suggested by Michael Albinus . --- etc/NEWS | 6 +++--- lisp/files.el | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 682ab6d721c..7a1b7a856af 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2009,9 +2009,9 @@ 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 -auto-save remote buffers. The default is t. +*** New user option 'remote-file-name-inhibit-auto-save-visited'. +If this user option is non-nil, 'auto-save-visited-mode' will not +auto-save remote buffers. The default is nil. +++ *** New package vtable.el for formatting tabular data. diff --git a/lisp/files.el b/lisp/files.el index 9eeed836c99..31e450355f1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -469,8 +469,9 @@ non-nil." :risky t :version "29.1") -(defcustom auto-save-visited-remote-files t - "If non-nil, `auto-save-visited-mode' will auto-save remote files." +(defcustom remote-file-name-inhibit-auto-save-visited nil + "When nil, `auto-save-visited-mode' will auto-save remote files. +Any other value means that it will not." :group 'auto-save :type 'boolean :version "29.1") @@ -509,7 +510,7 @@ For more details, see Info node `(emacs) Auto Save Files'." (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) + (not remote-file-name-inhibit-auto-save-visited)) (or (not (functionp auto-save-visited-predicate)) (funcall auto-save-visited-predicate))))))))