diff options
| author | Miles Bader | 2007-05-29 23:19:17 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-05-29 23:19:17 +0000 |
| commit | 46646c110cf434c03ae0ad135f7c3039a623e505 (patch) | |
| tree | ecd20d67778f7f60a1a17087ac68283fcdebb1e5 | |
| parent | de74fffc15669277577963995cadcfe3189dc3f6 (diff) | |
| parent | dafea68ca287907d4ad3f76b3064ad4de8abf7f8 (diff) | |
| download | emacs-46646c110cf434c03ae0ad135f7c3039a623e505.tar.gz emacs-46646c110cf434c03ae0ad135f7c3039a623e505.zip | |
Merge from emacs--rel--22, gnus--rel--5.10
Patches applied:
* emacs--rel--22 (patch 28)
- Update from CVS
* gnus--rel--5.10 (patch 224-225)
- Merge from emacs--devo--0, emacs--rel--22
- Update from CVS
2007-05-28 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/message.el (message-pop-to-buffer): Add switch-function argument.
(message-mail): Pass switch-function argument to it.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-777
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9f4df39957f..631869e4f34 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-05-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * message.el (message-pop-to-buffer): Add switch-function argument. | ||
| 4 | (message-mail): Pass switch-function argument to it. | ||
| 5 | |||
| 1 | 2007-05-24 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2007-05-24 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 7 | ||
| 3 | * message.el (message-narrow-to-headers-or-head): Ignore | 8 | * message.el (message-narrow-to-headers-or-head): Ignore |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 432bd69b67f..eef854f4fb7 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -5576,7 +5576,7 @@ between beginning of field and beginning of line." | |||
| 5576 | 'car-less-than-car))) | 5576 | 'car-less-than-car))) |
| 5577 | new))))) | 5577 | new))))) |
| 5578 | 5578 | ||
| 5579 | (defun message-pop-to-buffer (name) | 5579 | (defun message-pop-to-buffer (name &optional switch-function) |
| 5580 | "Pop to buffer NAME, and warn if it already exists and is modified." | 5580 | "Pop to buffer NAME, and warn if it already exists and is modified." |
| 5581 | (let ((buffer (get-buffer name))) | 5581 | (let ((buffer (get-buffer name))) |
| 5582 | (if (and buffer | 5582 | (if (and buffer |
| @@ -5587,14 +5587,16 @@ between beginning of field and beginning of line." | |||
| 5587 | (progn | 5587 | (progn |
| 5588 | (gnus-select-frame-set-input-focus (window-frame window)) | 5588 | (gnus-select-frame-set-input-focus (window-frame window)) |
| 5589 | (select-window window)) | 5589 | (select-window window)) |
| 5590 | (set-buffer (pop-to-buffer buffer))) | 5590 | (funcall (or switch-function 'pop-to-buffer) buffer) |
| 5591 | (set-buffer buffer)) | ||
| 5591 | (when (and (buffer-modified-p) | 5592 | (when (and (buffer-modified-p) |
| 5592 | (not (prog1 | 5593 | (not (prog1 |
| 5593 | (y-or-n-p | 5594 | (y-or-n-p |
| 5594 | "Message already being composed; erase? ") | 5595 | "Message already being composed; erase? ") |
| 5595 | (message nil)))) | 5596 | (message nil)))) |
| 5596 | (error "Message being composed"))) | 5597 | (error "Message being composed"))) |
| 5597 | (set-buffer (pop-to-buffer name))) | 5598 | (funcall (or switch-function 'pop-to-buffer) name) |
| 5599 | (set-buffer name)) | ||
| 5598 | (erase-buffer) | 5600 | (erase-buffer) |
| 5599 | (message-mode))) | 5601 | (message-mode))) |
| 5600 | 5602 | ||
| @@ -5831,15 +5833,15 @@ is a function used to switch to and display the mail buffer." | |||
| 5831 | (interactive) | 5833 | (interactive) |
| 5832 | (let ((message-this-is-mail t) replybuffer) | 5834 | (let ((message-this-is-mail t) replybuffer) |
| 5833 | (unless (message-mail-user-agent) | 5835 | (unless (message-mail-user-agent) |
| 5834 | (funcall | 5836 | (message-pop-to-buffer |
| 5835 | (or switch-function 'message-pop-to-buffer) | ||
| 5836 | ;; Search for the existing message buffer if `continue' is non-nil. | 5837 | ;; Search for the existing message buffer if `continue' is non-nil. |
| 5837 | (let ((message-generate-new-buffers | 5838 | (let ((message-generate-new-buffers |
| 5838 | (when (or (not continue) | 5839 | (when (or (not continue) |
| 5839 | (eq message-generate-new-buffers 'standard) | 5840 | (eq message-generate-new-buffers 'standard) |
| 5840 | (functionp message-generate-new-buffers)) | 5841 | (functionp message-generate-new-buffers)) |
| 5841 | message-generate-new-buffers))) | 5842 | message-generate-new-buffers))) |
| 5842 | (message-buffer-name "mail" to)))) | 5843 | (message-buffer-name "mail" to)) |
| 5844 | switch-function)) | ||
| 5843 | ;; FIXME: message-mail should do something if YANK-ACTION is not | 5845 | ;; FIXME: message-mail should do something if YANK-ACTION is not |
| 5844 | ;; insert-buffer. | 5846 | ;; insert-buffer. |
| 5845 | (and (consp yank-action) (eq (car yank-action) 'insert-buffer) | 5847 | (and (consp yank-action) (eq (car yank-action) 'insert-buffer) |