aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1998-06-28 18:57:51 +0000
committerRichard M. Stallman <[email protected]>1998-06-28 18:57:51 +0000
commit2e78575e5c17f6e94c4cc1562be342e3233d1809 (patch)
tree0be23b5134f95933e296635e02a64c5b9520bca8 /lisp
parent781f7ac28162e3d45b1f59bd132b84faefb1e48f (diff)
(mail): Avoid changing auto-save file name.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/sendmail.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 84a2c5a792..4b36b2d2e9 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1346,7 +1346,10 @@ The seventh argument ACTIONS is a list of actions to take
;; 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*).