]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from origin/emacs-28
authorStefan Kangas <stefan@marxist.se>
Sun, 10 Jul 2022 04:30:35 +0000 (06:30 +0200)
committerStefan Kangas <stefan@marxist.se>
Sun, 10 Jul 2022 04:30:35 +0000 (06:30 +0200)
115261b323 ; Improve wording of recently-changed doc strings.

1  2 
lisp/files.el
lisp/simple.el

diff --cc lisp/files.el
index 2ea9d1e46739850fbee43cc546a73dd0390acd32,1212187274896a91065572aad70fc144cadbbc38..b99ccf66d8a3d657cc7715779edde22f1216c0f4
@@@ -441,52 -418,17 +441,53 @@@ idle for `auto-save-visited-interval' s
           (when auto-save--timer
             (timer-set-idle-time auto-save--timer value :repeat))))
  
 +(defcustom auto-save-visited-predicate nil
 +  "Predicate function for `auto-save-visited-mode'.
 +
 +If non-nil, the value should be a function of no arguments; it
 +will be called once in each file-visiting buffer when the time
 +comes to auto-save.  A buffer will be saved only if the predicate
 +function returns a non-nil value.
 +
 +For example, you could add this to your Init file to only save
 +files that are both in Org mode and in a particular directory:
 +
 +    (setq auto-save-visited-predicate
 +          (lambda () (and (eq major-mode \\='org-mode)
 +                          (string-match \"^/home/skangas/org/\"
 +                                        buffer-file-name))))
 +
 +If the value of this variable is not a function, it is ignored.
 +This is the same as having a predicate that always returns
 +non-nil."
 +  :group 'auto-save
 +  :type '(choice :tag "Function:"
 +                 (const :tag "No extra predicate" :value nil)
 +                 (function :tag "Predicate function" :value always))
 +  :risky t
 +  :version "29.1")
 +
 +(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")
 +
  (define-minor-mode auto-save-visited-mode
-   "Toggle automatic saving to file-visiting buffers on or off.
+   "Toggle automatic saving of file-visiting buffers to their files.
  
- When this mode is enabled, visited files are saved automatically.
- The user option `auto-save-visited-interval' controls how often.
+ When this mode is enabled, file-visiting buffers are automatically
+ saved to their files.  This is in contrast to `auto-save-mode', which
+ auto-saves those buffers to a separate file, leaving the original
+ file intact.  See Info node `Saving' for details of the save process.
  
- 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.
+ The user option `auto-save-visited-interval' controls how often to
+ auto-save a buffer into its visited file.
  
 +You can use `auto-save-visited-predicate' to control which
 +buffers are saved.
 +
  You can also set the buffer-local value of the variable
  `auto-save-visited-mode' to nil.  A buffer where the buffer-local
  value of this variable is nil is ignored for the purpose of
diff --cc lisp/simple.el
Simple merge