]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch.el
emacs: don't fset keymaps
[notmuch] / emacs / notmuch.el
index 75fe6900f1f9832d151514491d7dde816afc3aa8..165aaa43018b9793e41f0f13850345ecfd5dba80 100644 (file)
@@ -18,7 +18,7 @@
 ;; along with Notmuch.  If not, see <https://www.gnu.org/licenses/>.
 ;;
 ;; Authors: Carl Worth <cworth@cworth.org>
-;; 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))
@@ -194,7 +194,6 @@ there will be called at other points of notmuch execution."
     (define-key map "U" 'notmuch-unthreaded-from-search-current-query)
     map)
   "Keymap for \"notmuch search\" buffers.")
-(fset 'notmuch-search-mode-map notmuch-search-mode-map)
 
 (defvar notmuch-search-stash-map
   (let ((map (make-sparse-keymap)))
@@ -275,10 +274,10 @@ there will be called at other points of notmuch execution."
 (defface notmuch-message-summary-face
   `((((class color) (background light))
      ,@(and (>= emacs-major-version 27) '(:extend t))
-     (:background "#f0f0f0"))
+     :background "#f0f0f0")
     (((class color) (background dark))
      ,@(and (>= emacs-major-version 27) '(:extend t))
-     (:background "#303030")))
+     :background "#303030"))
   "Face for the single-line message summary in notmuch-show-mode."
   :group 'notmuch-show
   :group 'notmuch-faces)
@@ -545,7 +544,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."
@@ -994,7 +993,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
@@ -1134,7 +1133,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