Gnus development mailing list
 help / color / mirror / Atom feed
* calling gnus-group-mail with a groupname
@ 2003-12-09 15:21 Chris Green
  2003-12-31  3:00 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Green @ 2003-12-09 15:21 UTC (permalink / raw)


Hey folks, I've been trying to give myself a shortcut to a mailing
list group that I don't read with gnus but I have defined a posting
style for by wrapping a call to gnus-group-mail so that it uses the
posting style of the group.  The problem is after defining this
wrapper, I still get prompted for the argument nam

I'm using CVS from a little while ago if that's helps my problem.

(defun cmg:mail-xyz ()
  "Use this to mail using the posting style of xyx"
  (interactive)
  ;; overwrite the group-name function
  (flet ((gnus-group-group-name (&optional arg) "xyz"))
    (gnus-group-mail "xyz"))) ;; I wish it could use an arg groupname


Replacing gnus-group-mail with (message (gnus-group-group-name)) seems
to do the right thing.

Any suggestions?
-- 
Chris Green <cmg@dok.org>
To err is human, to moo bovine.




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

* Re: calling gnus-group-mail with a groupname
  2003-12-09 15:21 calling gnus-group-mail with a groupname Chris Green
@ 2003-12-31  3:00 ` Lars Magne Ingebrigtsen
  2004-01-13 17:00   ` Johan Bockgård
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-12-31  3:00 UTC (permalink / raw)


Chris Green <cmg@dok.org> writes:

> (defun cmg:mail-xyz ()
>   "Use this to mail using the posting style of xyx"
>   (interactive)
>   ;; overwrite the group-name function
>   (flet ((gnus-group-group-name (&optional arg) "xyz"))
>     (gnus-group-mail "xyz"))) ;; I wish it could use an arg groupname
>
> Replacing gnus-group-mail with (message (gnus-group-group-name)) seems
> to do the right thing.

I've never used flet in Emacs Lisp -- doesn't it have lexical scope?
If it does, that would explain what you're seeing.  (If not, then
it's weirder.)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: calling gnus-group-mail with a groupname
  2003-12-31  3:00 ` Lars Magne Ingebrigtsen
@ 2004-01-13 17:00   ` Johan Bockgård
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Bockgård @ 2004-01-13 17:00 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> I've never used flet in Emacs Lisp -- doesn't it have lexical scope?
> If it does, that would explain what you're seeing. (If not, then
> it's weirder.)

No (info "(cl)Function Bindings"):

    While `flet' in Common Lisp establishes a lexical binding of NAME,
    Emacs Lisp `flet' makes a dynamic binding. The result is that
    `flet' affects indirect calls to a function as well as calls
    directly inside the `flet' form itself.

-- 
Johan Bockgård



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

end of thread, other threads:[~2004-01-13 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 15:21 calling gnus-group-mail with a groupname Chris Green
2003-12-31  3:00 ` Lars Magne Ingebrigtsen
2004-01-13 17:00   ` Johan Bockgård

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