Gnus development mailing list
 help / color / mirror / Atom feed
* Lambda functions in group parameters?
@ 2003-04-16  3:09 Kirk Strauser
  2003-04-16  4:32 ` Michael Shields
  0 siblings, 1 reply; 3+ messages in thread
From: Kirk Strauser @ 2003-04-16  3:09 UTC (permalink / raw)


I'm trying to get Gnus to use per-group values for gnus-message-setup-hook
(mainly so that I can use the mml-secure-message-sign-pgpmime function to
sign email, and the mml-secure-message-sign-pgp function to sign news).  In
my .gnus, I have:

    (add-hook 'gnus-message-setup-hook
              (lambda ()
                (interactive)
                (and setup-hook-function-name
                     (funcall setup-hook-function-name))))

Now, if I edit my top-level ``Gnus'' topic and set
"setup-hook-function-name" to a static default value, then I can override
that value on a per-topic or per-group basis.  This works well.  However,
I've lately decided that I want to intermingle my email and news groups (for
example, to put all of the Debian groups under one common topic, rather than
having seperate topics under "Mail" and "News").  To avoid having to set the
group parameters for way too many newsgroups, I'd like to put something like
this in my ``Gnus'' topic parameters:

    ((posting-style
      (signature-file "~/.signature"))
     (setup-hook-function-name
      '((if
    	(message-news-p)
    	'mml-secure-message-sign-pgp
        'mml-secure-message-sign-pgpmime))))

When I try this, though, I get this error:

   Invalid function: ((if (message-news-p) (quote this-is-a-newsgroup) (quote this-is-a-mailgroup)))

I've tried writing it as a lambda function:

    ((posting-style
      (signature-file "~/.signature"))
     (setup-hook-function-name
      (lambda ()
    	(if (message-news-p)
    	'mml-secure-message-sign-pgp
        'mml-secure-message-sign-pgpmime))))

but I don't get any response - no error message, nothing.  What am I doing
wrong?  This is Gnus, so I know this *has* to be possible somehow.  :)
-- 
Kirk Strauser




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-16 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-16  3:09 Lambda functions in group parameters? Kirk Strauser
2003-04-16  4:32 ` Michael Shields
2003-04-16 15:00   ` Kirk Strauser

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).