changeset 43067:858e5cbf508c

(uce-reply-to-uce): Prune the headers before copying the message text into the *mail* buffer, and restore the pruned state after that.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 02 Feb 2002 16:52:49 +0000
parents 5be5677eb18e
children ddfa98341413
files lisp/mail/uce.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/uce.el	Sat Feb 02 16:29:06 2002 +0000
+++ b/lisp/mail/uce.el	Sat Feb 02 16:52:49 2002 +0000
@@ -222,10 +222,15 @@
 	 (cond ((eq uce-mail-reader 'gnus) gnus-original-article-buffer)
 	       ((eq uce-mail-reader 'rmail) "RMAIL")
 	       (t (error 
-		   "Variable uce-mail-reader set to unrecognized value")))))
+		   "Variable uce-mail-reader set to unrecognized value"))))
+	(full-header-p (and (eq uce-mail-reader 'rmail)
+			    (not (rmail-msg-is-pruned)))))
     (or (get-buffer message-buffer)
 	(error (concat "No buffer " message-buffer ", cannot find UCE")))
     (switch-to-buffer message-buffer)
+    ;; We need the message with headers pruned.
+    (if full-header-p
+	(rmail-toggle-header 1))
     (let ((to (mail-strip-quoted-names (mail-fetch-field "from" t)))
 	  (reply-to (mail-fetch-field "reply-to"))
 	  temp)
@@ -254,6 +259,9 @@
 		 (rmail-maybe-set-message-counters)
 		 (copy-region-as-kill (rmail-msgbeg rmail-current-message) 
 				      (rmail-msgend rmail-current-message))))))
+      ;; Restore the pruned header state we found.
+      (if full-header-p
+	  (rmail-toggle-header 0))
       (switch-to-buffer "*mail*")
       (erase-buffer)
       (setq temp (point))