[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/popper 3584603390 013/102: Setting up project awareness
From: |
ELPA Syncer |
Subject: |
[elpa] externals/popper 3584603390 013/102: Setting up project awareness |
Date: |
Fri, 8 Sep 2023 15:58:50 -0400 (EDT) |
branch: externals/popper
commit 3584603390ccfa35890f8feb3e129a769369c350
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Setting up project awareness
popper-popup-status is now a cons cell that looks like
'(popup . "~/path/to/project")
---
popper.el | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/popper.el b/popper.el
index ad014a773b..f15652e530 100644
--- a/popper.el
+++ b/popper.el
@@ -58,6 +58,7 @@
(require 'cl-lib)
(require 'subr-x)
+(require 'project)
(defvar popper-mode)
@@ -141,6 +142,9 @@ Display Action Alists\") for details on the alist."
'raised : This is a POPUP buffer raised to regular status by the user.
'user-popup: This is a regular buffer lowered to popup status by the user.")
+(defvar popper-limit-to-project t
+ "Limit popups to those corresponding to the current project.")
+
(defun popper-select-popup-at-bottom (buffer &optional _alist)
"Display and switch to popup-buffer BUFFER at the bottom of the screen."
(let ((window (display-buffer-in-side-window
@@ -168,9 +172,9 @@ This is intended to be used in `display-buffer-alist'."
(pcase popper-display-control
('user
(with-current-buffer buffer
- (eq popper-popup-status 'user-popup)))
+ (eq (car popper-popup-status) 'user-popup)))
('t (with-current-buffer buffer
- (memq popper-popup-status '(popup user-popup)))))))
+ (memq (car popper-popup-status) '(popup user-popup)))))))
(defun popper-find-popups (test-buffer-list)
"Return an alist corresponding to popups in TEST-BUFFER-LIST.
@@ -180,12 +184,15 @@ Each element of the alist is a cons cell of the form
(window . buffer)."
(dolist (b test-buffer-list open-popups)
(let ((popup-status (buffer-local-value 'popper-popup-status b)))
(when (and (not (minibufferp b))
- (not (eq popup-status 'raised))
- (or (member popup-status '(popup user-popup))
+ (not (eq (car popup-status) 'raised))
+ (or (member (car popup-status) '(popup user-popup))
(popper-popup-p b)))
(with-current-buffer b
- (setq popper-popup-status (or popup-status
- 'popup)))
+ (setq popper-popup-status (cons (or (car popup-status)
+ 'popup)
+ (when popper-limit-to-project
+ (or (project-root
(project-current))
+ default-directory)))))
(push (cons (get-buffer-window b) b)
open-popups))))))
@@ -197,7 +204,7 @@ Each element of the alist is a cons cell of the form
(window . buffer)."
(open-popups (popper-find-popups open-buffers))
(closed-popups (cl-remove-if-not
(lambda (arg)
- (memq (buffer-local-value 'popper-popup-status (cdr
arg))
+ (memq (car (buffer-local-value 'popper-popup-status
(cdr arg)))
'(popup user-popup)))
(cl-set-difference popper-open-popup-alist
open-popups
@@ -320,7 +327,7 @@ If BUFFER is not specified,raise the current buffer."
(when-let* ((buf (get-buffer (or buffer (current-buffer))))
(popup-status (buffer-local-value 'popper-popup-status buf)))
(with-current-buffer buf
- (setq popper-popup-status (and (popper-popup-p buf) 'raised))
+ (setf (car popper-popup-status) (and (popper-popup-p buf) 'raised))
(setq mode-line-format (default-value 'mode-line-format)))
(delete-window (get-buffer-window buf))
(pop-to-buffer buf)))
@@ -331,7 +338,7 @@ If BUFFER is not specified,raise the current buffer."
If BUFFER is not specified act on the current buffer instead."
(let ((buf (get-buffer (or buffer (current-buffer)))))
(with-current-buffer buf
- (setq popper-popup-status (if (popper-popup-p buf)
+ (setf (car popper-popup-status) (if (popper-popup-p buf)
'popup
'user-popup))
(delete-window (get-buffer-window buf t))
@@ -345,7 +352,7 @@ If BUFFER is not specified act on the current buffer
instead."
(interactive)
(let* ((buf (get-buffer (or buffer (current-buffer))))
(popup-status (buffer-local-value 'popper-popup-status buf)))
- (pcase popup-status
+ (pcase (car popup-status)
((or 'popup 'user-popup) (popper-raise-popup buf))
(_ (popper-lower-to-popup buf)))))
- [elpa] externals/popper 898e04b38b 004/102: Fixed errors in defcustom options, (continued)
- [elpa] externals/popper 898e04b38b 004/102: Fixed errors in defcustom options, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 4bff39358e 015/102: Removed unnecessary progn, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a1f0f33566 011/102: Linting for MELPA + added License (GPL v3), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 07c2c14435 005/102: Typos in README.org, ELPA Syncer, 2023/09/08
- [elpa] externals/popper b0e48719fd 008/102: Logic fix in popper.el, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 238dae1e46 025/102: Removed redundant info from documentation, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 500d1d477c 021/102: Fixed duplication bug, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 03dc41c315 019/102: More robust minor mode definition, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 1a059a5973 009/102: Reduced surface area of package, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a27500408c 023/102: Enhancements, see details, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 3584603390 013/102: Setting up project awareness,
ELPA Syncer <=
- [elpa] externals/popper 9eb1a8cbd8 006/102: Merge pull request #1 from syohex/fix-minimum-version, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 35e266d984 031/102: Add support for fullscreen popups, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 598571f025 041/102: Started work on buffer-hiding feature, ELPA Syncer, 2023/09/08
- [elpa] externals/popper b120c6836c 042/102: extract window height determining function, ELPA Syncer, 2023/09/08
- [elpa] externals/popper c96915cb77 043/102: Merge commit 'b120c68' into feature, ELPA Syncer, 2023/09/08
- [elpa] externals/popper cd975ac5b8 047/102: Updated README with new features, popups by predicate, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 1312c0f0f6 053/102: Added video demo of buffer hiding, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 851d838821 065/102: Extracted popper-echo into a separate library, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 7afd502b3b 068/102: Fixed popper-echo display when the group is a symbol, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 667dcdd063 069/102: Added badge, ELPA Syncer, 2023/09/08