[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Usefulness of (t nil) as the last sexp in (cond ...) constructs?
From: |
Jeremiah Dodds |
Subject: |
Re: Usefulness of (t nil) as the last sexp in (cond ...) constructs? |
Date: |
Sun, 19 Aug 2012 06:23:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Bastien <address@hidden> writes:
> There are many places in *.el elisp files where we have this construct
>
> (cond (...)
> (...)
> (t nil))
>
> My understanding is that (t nil) is useless, since the ̀t' condition
> is only tested if other conditions are `nil'.
>
> What is the purpose of (t nil)?
IIRC, it's mostly there to make it explicit that "this cond is expected
to return nil sometimes".
> Can we safely remove it?
Again, IIRC, it shouldn't affect behaviour to do so, but it might not be
preferable.
--
Jeremiah Dodds
blog : http://jdodds.github.com
github : https://github.com/jdodds
freenode : exhortatory
twitter : kaens