mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
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
This commit is contained in:
commit
46646c110c
@ -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
|
||||
|
@ -5576,7 +5576,7 @@ between beginning of field and beginning of line."
|
||||
'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 @@ between beginning of field and beginning of line."
|
||||
(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 @@ is a function used to switch to and display the mail buffer."
|
||||
(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)
|
||||
|
Loading…
Reference in New Issue
Block a user