[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup 28cb27c 074/184: Add next/previous page commands.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup 28cb27c 074/184: Add next/previous page commands. |
Date: |
Wed, 6 Oct 2021 00:01:10 -0400 (EDT) |
branch: elpa/popup
commit 28cb27c728f8cfae5f91954c4700a8a75289c97f
Author: kostafey <kostafey@gmail.com>
Commit: kostafey <kostafey@gmail.com>
Add next/previous page commands.
---
popup.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/popup.el b/popup.el
index 443e41b..875fa6d 100644
--- a/popup.el
+++ b/popup.el
@@ -832,6 +832,20 @@ KEYMAP is a keymap that will be put on the popup contents."
(popup-scroll-top popup) scroll-top)
(popup-draw popup)))
+(defun popup-page-next (popup)
+ "Select next item of POPUP per `popup-height' range.
+Pages down through POPUP."
+ (let ((counter 0))
+ (dotimes (counter (1- (popup-height popup)))
+ (popup-next popup))))
+
+(defun popup-page-previous (popup)
+ "Select previous item of POPUP per `popup-height' range.
+Pages up through POPUP."
+ (let ((counter 0))
+ (dotimes (counter (1- (popup-height popup)))
+ (popup-previous popup))))
+
(defun popup-scroll-down (popup &optional n)
"Scroll down N of POPUP and draw."
(let ((scroll-top (min (+ (popup-scroll-top popup) (or n 1))
@@ -1195,6 +1209,10 @@ PROMPT is a prompt string when reading events during
event loop."
(popup-next menu))
((eq binding 'popup-previous)
(popup-previous menu))
+ ((eq binding 'popup-page-next)
+ (popup-page-next menu))
+ ((eq binding 'popup-page-previous)
+ (popup-page-previous menu))
((eq binding 'popup-help)
(popup-menu-show-help menu))
((eq binding 'popup-isearch)
@@ -1329,6 +1347,9 @@ the sub menu."
(define-key map "\C-p" 'popup-previous)
(define-key map [up] 'popup-previous)
+ (define-key map [next] 'popup-page-next)
+ (define-key map [prior] 'popup-page-previous)
+
(define-key map [f1] 'popup-help)
(define-key map (kbd "\C-?") 'popup-help)
- [nongnu] elpa/popup 03b23bf 017/184: Merge branch 'master' of github.com:m2ym/popup-el, (continued)
- [nongnu] elpa/popup 03b23bf 017/184: Merge branch 'master' of github.com:m2ym/popup-el, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup c85ccd3 013/184: Use inhibit-read-only instead of buffer-read-only, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2609811 022/184: Add Travis CI configuration, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e76230b 059/184: Add summary-face keyword argument to popup-set-line-item, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup ab23548 031/184: Change popup-test-helper-overlays-to-text spec and function name to return overlays buffer., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 498cb64 061/184: Define popup-summary-face, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 54ed4bd 048/184: Add test case:popup-next, popup-previous, popup-select, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup fd8a372 039/184: Remove unused code., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 72c6e4d 027/184: Port some test cases from popup-interactive-test.el, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 180516e 079/184: Use cl-lib functions instead of cl, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 28cb27c 074/184: Add next/previous page commands.,
ELPA Syncer <=
- [nongnu] elpa/popup 7fda072 042/184: Add check for row position., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2593e06 071/184: Add test for #18, #19, #20, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 48b0fa4 020/184: Add a simple test using ERT, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e208b13 035/184: Setup for batch mode, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 9814c88 038/184: Add test for test helper, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 581f35b 062/184: Define popup-menu-summary-face, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4e19acb 036/184: Remove dependency on auto-complete, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup bec50cc 076/184: Merge pull request #41 from kostafey/master, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4e8824e 051/184: Add some make rules for test., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup f2fc154 058/184: Add summary-face keyword argument to popup-create-line-string, ELPA Syncer, 2021/10/06