[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14883: warning about unused returned value from some ert shoulds
From: |
Stefan Monnier |
Subject: |
bug#14883: warning about unused returned value from some ert shoulds |
Date: |
Mon, 22 Jul 2013 11:34:49 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> This is the same issue as http://debbugs.gnu.org/10969, for what is now
> cl-pop.
There's no `cl-pop'. Instead `pop' is now always like CL's `pop'.
> byte-optimize-form-code-walker has special handling for the standard
> `pop' macro so as not to warn about unused return values from (pop foo).
> It would be nice if there was a general way to get the same result for
> arbitrary macros (sort of the opposite of side-effect-free?), but I
> don't see how.
I think the way to do it is to introduce a new function (call it
`ignorable') which works like `identity' and then make pop use it around
the code that returns the value.
Then byte-optimize-form-code-walker can be modified to recognize this
function and just throw away the whole call when `for-effect' is nil.
We can then get rid of this ad-hoc handling of `pop'.
Stefan