[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to discard return value of a function?
From: |
Stefan Monnier |
Subject: |
Re: How to discard return value of a function? |
Date: |
Wed, 22 Aug 2012 11:04:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
> I'm trying to write a skeleton with (search-forward) in it. But
> (search-forward) always returns the point and skeleton inserts it as a
> string in the buffer, which of course is not what I want.
C-h f skeleton-insert RET says:
Quoted Lisp expressions are evaluated for their side-effects.
Other Lisp expressions are evaluated and the value treated as above.
so you can use '(search-forward ...) in your skeleton to tell skeleton
that the return value should be ignored.
Otherwise, you can also use (ignore (search-forward ...)) since `ignore'
always returns nil.
Stefan