Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6973B429E50 for ; Sat, 14 Jan 2012 01:54:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z4mhwjyqSOcn for ; Sat, 14 Jan 2012 01:54:15 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A7F97429E4E for ; Sat, 14 Jan 2012 01:54:15 -0800 (PST) Received: by wgbds11 with SMTP id ds11so3550447wgb.2 for ; Sat, 14 Jan 2012 01:54:14 -0800 (PST) Received: by 10.180.99.232 with SMTP id et8mr2258473wib.8.1326534854577; Sat, 14 Jan 2012 01:54:14 -0800 (PST) Received: from localhost ([109.131.75.86]) by mx.google.com with ESMTPS id fo18sm14268495wbb.12.2012.01.14.01.54.13 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Jan 2012 01:54:14 -0800 (PST) From: Pieter Praet To: David Edmondson , Jani Nikula Subject: Re: [PATCH] emacs: globally replace non-branching "(if (not ..." with "(unless ..." In-Reply-To: <87k44uprvy.fsf@praet.org> References: <87vcogketu.fsf@praet.org> <1326389586-21683-1-git-send-email-pieter@praet.org> <87k44uprvy.fsf@praet.org> User-Agent: Notmuch/0.10.2+115~gadd29f6 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Sat, 14 Jan 2012 10:52:27 +0100 Message-ID: <8762gepq5g.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 09:54:16 -0000 On Sat, 14 Jan 2012 10:14:57 +0100, Pieter Praet wrote: > On Fri, 13 Jan 2012 08:23:55 +0000, David Edmondson wrote: > > On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet wrote: > > > Less code, same results, without sacrificing readability. > > > > +1, but why not replace non-branching `if' with `when' as well? > > I was planning to do that when the `unless' patch was accepted, ^^ submit > but after reading Xavier and Tomi's replies, I've changed my mind. ^^^^^^^^^^^^^^^^^^^^ I hadn't, though... > > Looking at "subr.el", it's actually more efficient to use `if' > (implemented in C) instead of `when' (a macro, which essentially > runs "if conf (progn ...)". > > The amount of non-branching "(if COND (progn ..." statements is very > limited though, so if inclined to "fix" them nonetheless, a patch > follows (relative to the previous one!). > > > Peace > > -- > Pieter Typsos FTW! -- Pieter