aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-30 23:14:11 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-30 23:14:11 -0800
commit7a6394257722c81dd47adefb172c8df2ac898973 (patch)
tree8517bae52167a8c3bdd1b66a9f5e454b3bbc49be /notmuch.el
parenta708ea627ea89f69ffc799bc2428edd389c7013a (diff)
notmuch.el: Use let to avoid assigning to a free variable.
The dynamic scoping of emacs lisp is such that we never want to assign to any variable unless it's something we've defined with `defvar' or else something we're using locally via `let'.
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/notmuch.el b/notmuch.el
index 94a63844..e605d9d2 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -1081,12 +1081,11 @@ Complete list of currently available key bindings:
(if (not notmuch-tag-face-alist)
(add-to-list 'notmuch-search-font-lock-keywords (list
"(\\([^)]*\\))$" '(1 'notmuch-tag-face)))
- (progn
- (setq notmuch-search-tags (mapcar 'car notmuch-tag-face-alist))
- (loop for notmuch-search-tag in notmuch-search-tags
- do (add-to-list 'notmuch-search-font-lock-keywords (list
- (concat "([^)]*\\(" notmuch-search-tag "\\)[^)]*)$")
- `(1 ,(cdr (assoc notmuch-search-tag notmuch-tag-face-alist))))))))
+ (let ((notmuch-search-tags (mapcar 'car notmuch-tag-face-alist)))
+ (loop for notmuch-search-tag in notmuch-search-tags
+ do (add-to-list 'notmuch-search-font-lock-keywords (list
+ (concat "([^)]*\\(" notmuch-search-tag "\\)[^)]*)$")
+ `(1 ,(cdr (assoc notmuch-search-tag notmuch-tag-face-alist))))))))
(set (make-local-variable 'font-lock-defaults)
'(notmuch-search-font-lock-keywords t)))