help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to discard return value of a function?


From: jpkotta
Subject: Re: How to discard return value of a function?
Date: Tue, 21 Aug 2012 08:59:20 -0700 (PDT)
User-agent: G2/1.0

On Monday, August 20, 2012 7:13:35 PM UTC-5, Barry Margolin wrote:
> In article <88a339ab-f737-40d1-8f3a-7cd6b66c585e@googlegroups.com>,
> 
>  jpkotta <jpkotta@gmail.com> wrote:
> 
> 
> 
> > On Sunday, August 19, 2012 4:52:21 AM UTC-5, Leo wrote:
> 
> > > (progn (YOURFUNCTION ...) nil)
> 
> >
> 
> > You can also use advice, but (progn ... nil) is probably preferable.
> 
> > 
> 
> > (defun foo ()
> 
> >   (interactive)
> 
> >   t)
> 
> > 
> 
> > (defadvice foo (after modify-return-value activate)
> 
> >   (setq ad-return-value nil))
> 
> 
> 
> If he advised search-forward to return nil, that would break lots of 
> 
> other things.  He just wants to ignore the return value in one 
> 
> particular place where he calls it.
> 
> 
> 
> -- 
> 
> Barry Margolin, barmar@alum.mit.edu
> 
> Arlington, MA
> 
> *** PLEASE post questions in newsgroups, not directly to me ***

Yeah, I realized that after I posted.  I tried to delete the post but I guess 
it got posted twice for some reason.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]