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

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

[elpa] externals/popper 8bd65b4267 057/102: Changed popup-delete functio


From: ELPA Syncer
Subject: [elpa] externals/popper 8bd65b4267 057/102: Changed popup-delete functionality to use quit-window
Date: Fri, 8 Sep 2023 15:58:53 -0400 (EDT)

branch: externals/popper
commit 8bd65b4267b7bc56288af81ee4e5029f30bd2b2c
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    Changed popup-delete functionality to use quit-window
    
    Popups that are displayed in regular windows (as opposed to side windows) 
should
    now toggle gracefully (without deleting the window if it was already 
showing a
    buffer.)
---
 README.org |  8 +++++---
 popper.el  | 10 +++-------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index fa5b6844eb..e742e94840 100644
--- a/README.org
+++ b/README.org
@@ -62,11 +62,12 @@ Additionally, you can turn a regular window into a popup 
(or vice-versa) with =p
     (setq popper-reference-buffers
           '("\\*Messages\\*"
             "Output\\*$"
+            "\\*Async Shell Command\\*"
             help-mode
             compilation-mode))
     (popper-mode +1))
 #+END_SRC
-See [[*Customization][Customization]] for details on specifying buffer types 
as popups.
+See the Customization section for details on specifying buffer types as popups.
 
 ** Without =use-package=
 #+BEGIN_SRC emacs-lisp
@@ -74,13 +75,14 @@ See [[*Customization][Customization]] for details on 
specifying buffer types as
   (setq popper-reference-buffers
         '("\\*Messages\\*"
           "Output\\*$"
+          "\\*Async Shell Command\\*"
           help-mode
           compilation-mode))
   (global-set-key (kbd "C-`") 'popper-toggle-latest)  
   (global-set-key (kbd "M-`") 'popper-cycle)  
   (popper-mode +1)
 #+END_SRC
-See [[*Customization][Customization]] for details on specifying buffer types 
as popups.
+See the Customization section for details on specifying buffer types as popups.
 
 * Customization
 :PROPERTIES:
@@ -116,7 +118,7 @@ To get started, customize this variable:
   
   This list includes the the Messages and =help-mode= buffers from before, 
along with a predicate: any buffer derived from the major mode 
=fundamental-mode= that has fewer than 10 lines will be considered a popup. 
 
-  Note that for performance reasons, predicates that classify a buffer as a 
popup are only run when the buffer is created. Thus dynamically changing a 
buffer's popup status based on its changing state is not possible (yet).
+  Note that for performance reasons, predicates that classify a buffer as a 
popup are /only run when the buffer is created/. Thus dynamically changing a 
buffer's popup status based on its changing state is not possible (yet).
   
   There are other customization options, check the =popper= group.
 
diff --git a/popper.el b/popper.el
index 53235cc117..433ec5834f 100644
--- a/popper.el
+++ b/popper.el
@@ -400,7 +400,7 @@ Each element of the alist is a cons cell of the form 
(window . buffer)."
                                           nil nil 'equal))))
       (pop popper-open-popup-alist)
       (with-selected-window win
-        (bury-buffer)
+        ;; (bury-buffer) ;; Unnecessary when using quit-window
         ;;only close window when window has a parent or in a child frame:
         (popper--delete-popup win)))))
 
@@ -430,13 +430,9 @@ a popup buffer to open."
   "Delete popup window WIN in a manner appropriate to its type."
   (when (window-valid-p win)
     (cond
-     ((window-parent win) (delete-window win))
+     ((window-parent win) (quit-window nil win))
      ((frame-parent) (delete-frame))
-     (t (if-let* ((wob (window-prev-buffers win))
-                  (bprev (caar wob))
-                  (blivep (buffer-live-p bprev)))
-            (with-selected-window win
-              (switch-to-buffer bprev)))))))
+     (t (quit-window nil win)))))
 
 (defun popper--modified-mode-line ()
   "Return modified mode-line string."



reply via email to

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