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 6A28F431FD0 for ; Sun, 13 Mar 2011 22:09:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 p2AUCozXeVlj for ; Sun, 13 Mar 2011 22:09:40 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 606B3431FB5 for ; Sun, 13 Mar 2011 22:09:39 -0700 (PDT) Received: by fxm11 with SMTP id 11so2821420fxm.26 for ; Sun, 13 Mar 2011 22:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=N+UkAdpG7Hy3VqVhTwQSLUkfIz0pPYBGlsjIC/McxMs=; b=r3Y2uKMwa9LHRW9VbqXcrGTaffP3RdaaqfryGB7A/N0Fi6Jxf7BWD+24TOMsdKyBrG zBIrS+GAoRJuxAVvZOqbiOEuuRxU63QY+XQMk3hMRrY7ox0UQvoHYlS/687xP+vylVrt 9KUWH1wCrz2Qnhwp2SqmD2R1OXtYIpHMK8/Tg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=VBlCJ/dTPhaB6bZLdGafL5Qx/Vf3eIzaWXcvS3APjutH1Q/OYaS8q/SeRWpGYhJMXN hNIDtbWjG2LHp1/aUVeCG+tk5b8N2IU5EuwDpR/VBtdYQImOt7CwyZecgsHjbQS7NS9q 2Jn+TRER7mkxJj6mgylcSTy/+Nkj8YVRRtRV4= MIME-Version: 1.0 Received: by 10.223.15.152 with SMTP id k24mr5564591faa.96.1300079377170; Sun, 13 Mar 2011 22:09:37 -0700 (PDT) Received: by 10.223.102.73 with HTTP; Sun, 13 Mar 2011 22:09:37 -0700 (PDT) Date: Mon, 14 Mar 2011 01:09:37 -0400 Message-ID: Subject: [PATCH] Eliminate redundant code. From: servilio To: notmuch Content-Type: text/plain; charset=UTF-8 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, 14 Mar 2011 05:09:43 -0000 There is no need to move the cursor to the position if you can retrieve its value directly. --- emacs/notmuch-address.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 1a7c577..52e320d 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -48,8 +48,8 @@ line." (let* ((end (point)) (beg (save-excursion (re-search-backward "\\(\\`\\|[\n:,]\\)[ \t]*") - (goto-char (match-end 0)) - (point))) + (match-end 0) + )) (orig (buffer-substring-no-properties beg end)) (completion-ignore-case t) (options (notmuch-address-options orig)) -- 1.7.4.1