emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer ba


From: Stefan Monnier
Subject: Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
Date: Thu, 02 Apr 2020 11:22:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Wouldn't it be better to have a local minor mode and a globalized
> minor mode, like we do in other cases?

We could start with the patch below (which allows disabling the mode in
specific buffers, but lacks the rest of the code which would allow
*enabling* the mode in specific buffers).


        Stefan


diff --git a/lisp/files.el b/lisp/files.el
index 55a0958f54..5132aa456a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -441,6 +441,7 @@ auto-save-visited-mode
            #'save-some-buffers :no-prompt
            (lambda ()
              (and buffer-file-name
+                  auto-save-visited-mode
                   (not (and buffer-auto-save-file-name
                             auto-save-visited-file-name))))))))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]