From 87f5158801fa1d613fe5b26e11123b264bca596f Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 14 Apr 2000 03:40:57 +0000 Subject: [PATCH] (gnus-summary-yank-message): Rewrite for the use of the separated message frames; use `gnus-copy-article-buffer'. --- lisp/gnus-msg.el | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 270f800..4abb7dc 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -988,13 +988,33 @@ If YANK is non-nil, include the original article." (interactive (list (completing-read "Buffer: " (mapcar 'list (message-buffers)) nil t) current-prefix-arg)) - (gnus-summary-iterate n - (let ((gnus-display-mime-function nil) - (gnus-inhibit-treatment t)) - (gnus-summary-select-article)) - (save-excursion - (set-buffer buffer) - (message-yank-buffer gnus-article-buffer)))) + (when (gnus-buffer-live-p buffer) + (let ((summary-frame (selected-frame)) + (message-frame (when (static-if (featurep 'xemacs) + (device-on-window-system-p) + window-system) + (let ((window (get-buffer-window buffer t))) + (when window + (window-frame window))))) + (separator (concat "^" (regexp-quote mail-header-separator) + "\n"))) + (gnus-summary-iterate n + (gnus-summary-select-article) + (gnus-copy-article-buffer) + (when (frame-live-p message-frame) + (raise-frame message-frame) + (select-frame message-frame)) + (with-current-buffer buffer + (when (save-excursion + (beginning-of-line) + (let (case-fold-search) + (and (not (re-search-backward separator nil t)) + (re-search-forward separator nil t)))) + (goto-char (match-end 0))) + (message-yank-buffer gnus-article-copy)) + (select-frame summary-frame)) + (when (frame-live-p message-frame) + (select-frame message-frame))))) (defun gnus-debug () "Attempts to go through the Gnus source file and report what variables have been changed. -- 1.7.10.4