changeset 3630:68ed205fc50e

(basic-save-buffer): Cal auto-save-mode with t as arg if and only if auto save was off and default is on. (set-visited-file-name): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Thu, 10 Jun 1993 23:35:18 +0000
parents 58add805382e
children 0c063224b5d2
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Thu Jun 10 23:06:50 1993 +0000
+++ b/lisp/files.el	Thu Jun 10 23:35:18 1993 +0000
@@ -1086,7 +1086,8 @@
 	 (setq backup-inhibited t)))
   ;; If auto-save was not already on, turn it on if appropriate.
   (if (not buffer-auto-save-file-name)
-      (auto-save-mode (and buffer-file-name auto-save-default))
+      (and buffer-file-name auto-save-default
+	   (auto-save-mode t))
     ;; If auto save is on, start using a new name.
     ;; We deliberately don't rename or delete the old auto save
     ;; for the old visited file name.  This is because perhaps
@@ -1381,7 +1382,8 @@
 	      (setq buffer-file-name
 		    (expand-file-name (read-file-name "File to save in: ") nil)
 		    default-directory (file-name-directory buffer-file-name))
-	      (auto-save-mode auto-save-default)))
+	      (and auto-save-default (not buffer-auto-save-file-name)
+		   (auto-save-mode t))))
 	(or (verify-visited-file-modtime (current-buffer))
 	    (not (file-exists-p buffer-file-name))
 	    (yes-or-no-p