@item message-forward-included-headers
@vindex message-forward-included-headers
In non-@code{nil}, only headers that match this regexp will be kept
-when forwarding a message.
+when forwarding a message. This can also be a list of regexps.
@item message-make-forward-subject-function
@vindex message-make-forward-subject-function
'"foo@bar.com" <foo@bar.com>', Message will elide the repeated "name"
from the address field in the response.
+---
*** The default of 'message-forward-as-mime' has changed from t to nil
as it has been reported that many recipients can't read forwards that
are formatted as MIME digests.
++++
+*** `message-forward-included-headers' has changed its default to
+exclude most headers when forwarding.
+
* New Modes and Packages in Emacs 27.1
+++
(widget-editable-list-match widget value)))
regexp))
-(defcustom message-forward-included-headers nil
+(defcustom message-forward-included-headers
+ '("^From:" "^Subject:" "^Date:")
"If non-nil, delete non-matching headers when forwarding a message.
Only headers that match this regexp will be included. This
variable should be a regexp or a list of regexps."
- :version "25.1"
+ :version "27.1"
:group 'message-forwarding
:type '(repeat :value-to-internal (lambda (widget value)
(custom-split-regexp-maybe value))
(when message-forward-included-headers
(message-remove-header
(if (listp message-forward-included-headers)
- (regexp-opt message-forward-included-headers)
+ (mapconcat #'identity (cons "^$" message-forward-included-headers)
+ "\\|")
message-forward-included-headers)
t nil t)))))