]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: notmuch-tag--get-formats: silence byte-compiler
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 10 Jan 2021 14:00:49 +0000 (15:00 +0100)
committerDavid Bremner <david@tethera.net>
Wed, 13 Jan 2021 11:16:38 +0000 (07:16 -0400)
`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

index fa376b02b5f9ebc6fde1a2a4f8f23c665948e05d..a553dfd9aeedd4292ac4b9b12f0509f61b4958ad 100644 (file)
@@ -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)))))))