aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/message.texi2
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/gnus/message.el8
3 files changed, 11 insertions, 4 deletions
diff --git a/doc/misc/message.texi b/doc/misc/message.texi
index 1d27ff1c585..671a5214aec 100644
--- a/doc/misc/message.texi
+++ b/doc/misc/message.texi
@@ -316,7 +316,7 @@ when forwarding a message.
316@item message-forward-included-headers 316@item message-forward-included-headers
317@vindex message-forward-included-headers 317@vindex message-forward-included-headers
318In non-@code{nil}, only headers that match this regexp will be kept 318In non-@code{nil}, only headers that match this regexp will be kept
319when forwarding a message. 319when forwarding a message. This can also be a list of regexps.
320 320
321@item message-make-forward-subject-function 321@item message-make-forward-subject-function
322@vindex message-make-forward-subject-function 322@vindex message-make-forward-subject-function
diff --git a/etc/NEWS b/etc/NEWS
index 5416cb7c215..ca46c88ce62 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -425,10 +425,15 @@ achieve this, add 'message-sign-encrypt-if-all-keys-available' to
425'"foo@bar.com" <foo@bar.com>', Message will elide the repeated "name" 425'"foo@bar.com" <foo@bar.com>', Message will elide the repeated "name"
426from the address field in the response. 426from the address field in the response.
427 427
428---
428*** The default of 'message-forward-as-mime' has changed from t to nil 429*** The default of 'message-forward-as-mime' has changed from t to nil
429as it has been reported that many recipients can't read forwards that 430as it has been reported that many recipients can't read forwards that
430are formatted as MIME digests. 431are formatted as MIME digests.
431 432
433+++
434*** `message-forward-included-headers' has changed its default to
435exclude most headers when forwarding.
436
432* New Modes and Packages in Emacs 27.1 437* New Modes and Packages in Emacs 27.1
433 438
434+++ 439+++
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 33c5e2cedbf..867c3d271b6 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -625,11 +625,12 @@ This may also be a list of regexps."
625 (widget-editable-list-match widget value))) 625 (widget-editable-list-match widget value)))
626 regexp)) 626 regexp))
627 627
628(defcustom message-forward-included-headers nil 628(defcustom message-forward-included-headers
629 '("^From:" "^Subject:" "^Date:")
629 "If non-nil, delete non-matching headers when forwarding a message. 630 "If non-nil, delete non-matching headers when forwarding a message.
630Only headers that match this regexp will be included. This 631Only headers that match this regexp will be included. This
631variable should be a regexp or a list of regexps." 632variable should be a regexp or a list of regexps."
632 :version "25.1" 633 :version "27.1"
633 :group 'message-forwarding 634 :group 'message-forwarding
634 :type '(repeat :value-to-internal (lambda (widget value) 635 :type '(repeat :value-to-internal (lambda (widget value)
635 (custom-split-regexp-maybe value)) 636 (custom-split-regexp-maybe value))
@@ -7436,7 +7437,8 @@ Optional DIGEST will use digest to forward."
7436 (when message-forward-included-headers 7437 (when message-forward-included-headers
7437 (message-remove-header 7438 (message-remove-header
7438 (if (listp message-forward-included-headers) 7439 (if (listp message-forward-included-headers)
7439 (regexp-opt message-forward-included-headers) 7440 (mapconcat #'identity (cons "^$" message-forward-included-headers)
7441 "\\|")
7440 message-forward-included-headers) 7442 message-forward-included-headers)
7441 t nil t))))) 7443 t nil t)))))
7442 7444