aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-01-10 15:00:49 +0100
committerDavid Bremner <david@tethera.net>2021-01-13 07:16:38 -0400
commit9be8c6802fa5ce7fa61a2656daf337ac935da423 (patch)
tree07fc3b72f23683f623e9a9ebc60a7f479b28bcf3
parent0067a43ea2ee554eafed1e1300a71259cd6b6a6d (diff)
emacs: notmuch-tag--get-formats: silence byte-compiler
`format-alist' is a global variable and the byte-compiler is unhappy when a lexical function argument shadows a global (dynamic) binding.
-rw-r--r--emacs/notmuch-tag.el4
1 files 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 @@ This can be used with `notmuch-tag-format-image-data'."
"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)))))))