emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/popper 8af5e6b3bb 078/102: Don't error in popper-kill-l


From: ELPA Syncer
Subject: [elpa] externals/popper 8af5e6b3bb 078/102: Don't error in popper-kill-latest-popup (#18)
Date: Fri, 8 Sep 2023 15:58:55 -0400 (EDT)

branch: externals/popper
commit 8af5e6b3bb08a71abbafba2491e3ab001a13a067
Author: Fredrik Bergroth <fbergroth@gmail.com>
Commit: GitHub <noreply@github.com>

    Don't error in popper-kill-latest-popup (#18)
---
 popper.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/popper.el b/popper.el
index e6abf91356..ad9eb8f2d7 100644
--- a/popper.el
+++ b/popper.el
@@ -578,10 +578,12 @@ If BUFFER is not specified act on the current buffer 
instead."
 (defun popper-kill-latest-popup ()
   "Kill the latest popup-buffer and delete its window."
   (interactive)
-  (cl-destructuring-bind ((win . buf) . rest) popper-open-popup-alist
-    (pop popper-open-popup-alist)
-    (popper--delete-popup win)
-    (kill-buffer buf)))
+  (pcase (pop popper-open-popup-alist)
+    (`(,win . ,buf)
+     (popper--delete-popup win)
+     (kill-buffer buf))
+    (t
+     (message "No open popups!"))))
 
 (defun popper--suppress-p (buf)
   "Predicate to check if popup-buffer BUF needs to be suppressed."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]