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
1 changed files with 5 additions and 5 deletions

View File

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