257 |
which is the standard way to delimit a signature in a message.) |
which is the standard way to delimit a signature in a message.) |
258 |
Otherwise, it should be an expression; it is evaluated |
Otherwise, it should be an expression; it is evaluated |
259 |
and should insert whatever you want to insert." |
and should insert whatever you want to insert." |
260 |
:type '(choice (const "None" nil) |
:type '(choice (const :tag "None" nil) |
261 |
(const :tag "Use `.signature' file" t) |
(const :tag "Use `.signature' file" t) |
262 |
(string :tag "String to insert") |
(string :tag "String to insert") |
263 |
(sexp :tag "Expression to evaluate")) |
(sexp :tag "Expression to evaluate")) |
269 |
:type 'file |
:type 'file |
270 |
:group 'sendmail) |
:group 'sendmail) |
271 |
|
|
272 |
|
;;;###autoload |
273 |
|
(defcustom mail-default-directory "~/" |
274 |
|
"*Directory for mail buffers. |
275 |
|
Value of `default-directory' for mail buffers. |
276 |
|
This directory is used for auto-save files of mail buffers." |
277 |
|
:type '(directory :tag "Directory") |
278 |
|
:group 'sendmail) |
279 |
|
|
280 |
(defvar mail-reply-action nil) |
(defvar mail-reply-action nil) |
281 |
(defvar mail-send-actions nil |
(defvar mail-send-actions nil |
282 |
"A list of actions to be performed upon successful sending of a message.") |
"A list of actions to be performed upon successful sending of a message.") |
1521 |
;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) |
;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) |
1522 |
;;; t)) |
;;; t)) |
1523 |
(pop-to-buffer "*mail*") |
(pop-to-buffer "*mail*") |
1524 |
;; Put the auto-save file in the home dir |
;; Avoid danger that the auto-save file can't be written. |
1525 |
;; to avoid any danger that it can't be written. |
(let ((dir (expand-file-name |
1526 |
(if (file-exists-p (expand-file-name "~/")) |
(file-name-as-directory mail-default-directory)))) |
1527 |
(setq default-directory (expand-file-name "~/"))) |
(if (file-exists-p dir) |
1528 |
|
(setq default-directory dir))) |
1529 |
;; Only call auto-save-mode if necessary, to avoid changing auto-save file. |
;; Only call auto-save-mode if necessary, to avoid changing auto-save file. |
1530 |
(if (or (and auto-save-default (not buffer-auto-save-file-name)) |
(if (or (and auto-save-default (not buffer-auto-save-file-name)) |
1531 |
(and (not auto-save-default) buffer-auto-save-file-name)) |
(and (not auto-save-default) buffer-auto-save-file-name)) |
1572 |
(setq non-random-len |
(setq non-random-len |
1573 |
(- (length file-name) (length (make-temp-name "")) 1)) |
(- (length file-name) (length (make-temp-name "")) 1)) |
1574 |
(setq wildcard (concat (substring file-name 0 non-random-len) "*")) |
(setq wildcard (concat (substring file-name 0 non-random-len) "*")) |
|
(debug) |
|
1575 |
(if (null (file-expand-wildcards wildcard)) |
(if (null (file-expand-wildcards wildcard)) |
1576 |
(message "There are no auto-saved drafts to recover") |
(message "There are no auto-saved drafts to recover") |
1577 |
;; Bind dired-trivial-filenames to t because all auto-save file |
;; Bind dired-trivial-filenames to t because all auto-save file |
1641 |
(switch-to-buffer "*mail*") |
(switch-to-buffer "*mail*") |
1642 |
;; If *mail* didn't exist, set its directory, so that auto-saved |
;; If *mail* didn't exist, set its directory, so that auto-saved |
1643 |
;; drafts will be found. |
;; drafts will be found. |
1644 |
(if (file-exists-p (expand-file-name "~/")) |
(let ((dir (expand-file-name |
1645 |
(setq default-directory "~/")) |
(file-name-as-directory mail-default-directory)))) |
1646 |
|
(if (file-exists-p dir) |
1647 |
|
(setq default-directory dir))) |
1648 |
(or (eq major-mode 'mail-mode) |
(or (eq major-mode 'mail-mode) |
1649 |
(mail-mode)) |
(mail-mode)) |
1650 |
(let ((file-name buffer-auto-save-file-name)) |
(let ((file-name buffer-auto-save-file-name)) |