From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AOlRLvSR118dcgAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 16:25:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CHJMKvSR11/TfgAAB5/wlQ (envelope-from ) for ; Mon, 14 Dec 2020 16:25:24 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D20009402D4 for ; Mon, 14 Dec 2020 16:25:23 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 740E329CB0; Mon, 14 Dec 2020 11:24:36 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id BF32528C2E for ; Mon, 14 Dec 2020 11:24:06 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 229AF165C7 for ; Mon, 14 Dec 2020 17:24:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=sel2011a; t=1607963042; bh=ouE3+pD3qL33GlY XQ7ht8SvZ9i/dTigfHHM01Vlg6gQ=; b=u9Jtwz3e/iEanOxujSE7UVXOrwQZwEh JsLzjrxyXSU4hhk8NrP3al0rIMyvI8UKukBhyH4hN22mBRavO2I0Ytuxu5zExuyp 5Jnct+5B0kKy8uoPTAf2yYmxCaV7K0LnS3IgebNt19wwzCDIpQzcPsmjaAl3rQty Nnwt/kLRupUU= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id 0T0pIdRi3CZk for ; Mon, 14 Dec 2020 17:24:02 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id E3103165D6 for ; Mon, 14 Dec 2020 17:24:02 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 13/32] emacs: notmuch-tag--get-formats: silence byte-compiler Date: Mon, 14 Dec 2020 17:23:42 +0100 Message-Id: <20201214162401.19569-14-jonas@bernoul.li> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201214162401.19569-1-jonas@bernoul.li> References: <20201214162401.19569-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: ZIL2WHAYDJPC2HA2HJVO56UMZMXSSS4N X-Message-ID-Hash: ZIL2WHAYDJPC2HA2HJVO56UMZMXSSS4N X-MailFrom: jonas@bernoul.li X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 1.73 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=bernoul.li header.s=sel2011a header.b=u9Jtwz3e; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D20009402D4 X-Spam-Score: 1.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9zfpNMJxHzvO `format-alist' is a global variable and the byte-compiler is unhappy when a lexical function argument shadows a global (dynamic) binding. --- emacs/notmuch-tag.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index fa376b02..a553dfd9 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -285,12 +285,12 @@ (defun notmuch-tag-clear-cache () "Clear the internal cache of tag formats." (clrhash notmuch-tag--format-cache)) -(defun notmuch-tag--get-formats (tag format-alist) +(defun notmuch-tag--get-formats (tag alist) "Find the first item whose car regexp-matches TAG." (save-match-data ;; Don't use assoc-default since there's no way to distinguish a ;; missing key from a present key with a null cdr. - (cl-assoc tag format-alist + (cl-assoc tag alist :test (lambda (tag key) (and (eq (string-match key tag) 0) (= (match-end 0) (length tag))))))) -- 2.29.1