notmuch-el: Fix implementation of show/hide-thread-ids.

I'm definitely more comfortable with the add-to-invisibility-spec
now than I was when I first wrote these functions, (which weren't
working at all).
This commit is contained in:
Carl Worth 2009-11-03 16:46:27 -08:00
parent 0bec4692b6
commit 3f04059b33

View file

@ -363,6 +363,7 @@ Does nothing if already on the first message in the buffer."
(interactive) (interactive)
(kill-all-local-variables) (kill-all-local-variables)
(make-local-variable 'notmuch-search-query-string) (make-local-variable 'notmuch-search-query-string)
(add-to-invisibility-spec 'notmuch-search)
(use-local-map notmuch-search-mode-map) (use-local-map notmuch-search-mode-map)
(setq major-mode 'notmuch-search-mode (setq major-mode 'notmuch-search-mode
mode-name "notmuch-search") mode-name "notmuch-search")
@ -391,11 +392,15 @@ Does nothing if already on the first message in the buffer."
(defun notmuch-search-hide-thread-ids () (defun notmuch-search-hide-thread-ids ()
(interactive) (interactive)
(add-to-invisibility-spec 'notmuch-search)) (add-to-invisibility-spec 'notmuch-search)
(force-window-update)
(redisplay t))
(defun notmuch-search-show-thread-ids () (defun notmuch-search-show-thread-ids ()
(interactive) (interactive)
(remove-from-invisibility-spec 'notmuch-search)) (remove-from-invisibility-spec 'notmuch-search)
(force-window-update)
(redisplay t))
(defun notmuch-search-show-thread () (defun notmuch-search-show-thread ()
(interactive) (interactive)