[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup bb51a53 107/184: Merge branch 'add-initial-index'
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup bb51a53 107/184: Merge branch 'add-initial-index' |
Date: |
Wed, 6 Oct 2021 00:01:21 -0400 (EDT) |
branch: elpa/popup
commit bb51a53e995c0a634080c1cfb1ae715b380ff1b6
Merge: 8719cd9 ca3cc7f
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Merge branch 'add-initial-index'
---
README.md | 5 ++++-
popup.el | 9 ++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c2e2c3c..5da6d2f 100644
--- a/README.md
+++ b/README.md
@@ -282,7 +282,7 @@ select an item of a list.
popup-menu* list &key point around width height margin margin-left
margin-right scroll-bar symbol parent parent-offset keymap
fallback help-delay nowait prompt isearch isearch-cursor-color
- isearch-keymap isearch-callback => selected-value
+ isearch-keymap isearch-callback initial-index => selected-value
Show a popup menu of `LIST` at `POINT`. This function returns the value
of the selected item. Almost all arguments are same as `popup-create`
@@ -317,6 +317,9 @@ during event loop. The default value is
`popup-isearch-keymap`.
calls `ISEARCH-CALLBACK`, if specified, after isearch finished or
isearch canceled. The arguments is whole filtered list of items.
+If `INITIAL-INDEX` is non-nil, this is an initial index value for
+`popup-select`. Only positive integer is valid.
+
Here is an example:
(popup-menu* '("Foo" "Bar" "Baz"))
diff --git a/popup.el b/popup.el
index 877fbfc..cb3ad0b 100644
--- a/popup.el
+++ b/popup.el
@@ -1317,6 +1317,7 @@ PROMPT is a prompt string when reading events during
event loop."
(isearch-cursor-color popup-isearch-cursor-color)
(isearch-keymap popup-isearch-keymap)
isearch-callback
+ initial-index
&aux menu event)
"Show a popup menu of LIST at POINT. This function returns a
value of the selected item. Almost arguments are same as
@@ -1350,7 +1351,10 @@ during event loop. The default value is
`popup-isearch-keymap'.
ISEARCH-CALLBACK is a function taking one argument. `popup-menu'
calls ISEARCH-CALLBACK, if specified, after isearch finished or
-isearch canceled. The arguments is whole filtered list of items."
+isearch canceled. The arguments is whole filtered list of items.
+
+If `INITIAL-INDEX' is non-nil, this is an initial index value for
+`popup-select'. Only positive integer is valid."
(and (eq margin t) (setq margin 1))
(or margin-left (setq margin-left margin))
(or margin-right (setq margin-right margin))
@@ -1378,6 +1382,9 @@ isearch canceled. The arguments is whole filtered list of
items."
(if cursor
(popup-jump menu cursor)
(popup-draw menu))
+ (when initial-index
+ (popup-select menu
+ (min (- (length list) 1) initial-index)))
(if nowait
menu
(popup-menu-event-loop menu keymap fallback
- [nongnu] elpa/popup 07901c6 023/184: Merge pull request #15 from tkf/travis-ci, (continued)
- [nongnu] elpa/popup 07901c6 023/184: Merge pull request #15 from tkf/travis-ci, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 31779da 028/184: Fix test case bug when batch mode., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4a31175 033/184: Split setup macro to support extra setup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 52059d6 055/184: Merge pull request #24 from tkf/summary-overflow, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup d655fd2 057/184: Merge pull request #25 from tkf/truncated-summary, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup a33775f 047/184: Add test case:popup-menu*, popup-cascade-menu, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 6f00052 072/184: Introduce version number, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 5a892e5 063/184: Do not use summary-face for selected item, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup d1dd7c4 124/184: Merge pull request #81 from auto-complete/fix-readme-about-installation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 1f1f7a0 120/184: refactoring #80, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup bb51a53 107/184: Merge branch 'add-initial-index',
ELPA Syncer <=
- [nongnu] elpa/popup f06712a 125/184: Merge pull request #74 from kenbeese/fixed-display-with-invisible-overlays, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup b8874a4 121/184: bump up version, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 477649c 103/184: remove .gitmodules, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 51b3f59 133/184: Fix for Emacs 24.5 issue, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 795df55 150/184: Merge pull request #106 from auto-complete/issue-105, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup ee81f54 149/184: Fix faces propertized by under popup tooltip, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup c832145 145/184: Debian and Ubuntu installation instructions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 38156f0 182/184: Don’t use ‘mapcar’ for side effect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 8a5d215 181/184: Add a LICENSE file., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 0200b53 176/184: Add br, ELPA Syncer, 2021/10/06