From 405dcd2c98d8abbffbc0e7e5cf05847c3a41d01a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 3 Jun 2013 21:01:23 +2100 Subject: [PATCH] Re: [PATCH] emacs: replace setq + let with let* --- 18/1d8499f9dc228eb3f33fa0fe5d6ec124329bb0 | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 18/1d8499f9dc228eb3f33fa0fe5d6ec124329bb0 diff --git a/18/1d8499f9dc228eb3f33fa0fe5d6ec124329bb0 b/18/1d8499f9dc228eb3f33fa0fe5d6ec124329bb0 new file mode 100644 index 000000000..e5892ec95 --- /dev/null +++ b/18/1d8499f9dc228eb3f33fa0fe5d6ec124329bb0 @@ -0,0 +1,82 @@ +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 D9BB0429E5A + for ; Sun, 2 Jun 2013 17:01:36 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 r2HHxOVBLS2y for ; + Sun, 2 Jun 2013 17:01:31 -0700 (PDT) +Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D35C1431FBC + for ; Sun, 2 Jun 2013 17:01:30 -0700 (PDT) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id r5301TTY025232; + Sun, 2 Jun 2013 21:01:29 -0300 +Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net + ([156.34.82.78] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) + (envelope-from ) + id 1UjIDI-0002V3-Tx; Sun, 02 Jun 2013 21:01:29 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1UjIDD-0007R1-96; Sun, 02 Jun 2013 21:01:23 -0300 +From: David Bremner +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: replace setq + let with let* +In-Reply-To: <878v2sv2zz.fsf@qmul.ac.uk> +References: <1370175370-13561-1-git-send-email-david@tethera.net> + <1370185351-23834-1-git-send-email-david@tethera.net> + <878v2sv2zz.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.15.2+141~gd298af4 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 02 Jun 2013 21:01:23 -0300 +Message-ID: <874ndgt63w.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-Spam_bar: - +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: Mon, 03 Jun 2013 00:01:37 -0000 + +Mark Walters writes: + +>> - (setq search (notmuch-hello-trim search)) +>> - (let ((history-delete-duplicates t)) +>> + (let* ((search (notmuch-hello-trim search)) +>> + (history-delete-duplicates t)) +>> (add-to-history 'notmuch-search-history search))) +>> (notmuch-search search notmuch-search-oldest-first nil nil +> +> These look good to me except I don't see why the above is a let* not a +> let? + +I ended up dropping this hunk because I realized it introduced a bug; +the side-effect of the setq is needed outside the unless. + +pushed the two patches (as amended) in this thread. + +d + + + -- 2.26.2