* [PATCH] emacs: implement notmuch-search-color-line with dolist.
@ 2016-08-14 22:13 Matt Armstrong
2016-09-12 11:13 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Matt Armstrong @ 2016-08-14 22:13 UTC (permalink / raw)
To: notmuch
While passing a lambda to mapc is idiomatic elisp, dolist is easier
to understand, and there are a few other calls to it in this file.
---
emacs/notmuch.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 43d56f7..6307b37 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -700,13 +700,12 @@ background."
(defun notmuch-search-color-line (start end line-tag-list)
"Colorize lines in `notmuch-show' based on tags."
- (mapc (lambda (elem)
- (let ((tag (car elem))
- (attributes (cdr elem)))
- (when (member tag line-tag-list)
- (notmuch-apply-face nil attributes nil start end))))
- ;; Reverse the list so earlier entries take precedence
- (reverse notmuch-search-line-faces)))
+ ;; Reverse the list so earlier entries take precedence
+ (dolist (elem (reverse notmuch-search-line-faces))
+ (let ((tag (car elem))
+ (face (cdr elem)))
+ (when (member tag line-tag-list)
+ (notmuch-apply-face nil face nil start end)))))
(defun notmuch-search-author-propertize (authors)
"Split `authors' into matching and non-matching authors and
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] emacs: implement notmuch-search-color-line with dolist.
2016-08-14 22:13 [PATCH] emacs: implement notmuch-search-color-line with dolist Matt Armstrong
@ 2016-09-12 11:13 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2016-09-12 11:13 UTC (permalink / raw)
To: Matt Armstrong, notmuch
Matt Armstrong <marmstrong@google.com> writes:
> While passing a lambda to mapc is idiomatic elisp, dolist is easier
> to understand, and there are a few other calls to it in this file.
pushed,
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-12 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-14 22:13 [PATCH] emacs: implement notmuch-search-color-line with dolist Matt Armstrong
2016-09-12 11:13 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).