X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=193a1255dda2c0ce040f519170d6b9356dcd58e9;hb=88ae4f02511c4dd61ea90b28794f469819d543be;hp=4fc338e2a3358a718a4b427962b371d615380676;hpb=e1a700067a22214f54064c281219fbbbef87de06;p=notmuch
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 4fc338e2..193a1255 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -18,7 +18,7 @@
;; along with Notmuch. If not, see .
;;
;; Authors: Carl Worth
-;; Homepage: https://notmuchmail.org/
+;; Homepage: https://notmuchmail.org
;;; Commentary:
@@ -62,7 +62,7 @@
;;
;; TL;DR: notmuch-emacs from MELPA and notmuch from distro packages is
;; NOT SUPPORTED.
-;;
+
;;; Code:
(eval-when-compile (require 'cl-lib))
@@ -273,8 +273,12 @@ there will be called at other points of notmuch execution."
(goto-char (point-min)))
(defface notmuch-message-summary-face
- '((((class color) (background light)) (:background "#f0f0f0"))
- (((class color) (background dark)) (:background "#303030")))
+ `((((class color) (background light))
+ ,@(and (>= emacs-major-version 27) '(:extend t))
+ (:background "#f0f0f0"))
+ (((class color) (background dark))
+ ,@(and (>= emacs-major-version 27) '(:extend t))
+ (:background "#303030")))
"Face for the single-line message summary in notmuch-show-mode."
:group 'notmuch-show
:group 'notmuch-faces)
@@ -428,11 +432,10 @@ returns nil."
(defun notmuch-search-foreach-result (beg end fn)
"Invoke FN for each result between BEG and END.
-FN should take one argument. It will be applied to the
-character position of the beginning of each result that overlaps
-the region between points BEG and END. As a special case, if (=
-BEG END), FN will be applied to the result containing point
-BEG."
+FN should take one argument. It will be applied to the character
+position of the beginning of each result that overlaps the region
+between points BEG and END. As a special case, if (= BEG END),
+FN will be applied to the result containing point BEG."
(let ((pos (notmuch-search-result-beginning beg))
;; End must be a marker in case fn changes the
;; text.
@@ -542,7 +545,7 @@ thread."
notmuch-search-query-string
nil
(notmuch-prettify-subject (notmuch-search-find-subject))
- t))
+ t nil (current-buffer)))
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
"Begin composing a reply-all to the entire current thread in a new buffer."
@@ -991,7 +994,7 @@ the configured default sort order."
(buffer (get-buffer-create (notmuch-search-buffer-title query))))
(if no-display
(set-buffer buffer)
- (switch-to-buffer buffer))
+ (pop-to-buffer-same-window buffer))
;; avoid wiping out third party buffer-local variables in the case
;; where we're just refreshing or changing the sort order of an
;; existing search results buffer
@@ -1131,7 +1134,7 @@ notmuch buffers exist, run `notmuch'."
;; If the first one we found is any other than the starting
;; buffer, switch to it.
(unless (eq first start)
- (switch-to-buffer first))
+ (pop-to-buffer-same-window first))
(notmuch))))
;;;; Imenu Support