diff options
-rw-r--r-- | doc/misc/message.texi | 2 | ||||
-rw-r--r-- | etc/NEWS | 5 | ||||
-rw-r--r-- | lisp/gnus/message.el | 8 |
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. @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 @@ -425,10 +425,15 @@ achieve this, add 'message-sign-encrypt-if-all-keys-available' to '"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 +++ 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." (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)) @@ -7436,7 +7437,8 @@ Optional DIGEST will use digest to forward." (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))))) |