From: Kevin Greiner <kgreiner@xpediantsolutions.com>
Subject: Re: trouble with gnus-define-group-parameter
Date: Wed, 19 Mar 2003 22:11:59 -0600 [thread overview]
Message-ID: <u4r5ybrsg.fsf@xpediantsolutions.com> (raw)
In-Reply-To: <4nsmtjq84q.fsf@lockgroove.bwh.harvard.edu>
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Tue, 11 Mar 2003, kgreiner@xpediantsolutions.com wrote:
>> Not really. The gnus-define-group-parameter macro expanded to
>> include this definition for ham-marks. Perhaps you can eval it then
>> step through it with the debugger.
>>
>> (defun gnus-parameter-ham-marks (name)
>> ""
>> (and name
>> (or (gnus-group-find-parameter name (quote ham-marks) nil)
>> (let ((alist gnus-parameter-ham-marks-alist) elem value)
>> (while (setq elem (pop alist))
>> (when (and name (string-match (car elem) name))
>> (setq alist nil value (cdr elem))))
>> (if (consp value)
>> (car value)
>> value)))))
>
> Out of curiosity, how did you obtain this macro expansion?
Well, I'm sure that there is a better way but...
I eval'd this:
(progn (debug)
(gnus-define-group-parameter
ham-marks
:parameter-type '(choice :tag "Ham marks"
:value nil
(list :tag "Ham mark choices"
(set
(variable-item gnus-del-mark)
(variable-item gnus-read-mark)
(variable-item gnus-killed-mark)
(variable-item gnus-kill-file-mark)
(variable-item gnus-low-score-mark))))
:parameter-document
"Marks considered ham (positively not spam). Such articles will be
processed as ham (non-spam) on group exit. When nil, the global
spam-ham-marks variable takes precedence."))
If you step over the macro expansion, you see a return value that is
the expanded form. Normally, that gets executed so it is hidden.
Since you're in the debugger, you can cut-and-paste it to another
buffer for detailed reflection.
> The problem is this line:
>
>> (or (gnus-group-find-parameter name (quote ham-marks) nil)
>
> The allow-list parameter is nil. When it's t, I get the parameter
> correctly. I was not setting the :type parameter to 'list. But it
> had worked just fine for all my previous parameter definitions.
> Puzzling.
>
> I think I have things working, I'll do a commit with the fixed and
> revised code.
Glad to see it working.
Kevin
next prev parent reply other threads:[~2003-03-20 4:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-10 18:19 Ted Zlatanov
2003-03-11 20:25 ` Kevin Greiner
2003-03-19 22:55 ` Ted Zlatanov
2003-03-20 4:11 ` Kevin Greiner [this message]
2003-03-20 4:45 ` Jesper Harder
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=u4r5ybrsg.fsf@xpediantsolutions.com \
--to=kgreiner@xpediantsolutions.com \
/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).