From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.devel Subject: Re: Usefulness of (t nil) as the last sexp in (cond ...) constructs? Date: Sun, 19 Aug 2012 13:29:52 +0200 Organization: Linux Private Site Message-ID: <87a9xrazm7.fsf@Rainer.invalid> References: <87mx1rthxb.fsf@altern.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1345375811 28823 80.91.229.3 (19 Aug 2012 11:30:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2012 11:30:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 13:30:11 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T33hr-000427-Ce for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2012 13:30:11 +0200 Original-Received: from localhost ([::1]:40351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33hq-0003ru-2v for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2012 07:30:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33ho-0003qw-2Q for emacs-devel@gnu.org; Sun, 19 Aug 2012 07:30:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T33hm-0004yk-MA for emacs-devel@gnu.org; Sun, 19 Aug 2012 07:30:07 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33hm-0004uL-EV for emacs-devel@gnu.org; Sun, 19 Aug 2012 07:30:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T33hj-0003tw-42 for emacs-devel@gnu.org; Sun, 19 Aug 2012 13:30:03 +0200 Original-Received: from pd9eb301f.dip.t-dialin.net ([217.235.48.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Aug 2012 13:30:03 +0200 Original-Received: from Stromeko by pd9eb301f.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Aug 2012 13:30:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb301f.dip.t-dialin.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:wbcJMXLc+rDUyhWd19NzlASL6H0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152669 Archived-At: Bastien 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)? It's a nice (redundant) reminder that "if none of the other conditions is true, this form returns nil". > Can we safely remove it? I don't know if any checkers rely on it. I'd expect it is optimized away when the byte-compiler gets to it anyway, so why would you want to remove it? Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves