1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-25 07:28:02 +02:00

Merge pull request #1839 from thierryvolpiatto/avoid_looping

Avoid looping through buffer-list when not needed
This commit is contained in:
Dirk-Jan C. Binnema 2020-11-19 22:34:01 +02:00 committed by GitHub
commit 1f1415c91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -795,11 +795,11 @@ appropriate flag at the message forwarded or replied-to."
(mu4e~proc-remove docid)) (mu4e~proc-remove docid))
;; kill any remaining buffers for the draft file, or they will hang around... ;; kill any remaining buffers for the draft file, or they will hang around...
;; this seems a bit hamfisted... ;; this seems a bit hamfisted...
(dolist (buf (buffer-list)) (when message-kill-buffer-on-exit
(when (and (buffer-file-name buf) (dolist (buf (buffer-list))
(string= (buffer-file-name buf) path)) (and (buffer-file-name buf)
(if message-kill-buffer-on-exit (string= (buffer-file-name buf) path)
(kill-buffer buf)))) (kill-buffer buf))))
(mu4e~switch-back-to-mu4e-buffer) (mu4e~switch-back-to-mu4e-buffer)
(mu4e-message "Message sent")) (mu4e-message "Message sent"))