From: Kai Tetzlaff Date: Mon, 28 Feb 2022 10:33:56 +0000 (+0100) Subject: Improve robustnes of `sieve-manage-quit' in case of errors X-Git-Tag: emacs-29.0.90~1856^2~699 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46963d0bc9058caeb8241abe34b1552bd83e097d;p=emacs.git Improve robustnes of `sieve-manage-quit' in case of errors * lisp/net/sieve.el (sieve-manage-quit): Avoid killing buffers it's not supposed to touch (bug#54154). --- diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el index 3a6067ee10b..c2faeaef544 100644 --- a/lisp/net/sieve.el +++ b/lisp/net/sieve.el @@ -152,7 +152,8 @@ require \"fileinto\"; (interactive) (sieve-manage-close sieve-manage-buffer) (kill-buffer sieve-manage-buffer) - (kill-buffer (current-buffer))) + (when-let ((buffer (get-buffer sieve-buffer))) + (kill-buffer buffer))) (defun sieve-bury-buffer () "Bury the Manage Sieve buffer without closing the connection."