aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/mail/sendmail.el26
2 files changed, 25 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb5a3ccb263..a040e6f505f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12002-05-20 Markus Rost <rost@math.ohio-state.edu>
2
3 * mail/sendmail.el (mail-recover-1): Remove (debug).
4 (mail-signature): Fix :type.
5 (mail-default-directory): New user option.
6 (mail, mail-recover): Use that option.
7
12002-05-20 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> 82002-05-20 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
2 9
3 * international/mule.el (auto-coding-alist): Use emacs-mule 10 * international/mule.el (auto-coding-alist): Use emacs-mule
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 82ef70c0f21..5fbb6558775 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -257,7 +257,7 @@ If a string, that string is inserted.
257 which is the standard way to delimit a signature in a message.) 257 which is the standard way to delimit a signature in a message.)
258Otherwise, it should be an expression; it is evaluated 258Otherwise, it should be an expression; it is evaluated
259and should insert whatever you want to insert." 259and should insert whatever you want to insert."
260 :type '(choice (const "None" nil) 260 :type '(choice (const :tag "None" nil)
261 (const :tag "Use `.signature' file" t) 261 (const :tag "Use `.signature' file" t)
262 (string :tag "String to insert") 262 (string :tag "String to insert")
263 (sexp :tag "Expression to evaluate")) 263 (sexp :tag "Expression to evaluate"))
@@ -269,6 +269,14 @@ and should insert whatever you want to insert."
269 :type 'file 269 :type 'file
270 :group 'sendmail) 270 :group 'sendmail)
271 271
272;;;###autoload
273(defcustom mail-default-directory "~/"
274 "*Directory for mail buffers.
275Value of `default-directory' for mail buffers.
276This directory is used for auto-save files of mail buffers."
277 :type '(directory :tag "Directory")
278 :group 'sendmail)
279
272(defvar mail-reply-action nil) 280(defvar mail-reply-action nil)
273(defvar mail-send-actions nil 281(defvar mail-send-actions nil
274 "A list of actions to be performed upon successful sending of a message.") 282 "A list of actions to be performed upon successful sending of a message.")
@@ -1513,10 +1521,11 @@ The seventh argument ACTIONS is a list of actions to take
1513;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) 1521;;; (message "Auto save file for draft message exists; consider M-x mail-recover"))
1514;;; t)) 1522;;; t))
1515 (pop-to-buffer "*mail*") 1523 (pop-to-buffer "*mail*")
1516 ;; Put the auto-save file in the home dir 1524 ;; Avoid danger that the auto-save file can't be written.
1517 ;; to avoid any danger that it can't be written. 1525 (let ((dir (expand-file-name
1518 (if (file-exists-p (expand-file-name "~/")) 1526 (file-name-as-directory mail-default-directory))))
1519 (setq default-directory (expand-file-name "~/"))) 1527 (if (file-exists-p dir)
1528 (setq default-directory dir)))
1520 ;; Only call auto-save-mode if necessary, to avoid changing auto-save file. 1529 ;; Only call auto-save-mode if necessary, to avoid changing auto-save file.
1521 (if (or (and auto-save-default (not buffer-auto-save-file-name)) 1530 (if (or (and auto-save-default (not buffer-auto-save-file-name))
1522 (and (not auto-save-default) buffer-auto-save-file-name)) 1531 (and (not auto-save-default) buffer-auto-save-file-name))
@@ -1563,7 +1572,6 @@ The seventh argument ACTIONS is a list of actions to take
1563 (setq non-random-len 1572 (setq non-random-len
1564 (- (length file-name) (length (make-temp-name "")) 1)) 1573 (- (length file-name) (length (make-temp-name "")) 1))
1565 (setq wildcard (concat (substring file-name 0 non-random-len) "*")) 1574 (setq wildcard (concat (substring file-name 0 non-random-len) "*"))
1566 (debug)
1567 (if (null (file-expand-wildcards wildcard)) 1575 (if (null (file-expand-wildcards wildcard))
1568 (message "There are no auto-saved drafts to recover") 1576 (message "There are no auto-saved drafts to recover")
1569 ;; Bind dired-trivial-filenames to t because all auto-save file 1577 ;; Bind dired-trivial-filenames to t because all auto-save file
@@ -1633,8 +1641,10 @@ you can move to one of them and type C-c C-c to recover that one."
1633 (switch-to-buffer "*mail*") 1641 (switch-to-buffer "*mail*")
1634 ;; If *mail* didn't exist, set its directory, so that auto-saved 1642 ;; If *mail* didn't exist, set its directory, so that auto-saved
1635 ;; drafts will be found. 1643 ;; drafts will be found.
1636 (if (file-exists-p (expand-file-name "~/")) 1644 (let ((dir (expand-file-name
1637 (setq default-directory "~/")) 1645 (file-name-as-directory mail-default-directory))))
1646 (if (file-exists-p dir)
1647 (setq default-directory dir)))
1638 (or (eq major-mode 'mail-mode) 1648 (or (eq major-mode 'mail-mode)
1639 (mail-mode)) 1649 (mail-mode))
1640 (let ((file-name buffer-auto-save-file-name)) 1650 (let ((file-name buffer-auto-save-file-name))