(defun notmuch-pick-format-field (field format-string msg)
"Format a FIELD of MSG according to FORMAT-STRING and return string"
(let* ((headers (plist-get msg :headers))
(defun notmuch-pick-format-field (field format-string msg)
"Format a FIELD of MSG according to FORMAT-STRING and return string"
(let* ((headers (plist-get msg :headers))
((string-equal field "date")
(let ((face (if match
'notmuch-pick-match-date-face
'notmuch-pick-no-match-date-face)))
((string-equal field "date")
(let ((face (if match
'notmuch-pick-match-date-face
'notmuch-pick-no-match-date-face)))
((string-equal field "subject")
(let ((bare-subject (notmuch-show-strip-re (plist-get headers :Subject)))
((string-equal field "subject")
(let ((bare-subject (notmuch-show-strip-re (plist-get headers :Subject)))
- (setq formatted-field
- (propertize (format format-string
- (if (string= notmuch-pick-previous-subject bare-subject)
- " ..."
- bare-subject))
- 'face face))
- (setq notmuch-pick-previous-subject bare-subject)))
+
+ (setq notmuch-pick-previous-subject bare-subject)
+ (propertize (format format-string
+ (if (string= previous-subject bare-subject)
+ " ..."
+ bare-subject))
+ 'face face)))
((string-equal field "authors")
(let ((author (notmuch-pick-clean-address (plist-get headers :From)))
((string-equal field "authors")
(let ((author (notmuch-pick-clean-address (plist-get headers :From)))
'notmuch-pick-no-match-author-face)))
(when (> (length author) len)
(setq author (substring author 0 len)))
'notmuch-pick-no-match-author-face)))
(when (> (length author) len)
(setq author (substring author 0 len)))
- 'notmuch-pick-match-tag-face
- 'notmuch-pick-no-match-tag-face)))
- (setq formatted-field
- (propertize (format format-string
- (mapconcat #'identity tags ", "))
- 'face face)))))
- formatted-field))
+ 'notmuch-pick-match-tag-face
+ 'notmuch-pick-no-match-tag-face)))
+ (propertize (format format-string
+ (mapconcat #'identity tags ", "))
+ 'face face))))))
+
(defun notmuch-pick-format-field-list (field-list msg)
"Format fields of MSG according to FIELD-LIST and return string"
(defun notmuch-pick-format-field-list (field-list msg)
"Format fields of MSG according to FIELD-LIST and return string"