Subject: bug#5572 closed by Teemu Likonen <[email-masked]> (Re: bug#5572: 23.1; Undocumented key :value-to-internal in customize system)

From: [email-masked] (Emacs bug Tracking System)
Date: Sat, 13 Feb 2010 20:00:03 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#5572: 23.1; Undocumented key :value-to-internal in customize system

It has been closed by Teemu Likonen <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Teemu Likonen <[email-masked]> by
replying to this email.

-- 
5572: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5572
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#5572: 23.1; Undocumented key :value-to-internal in customize system
From: Teemu Likonen <[email-masked]>
To: Glenn Morris <[email-masked]>
Cc: [email-masked]
Date: Sat, 13 Feb 2010 21:59:51 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* 2010-02-13 14:21 (-0500), Glenn Morris wrote:

> Teemu Likonen wrote:
>
>> :value-to-internal key doesn't seem to be documented anywhere so I
>> consider this a documentation bug.
>
> Custom uses the widget library, and this is documented in widget.texi.

Ah, thanks for the info. I didn't know about the Widget library at all.

Well, I'll just close this bug then.

Subject: 23.1; Undocumented key :value-to-internal in customize system
From: Teemu Likonen <[email-masked]>
To: [email-masked]
Date: Sat, 13 Feb 2010 11:36:01 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Some customize options use key :value-to-internal with customize type
"repeat". One example is variable message-ignored-news-headers in
lisp/gnus/message.el:

(defcustom message-ignored-news-headers
  "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc: [...]
  "*Regexp of headers to be removed unconditionally before posting."
  :group 'message-news
  :group 'message-headers
  :link '(custom-manual "(message)Message Headers")
  :type '(repeat :value-to-internal (lambda (widget value)
				      (custom-split-regexp-maybe value))
		 :match (lambda (widget value)
			  (or (stringp value)
			      (widget-editable-list-match widget value)))
		 regexp))

(I cut one long line and added ellipsis "[...]".)

:value-to-internal key doesn't seem to be documented anywhere so I
consider this a documentation bug. Please add a description for the key
- perhaps to the info node "(elisp) Type Keywords" - because it seems
very useful for Emacs extension writers.