;; Create the overlay only if the message has tags which match one
;; of those specified in `notmuch-search-line-faces'.
(let (overlay)
- (mapc '(lambda (elem)
- (let ((tag (car elem))
- (attributes (cdr elem)))
- (when (member tag line-tag-list)
- (when (not overlay)
- (setq overlay (make-overlay start end)))
- ;; Merge the specified properties with any already
- ;; applied from an earlier match.
- (overlay-put overlay 'face
- (append (overlay-get overlay 'face) attributes)))))
+ (mapc (lambda (elem)
+ (let ((tag (car elem))
+ (attributes (cdr elem)))
+ (when (member tag line-tag-list)
+ (when (not overlay)
+ (setq overlay (make-overlay start end)))
+ ;; Merge the specified properties with any already
+ ;; applied from an earlier match.
+ (overlay-put overlay 'face
+ (append (overlay-get overlay 'face) attributes)))))
notmuch-search-line-faces)))
(defun notmuch-search-author-propertize (authors)
(interactive)
(notmuch-hello))
+;;;###autoload
+(defun notmuch-jump-to-recent-buffer ()
+ "Jump to the most recent notmuch buffer (search, show or hello).
+
+If no recent buffer is found, run `notmuch'."
+ (interactive)
+ (let ((last
+ (loop for buffer in (buffer-list)
+ if (with-current-buffer buffer
+ (memq major-mode '(notmuch-show-mode
+ notmuch-search-mode
+ notmuch-hello-mode)))
+ return buffer)))
+ (if last
+ (switch-to-buffer last)
+ (notmuch))))
+
(setq mail-user-agent 'notmuch-user-agent)
(provide 'notmuch)