diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index a2a2652..b44942b 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1890,7 +1890,11 @@ this is a reply." (setq v (cond ((stringp value) - value) + (if (and (stringp match) + (string-match-p "\\\\[&[:digit:]]" value) + (match-beginning 1)) + (match-substitute-replacement value nil nil group) + value)) ((or (symbolp value) (functionp value)) (cond ((functionp value) diff --git a/texi/gnus.texi b/texi/gnus.texi index 688d56f..b1ce15e 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -13459,14 +13459,20 @@ the headers of the article; if the value is @code{nil}, the header name will be removed. If the attribute name is @code{eval}, the form is evaluated, and the result is thrown away. -The attribute value can be a string (used verbatim), a function with -zero arguments (the return value will be used), a variable (its value -will be used) or a list (it will be @code{eval}ed and the return value -will be used). The functions and sexps are called/@code{eval}ed in the -message buffer that is being set up. The headers of the current article -are available through the @code{message-reply-headers} variable, which -is a vector of the following headers: number subject from date id -references chars lines xref extra. +The attribute value can be a string, a function with zero arguments +(the return value will be used), a variable (its value will be used) +or a list (it will be @code{eval}ed and the return value will be +used). The functions and sexps are called/@code{eval}ed in the +message buffer that is being set up. The headers of the current +article are available through the @code{message-reply-headers} +variable, which is a vector of the following headers: number subject +from date id references chars lines xref extra. + +In the case of a string value, if the @code{match} is a regular +expression, a @samp{match-substitute-replacement} is proceed on the +value to replace the positional parameters @samp{\@var{n}} by the +corresponding parenthetical matches (see @xref{Replacing the Text that +Matched, , Text Replacement, elisp, The Emacs Lisp Reference Manual}.) @vindex message-reply-headers