changeset 81096:ea2eb6e6874e

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
author Miles Bader <miles@gnu.org>
date Tue, 29 May 2007 23:19:17 +0000
parents b06b28e4c0b3 (current diff) 7abeffb8f06b (diff)
children b4da44959c38
files lisp/gnus/ChangeLog lisp/gnus/message.el
diffstat 2 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Tue May 29 16:24:25 2007 +0000
+++ b/lisp/gnus/ChangeLog	Tue May 29 23:19:17 2007 +0000
@@ -1,3 +1,8 @@
+2007-05-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* message.el (message-pop-to-buffer): Add switch-function argument.
+	(message-mail): Pass switch-function argument to it.
+
 2007-05-24  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* message.el (message-narrow-to-headers-or-head): Ignore
--- a/lisp/gnus/message.el	Tue May 29 16:24:25 2007 +0000
+++ b/lisp/gnus/message.el	Tue May 29 23:19:17 2007 +0000
@@ -5576,7 +5576,7 @@
 	     'car-less-than-car)))
 	  new)))))
 
-(defun message-pop-to-buffer (name)
+(defun message-pop-to-buffer (name &optional switch-function)
   "Pop to buffer NAME, and warn if it already exists and is modified."
   (let ((buffer (get-buffer name)))
     (if (and buffer
@@ -5587,14 +5587,16 @@
 	      (progn
 		(gnus-select-frame-set-input-focus (window-frame window))
 		(select-window window))
-	    (set-buffer (pop-to-buffer buffer)))
+	    (funcall (or switch-function 'pop-to-buffer) buffer)
+	    (set-buffer buffer))
 	  (when (and (buffer-modified-p)
 		     (not (prog1
 			      (y-or-n-p
 			       "Message already being composed; erase? ")
 			    (message nil))))
 	    (error "Message being composed")))
-      (set-buffer (pop-to-buffer name)))
+      (funcall (or switch-function 'pop-to-buffer) name)
+      (set-buffer name))
     (erase-buffer)
     (message-mode)))
 
@@ -5831,15 +5833,15 @@
   (interactive)
   (let ((message-this-is-mail t) replybuffer)
     (unless (message-mail-user-agent)
-      (funcall
-       (or switch-function 'message-pop-to-buffer)
+      (message-pop-to-buffer
        ;; Search for the existing message buffer if `continue' is non-nil.
        (let ((message-generate-new-buffers
 	      (when (or (not continue)
 			(eq message-generate-new-buffers 'standard)
 			(functionp message-generate-new-buffers))
 		message-generate-new-buffers)))
-	 (message-buffer-name "mail" to))))
+	 (message-buffer-name "mail" to))
+       switch-function))
     ;; FIXME: message-mail should do something if YANK-ACTION is not
     ;; insert-buffer.
     (and (consp yank-action) (eq (car yank-action) 'insert-buffer)