From: Reiner Steib Date: Sun, 17 Oct 2004 17:51:35 +0000 (+0000) Subject: * gnus-art.el (gnus-copy-article-ignored-headers): New variable. X-Git-Url: https://cgit.sxemacs.org/?a=commitdiff_plain;h=ca4151407a829cf61da1d368ddaa6975ef77658d;hp=cea20f9d24a22f71c2a7ad4f92e5d0fdc7e4af44;p=gnus * gnus-art.el (gnus-copy-article-ignored-headers): New variable. * gnus-sum.el (gnus-summary-move-article): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 309a51943..910216787 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-17 Reiner Steib + + * gnus-art.el (gnus-copy-article-ignored-headers): New variable. + + * gnus-sum.el (gnus-summary-move-article): Use it. + 2004-10-15 Teodor Zlatanov * spam.el (spam-backend-article-list-property) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index f4825d623..cf09c665f 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -564,6 +564,15 @@ The following additional specs are available: :type 'hook :group 'gnus-article-various) +(defcustom gnus-copy-article-ignored-headers '("Xref") + "List of headers to be removed when copying an article. +Each element is a regular expression." + :version "22.0" ;; No Gnus + :type '(choice :custom-show nil + regexp + (repeat regexp)) + :group 'gnus-article-various) + (make-obsolete-variable 'gnus-article-hide-pgp-hook "This variable is obsolete in Gnus 5.10.") diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 1a627d0b4..c3457880c 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9018,6 +9018,10 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (save-excursion (set-buffer copy-buf) (when (gnus-request-article-this-buffer article gnus-newsgroup-name) + (save-restriction + (nnheader-narrow-to-headers) + (dolist (hdr gnus-copy-article-ignored-headers) + (message-remove-header hdr t))) (gnus-request-accept-article to-newsgroup select-method (not articles) t)))) ;; Crosspost the article.