1 Return-Path: <pieter@praet.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 42361429E48
\r
6 for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 01:16:46 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Qb1i-AtSP2SF for <notmuch@notmuchmail.org>;
\r
16 Sat, 14 Jan 2012 01:16:45 -0800 (PST)
\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
18 [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 929A1431FB6
\r
21 for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 01:16:45 -0800 (PST)
\r
22 Received: by wibhr12 with SMTP id hr12so1049670wib.26
\r
23 for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 01:16:44 -0800 (PST)
\r
24 Received: by 10.180.93.193 with SMTP id cw1mr7442958wib.5.1326532604202;
\r
25 Sat, 14 Jan 2012 01:16:44 -0800 (PST)
\r
26 Received: from localhost ([109.131.75.86])
\r
27 by mx.google.com with ESMTPS id v13sm14165279wbm.14.2012.01.14.01.16.43
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Sat, 14 Jan 2012 01:16:43 -0800 (PST)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: David Edmondson <dme@dme.org>, Jani Nikula <jani@nikula.org>
\r
32 Subject: Re: [PATCH] emacs: globally replace non-branching "(if (not ..." with
\r
34 In-Reply-To: <cunobu8huxw.fsf@hotblack-desiato.hh.sledj.net>
\r
35 References: <87vcogketu.fsf@praet.org>
\r
36 <1326389586-21683-1-git-send-email-pieter@praet.org>
\r
37 <cunobu8huxw.fsf@hotblack-desiato.hh.sledj.net>
\r
38 User-Agent: Notmuch/0.10.2+115~gadd29f6 (http://notmuchmail.org) Emacs/23.3.1
\r
39 (x86_64-unknown-linux-gnu)
\r
40 Date: Sat, 14 Jan 2012 10:14:57 +0100
\r
41 Message-ID: <87k44uprvy.fsf@praet.org>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
45 X-BeenThere: notmuch@notmuchmail.org
\r
46 X-Mailman-Version: 2.1.13
\r
48 List-Id: "Use and development of the notmuch mail system."
\r
49 <notmuch.notmuchmail.org>
\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
53 List-Post: <mailto:notmuch@notmuchmail.org>
\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
57 X-List-Received-Date: Sat, 14 Jan 2012 09:16:46 -0000
\r
59 On Fri, 13 Jan 2012 08:23:55 +0000, David Edmondson <dme@dme.org> wrote:
\r
60 > On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet <pieter@praet.org> wrote:
\r
61 > > Less code, same results, without sacrificing readability.
\r
63 > +1, but why not replace non-branching `if' with `when' as well?
\r
65 I was planning to do that when the `unless' patch was accepted,
\r
66 but after reading Xavier and Tomi's replies, I've changed my mind.
\r
68 Looking at "subr.el", it's actually more efficient to use `if'
\r
69 (implemented in C) instead of `when' (a macro, which essentially
\r
70 runs "if conf (progn ...)".
\r
72 The amount of non-branching "(if COND (progn ..." statements is very
\r
73 limited though, so if inclined to "fix" them nonetheless, a patch
\r
74 follows (relative to the previous one!).
\r