]> git.notmuchmail.org Git - notmuch/commitdiff
Don't use kill-this-buffer to kill notmuch emacs buffers
authorJameson Rollins <jrollins@finestructure.net>
Sat, 6 Nov 2010 20:49:28 +0000 (16:49 -0400)
committerCarl Worth <cworth@cworth.org>
Mon, 8 Nov 2010 17:02:54 +0000 (09:02 -0800)
kill-this-buffer appears to be a function intended specifically for
use in the menu bar, and causes problem killing notmuch buffers when
multiple frames have been used.  This patch replaces kill-this-buffer
with notmuch-kill-this-buffer, which in turn just simply calls
(kill-buffer (current-buffer)).

emacs/notmuch-hello.el
emacs/notmuch-lib.el
emacs/notmuch-show.el
emacs/notmuch.el

index 4b6a90dbc0ecc3e5a334c3a68d301e451c57fa46..e58dd24e3460ae445d9e218ca97d201e10f7ebcd 100644 (file)
@@ -294,7 +294,7 @@ should be. Returns a cons cell `(tags-per-line width)'."
     (define-key map "v" '(lambda () "Display the notmuch version" (interactive)
                            (message "notmuch version %s" (notmuch-version))))
     (define-key map "?" 'notmuch-help)
-    (define-key map "q" 'kill-this-buffer)
+    (define-key map "q" 'notmuch-kill-this-buffer)
     (define-key map "=" 'notmuch-hello-update)
     (define-key map "G" 'notmuch-hello-poll-and-update)
     (define-key map (kbd "<C-tab>") 'widget-backward)
index abcbfa1f99b8b0f3b0e9e9bb2f409a314d39dd94..dfdcd0520b021e101acc2c105616c720b46c2f1a 100644 (file)
@@ -87,6 +87,11 @@ the user hasn't set this variable with the old or new value."
   "Return the user.primary_email value from the notmuch configuration."
   (notmuch-config-get "user.primary_email"))
 
+(defun notmuch-kill-this-buffer ()
+  "Kill the current buffer."
+  (interactive)
+  (kill-buffer (current-buffer)))
+
 ;;
 
 ;; XXX: This should be a generic function in emacs somewhere, not
index ae483dde5cd0041304aa6c3f8f6e21948afee95d..701212544b51d354e3cb639b8c4e625358714aa2 100644 (file)
@@ -555,7 +555,7 @@ function is used. "
 (defvar notmuch-show-mode-map
       (let ((map (make-sparse-keymap)))
        (define-key map "?" 'notmuch-help)
-       (define-key map "q" 'kill-this-buffer)
+       (define-key map "q" 'notmuch-kill-this-buffer)
        (define-key map (kbd "<C-tab>") 'widget-backward)
        (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)
        (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)
@@ -1043,7 +1043,7 @@ argument, hide all of the messages."
        until (not (notmuch-show-goto-message-next)))
   ;; Move to the next item in the search results, if any.
   (let ((parent-buffer notmuch-show-parent-buffer))
-    (kill-this-buffer)
+    (notmuch-kill-this-buffer)
     (if parent-buffer
        (progn
          (switch-to-buffer parent-buffer)
index 2a87ab92ca5261013e6407914f2413256ed3fbf3..4a9223e4dfa8f1f0e95c76e10219a8f1a1863581 100644 (file)
@@ -232,7 +232,7 @@ For a mouse binding, return nil."
   "Exit the search buffer, calling any defined continuation function."
   (interactive)
   (let ((continuation notmuch-search-continuation))
-    (kill-this-buffer)
+    (notmuch-kill-this-buffer)
     (when continuation
       (funcall continuation))))
 
@@ -824,7 +824,7 @@ same relative position within the new buffer."
        (target-thread (notmuch-search-find-thread-id))
        (query notmuch-search-query-string)
        (continuation notmuch-search-continuation))
-    (kill-this-buffer)
+    (notmuch-kill-this-buffer)
     (notmuch-search query oldest-first target-thread target-line continuation)
     (goto-char (point-min))))