]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve robustnes of `sieve-manage-quit' in case of errors
authorKai Tetzlaff <emacs@tetzco.de>
Mon, 28 Feb 2022 10:33:56 +0000 (11:33 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 6 Sep 2022 11:33:48 +0000 (13:33 +0200)
* lisp/net/sieve.el (sieve-manage-quit): Avoid killing buffers it's
not supposed to touch (bug#54154).

lisp/net/sieve.el

index 3a6067ee10b8b2044aaf1e5d681f30709ea6ab08..c2faeaef544fedd5d46b99433bfafec23b054e94 100644 (file)
@@ -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."