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 7D7E0431FAE for ; Tue, 24 Apr 2012 14:11:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 rm-Tpmth2mG1 for ; Tue, 24 Apr 2012 14:11:17 -0700 (PDT) Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) by olra.theworths.org (Postfix) with ESMTP id 9F466431FB6 for ; Tue, 24 Apr 2012 14:11:17 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id A16B368056; Wed, 25 Apr 2012 00:11:12 +0300 (EEST) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH 2/3] Moved global defvar of notmuch-hello-target to function local Date: Wed, 25 Apr 2012 00:11:09 +0300 Message-Id: <1335301870-11572-2-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.7.6.1 In-Reply-To: <1335301870-11572-1-git-send-email-tomi.ollila@iki.fi> References: <1335301870-11572-1-git-send-email-tomi.ollila@iki.fi> Cc: Tomi Ollila 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: Tue, 24 Apr 2012 21:11:18 -0000 From: Tomi Ollila The global defvar notmuch-hello-target was used to silence compiler 'free variable' warning. Actually the variable (when used) was always defined in (let...), shadowing the global in when dynamically scoped. "Moving" the defvar in function (possibly functions in future) where it is referenced is somewhat cleaner solution. --- emacs/notmuch-hello.el | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 8ae0aca..c2cda19 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -235,14 +235,6 @@ supported for \"Customized queries section\" items." notmuch-hello-query-section (function :tag "Custom section")))) -(defvar notmuch-hello-target nil - "Button text at position of point before rebuilding the notmuch-buffer. - -This variable contains the text of the button, if any, the -point was positioned at before the notmuch-hello buffer was -rebuilt. This should never actually be global and is defined as a -defvar only for documentation purposes and to avoid a compiler -warning about it occurring as a free variable.") (defvar notmuch-hello-hidden-sections nil "List of sections titles whose contents are hidden") @@ -421,6 +413,7 @@ SEARCHES must be a list containing lists of the form (NAME QUERY COUNT), where QUERY is the query to start when the button for the corresponding entry is activated. COUNT should be the number of messages matching the query. Such a list can be computed with `notmuch-hello-query-counts'." + (defvar notmuch-hello-target) ;; dynamically bound in call path (or nil) (let* ((widest (notmuch-hello-longest-label searches)) (tags-and-width (notmuch-hello-tags-per-line widest)) (tags-per-line (car tags-and-width)) -- 1.7.7.6