mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
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.
This commit is contained in:
parent
0067a43ea2
commit
9be8c6802f
1 changed files with 2 additions and 2 deletions
|
@ -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)))))))
|
||||
|
|
Loading…
Reference in a new issue