From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38446 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: message-subject-re Date: 30 Aug 2001 16:17:25 +0200 Organization: The Church of Emacs Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174308 22486 80.91.224.250 (21 Oct 2002 04:25:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:25:08 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 27899 invoked from network); 30 Aug 2001 14:17:53 -0000 Original-Received: from sheridan.dina.kvl.dk (130.225.40.227) by gnus.org with SMTP; 30 Aug 2001 14:17:53 -0000 Original-Received: from ssv2.dina.kvl.dk (ssv2.dina.kvl.dk [130.225.40.226]) by sheridan.dina.kvl.dk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id QAA25351; Thu, 30 Aug 2001 16:17:25 +0200 Original-Received: from abraham by ssv2.dina.kvl.dk with local (Exim 3.12 #1 (Debian)) id 15cSdJ-0001Vw-00; Thu, 30 Aug 2001 16:17:25 +0200 Original-To: ding@gnus.org, emacs-custom@sunsite.dk X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ In-Reply-To: (Simon Josefsson's message of "Wed, 29 Aug 2001 21:51:45 +0200") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Original-Lines: 68 Xref: main.gmane.org gmane.emacs.gnus.general:38446 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38446 Simon Josefsson writes: > Simon Josefsson writes: > >> + :type '(radio (function-item message-strip-subject-re) >> + (function-item message-strip-list-identifiers) >> + (repeat :tag "List of functions" function))) > > This :type isn't perfect, replacing `radio' with `checklist' would be > better (if `checklist' existed..), but the following seem to be as > close as you can get: > > :type '(repeat :tag "List of functions" function)) What do you mean "if `checklist' existed.."? There exists a widget named 'checklist', although 'set' would be more appropriate for a top level customize type. However, a checklist isn't expandable. It would be tempting to give the option the 'hook' type, which would work perfectly... except that it would be a lie, hook functions doesn't take arguments. The correct solution would probably be to create an 'expandable-list' widget, which mimics the 'alist' and 'plist' widgets, and derive 'function-list' and 'hook' from that. Someone remind me of that when Emacs 21 is released. For now, do it by hand. Here is an example. (defcustom message-make-re-subject-functions '(message-strip-list-identifiers message-strip-subject-re message-add-subject-re) "List of functions called to massage subject lines when replying. The subject generated by the previous function is passed into each successive function. The provided functions (which both are used by default) are: * `message-strip-list-identifiers' (Removes `gnus-list-identifiers'.) * `message-strip-subject-re' (Removes `message-subject-re-regexp'.) * `message-add-subject-re' (Prepends \"Re: \".) " :group 'message-various :type '(list (checklist :inline t :greedy t (function-item message-strip-subject-re) (function-item message-strip-list-identifiers)) (editable-list :inline t :tag "List of functions" function))) Some style notes: I believe '-functions' (not '-function') is the conventional suffix for a list functions. Also, the user is unlikely to set this variable during a normal Emacs session, so there should not be any '*' at the start of the documentation string. The '*' does not mean "user option". 'defcustom' means "user option". The '*' means it make sense to change interactively during normal use. A good example is 'case-fold-search'. > Wouldn't it be nice if the `function' behaved like `function-item' and > displayed the documentation for the function currently entered? I think it could be confusing during editing. > (Maybe there is a Custom list for this..)