Merge pull request #1413 from Chris00/rm-handler

mu4e: Fix mu4e~headers-remove-handler
This commit is contained in:
Dirk-Jan C. Binnema 2019-05-08 21:32:12 +03:00 committed by GitHub
commit 9a225365c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -396,13 +396,13 @@ headers."
(mu4e~headers-highlight docid))
(run-hooks 'mu4e-message-changed-hook))))))
(defun mu4e~headers-remove-handler (docid)
(defun mu4e~headers-remove-handler (docid &optional skip-hook)
"Remove handler, will be called when a message with DOCID has
been removed from the database. This function will hide the removed
message from the current list of headers. If the message is not
present, don't do anything.
If SKIP-HOOK is not nil, `mu4e-message-changed-hook' will be invoked."
If SKIP-HOOK is absent or nil, `mu4e-message-changed-hook' will be invoked."
(when (buffer-live-p (mu4e-get-headers-buffer))
(mu4e~headers-remove-header docid t))
;; if we were viewing this message, close it now.
@ -410,9 +410,10 @@ If SKIP-HOOK is not nil, `mu4e-message-changed-hook' will be invoked."
(buffer-live-p (mu4e-get-view-buffer)))
(unless (eq mu4e-split-view 'single-window)
(mapc #'delete-window (get-buffer-window-list
(mu4e-get-view-buffer))))
(mu4e-get-view-buffer) nil t)))
(kill-buffer (mu4e-get-view-buffer)))
(run-hooks 'mu4e-message-changed-hook))
(unless skip-hook
(run-hooks 'mu4e-message-changed-hook)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;