diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea8039d7c2f..f9abe4ca871 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-09-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * mail/sendmail.el (mail): Use new buffer if `noerase' argument is | ||
| 4 | `new'. | ||
| 5 | |||
| 1 | 2005-09-12 Richard M. Stallman <rms@gnu.org> | 6 | 2005-09-12 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * font-lock.el (font-lock-keywords): Add autoload. | 8 | * font-lock.el (font-lock-keywords): Add autoload. |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index f5c34ff80ca..32328a33177 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -1591,8 +1591,13 @@ is inserted. | |||
| 1591 | The normal hook `mail-setup-hook' is run after the message is | 1591 | The normal hook `mail-setup-hook' is run after the message is |
| 1592 | initialized. It can add more default fields to the message. | 1592 | initialized. It can add more default fields to the message. |
| 1593 | 1593 | ||
| 1594 | When calling from a program, the first argument if non-nil says | 1594 | The first argument, NOERASE, determines what to do when there is |
| 1595 | not to erase the existing contents of the `*mail*' buffer. | 1595 | an existing modified `*mail*' buffer. If NOERASE is nil, the |
| 1596 | existing mail buffer is used, and the user is prompted whether to | ||
| 1597 | keep the old contents or to erase them. If NOERASE has the value | ||
| 1598 | `new', a new mail buffer will be created instead of using the old | ||
| 1599 | one. Any other non-nil value means to always select the old | ||
| 1600 | buffer without erasing the contents. | ||
| 1596 | 1601 | ||
| 1597 | The second through fifth arguments, | 1602 | The second through fifth arguments, |
| 1598 | TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil | 1603 | TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil |
| @@ -1649,7 +1654,11 @@ The seventh argument ACTIONS is a list of actions to take | |||
| 1649 | ;;; (file-exists-p buffer-auto-save-file-name)) | 1654 | ;;; (file-exists-p buffer-auto-save-file-name)) |
| 1650 | ;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) | 1655 | ;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) |
| 1651 | ;;; t)) | 1656 | ;;; t)) |
| 1652 | (pop-to-buffer "*mail*") | 1657 | |
| 1658 | (if (eq noerase 'new) | ||
| 1659 | (pop-to-buffer (generate-new-buffer "*mail*")) | ||
| 1660 | (pop-to-buffer "*mail*")) | ||
| 1661 | |||
| 1653 | ;; Avoid danger that the auto-save file can't be written. | 1662 | ;; Avoid danger that the auto-save file can't be written. |
| 1654 | (let ((dir (expand-file-name | 1663 | (let ((dir (expand-file-name |
| 1655 | (file-name-as-directory mail-default-directory)))) | 1664 | (file-name-as-directory mail-default-directory)))) |
| @@ -1664,7 +1673,8 @@ The seventh argument ACTIONS is a list of actions to take | |||
| 1664 | ;; (in case the user has actually visited a file *mail*). | 1673 | ;; (in case the user has actually visited a file *mail*). |
| 1665 | ; (set-visited-file-name nil) | 1674 | ; (set-visited-file-name nil) |
| 1666 | (let (initialized) | 1675 | (let (initialized) |
| 1667 | (and (not noerase) | 1676 | (and (or (not noerase) |
| 1677 | (eq noerase 'new)) | ||
| 1668 | (if buffer-file-name | 1678 | (if buffer-file-name |
| 1669 | (if (buffer-modified-p) | 1679 | (if (buffer-modified-p) |
| 1670 | (when (y-or-n-p "Buffer has unsaved changes; reinitialize it and discard them? ") | 1680 | (when (y-or-n-p "Buffer has unsaved changes; reinitialize it and discard them? ") |