Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: ding@gnus.org
Subject: Allow message-default-headers to be a function (was: [gnus git]  branch master updated: =1= message: Allow message-default-headers to be a function)
Date: Sat, 23 Oct 2010 17:40:51 +0200	[thread overview]
Message-ID: <87aam4ncho.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <E1P8v0c-0006f5-00@quimby.gnus.org> (Julien Danjou's message of "Thu, 21 Oct 2010 15:16:42 +0200")

> +2010-10-21  Julien Danjou  <julien@danjou.info>
> +
> +	* message.el (message-setup-1): Allow message-default-headers to be a
> +	function.
> +

> --- a/lisp/message.el
> +++ b/lisp/message.el
> @@ -1183,9 +1183,10 @@ It is a vector of the following headers:
>    :error "All header lines must be newline terminated")
>
>  (defcustom message-default-headers ""
> -  "*A string containing header lines to be inserted in outgoing messages.
> -It is inserted before you edit the message, so you can edit or delete
> -these lines."
> +  "A string containing header lines to be inserted in outgoing messages.
> +It is inserted before you edit the message, so you can edit or
> +delete these lines.  If set to a function, it is called and its
> +result is inserted."

If it can be a string or a function, the first line of the doc string
should not say "A string".  Same for the manual:

> --- a/texi/message.texi
> +++ b/texi/message.texi
> @@ -1451,7 +1451,7 @@ Allegedly.
>  @item message-default-headers
>  @vindex message-default-headers
>  This string is inserted at the end of the headers in all message
> -buffers.
> +buffers.  If set to a function, the returned results is inserted.

,----
| (defcustom message-default-headers ""
|   "A string containing header lines to be inserted in outgoing messages.
| It is inserted before you edit the message, so you can edit or
| delete these lines.  If set to a function, it is called and its
| result is inserted."
|   :version "23.2"
|   :group 'message-headers
|   :link '(custom-manual "(message)Message Headers")
|   :type 'message-header-lines)
`----

The custom type is wrong now, isn't it?  Could you fix it, please?

> --- a/todo
> +++ b/todo
[...]
> -*  allow message-default-headers to be a function.
> -

Could you explain why it is useful?  Is there another reason than "it
was listed in todo"?  ;-)

What about `message-default-mail-headers' and
`message-default-news-headers'?  Should they be changed as well?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



       reply	other threads:[~2010-10-23 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1P8v0c-0006f5-00@quimby.gnus.org>
2010-10-23 15:40 ` Reiner Steib [this message]
2010-10-24 15:26   ` Allow message-default-headers to be a function Julien Danjou
2010-10-25 18:26     ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aam4ncho.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).