From: Kevin Greiner <kgreiner@xpediantsolutions.com>
Subject: Re: trouble with gnus-define-group-parameter
Date: Tue, 11 Mar 2003 14:25:45 -0600 [thread overview]
Message-ID: <uwuj5ejli.fsf@xpediantsolutions.com> (raw)
In-Reply-To: <4nwuj7krtf.fsf@lockgroove.bwh.harvard.edu>
Ted Zlatanov <tzz@lifelogs.com> writes:
> I'm defining these two group parameters:
>
> (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.")
>
> (gnus-define-group-parameter
> spam-marks
> :parameter-type '(choice :tag "Spam marks"
> :value nil
> (list :tag "Spam mark choices"
> (set
> (variable-item gnus-spam-mark)
> (variable-item gnus-killed-mark)
> (variable-item gnus-kill-file-mark)
> (variable-item gnus-low-score-mark))))
>
> :parameter-document
> "Marks considered spam.
> Such articles will be processed as spam on group exit. When nil, the global
> spam-spam-marks variable takes precedence."))
>
> I can customize the parameter just fine, but then
>
> (gnus-parameter-ham-marks gnus-newsgroup-name)
>
> returns nil no matter what. Anyone with a clue as to what I'm doing wrong?
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)))))
Kevin
next prev parent reply other threads:[~2003-03-11 20:25 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 [this message]
2003-03-19 22:55 ` Ted Zlatanov
2003-03-20 4:11 ` Kevin Greiner
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=uwuj5ejli.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).