changeset 22634:0a83ee212349

(mail): Avoid changing auto-save file name.
author Richard M. Stallman <rms@gnu.org>
date Sun, 28 Jun 1998 18:57:51 +0000
parents 3da8188c31a3
children 1e9786a5c63d
files lisp/mail/sendmail.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Sun Jun 28 02:15:12 1998 +0000
+++ b/lisp/mail/sendmail.el	Sun Jun 28 18:57:51 1998 +0000
@@ -1346,7 +1346,10 @@
   ;; to avoid any danger that it can't be written.
   (if (file-exists-p (expand-file-name "~/"))
       (setq default-directory (expand-file-name "~/")))
-  (auto-save-mode auto-save-default)
+  ;; Only call auto-save-mode if necessary, to avoid changing auto-save file.
+  (if (or (and auto-save-default (not buffer-auto-save-file-name))
+          (and (not auto-save-default) buffer-auto-save-file-name))
+      (auto-save-mode auto-save-default))
   (mail-mode)
   ;; Disconnect the buffer from its visited file
   ;; (in case the user has actually visited a file *mail*).