[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to discard return value of a function?
From: |
Barry Margolin |
Subject: |
Re: How to discard return value of a function? |
Date: |
Mon, 20 Aug 2012 20:13:35 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
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 ***