[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Save `nil' from the mutant void, preserve the truth of falsehood, pr
From: |
Stefan Monnier |
Subject: |
Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth |
Date: |
Sun, 12 Sep 2010 16:00:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Two one-liners not even a Perl devotee could love:
> (prog1 #1=(fboundp ()) (unintern #1#))
Let's see how many lines of defenses you broke in the above code:
- use of #1= in code: very bad.
- unintern takes a symbol as argument, not a boolean, so it should not
be called with the return value of (fboundp ...)
- calling unintern without an obarray arg is a bad idea.
Maybe we should make the second argument mandatory.
> Sometimes, I'm able to recover `nil' long enough to save the session,
> but even then i've not any reasonable surety that the busted `nil' is
> a correct `nil'.
The real nil is safely stored in a C variable `Qnil' which you should be
able to get via something like (not t). But I don't think Elisp lets
you re-intern it, since `intern' only takes a string rather than a symbol.
Stefan
- Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, MON KEY, 2010/09/11
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, Lars Magne Ingebrigtsen, 2010/09/11
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, Andy Wingo, 2010/09/12
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth,
Stefan Monnier <=
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, MON KEY, 2010/09/12
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, Stefan Monnier, 2010/09/13
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, MON KEY, 2010/09/14
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, Stefan Monnier, 2010/09/14
- Message not available
- Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth, MON KEY, 2010/09/21