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

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

[nongnu] elpa/popup 1510820 100/184: activate isearch in cascade menu


From: ELPA Syncer
Subject: [nongnu] elpa/popup 1510820 100/184: activate isearch in cascade menu
Date: Wed, 6 Oct 2021 00:01:20 -0400 (EDT)

branch: elpa/popup
commit 1510820222e6295c0e8e0e0c15510bc760c831c8
Author: Hiroaki Otsu <ootsuhiroaki@gmail.com>
Commit: Hiroaki Otsu <ootsuhiroaki@gmail.com>

    activate isearch in cascade menu
---
 popup.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/popup.el b/popup.el
index 43262e8..877fbfc 100644
--- a/popup.el
+++ b/popup.el
@@ -887,6 +887,8 @@ Pages up through POPUP."
   (let ((map (make-sparse-keymap)))
     ;(define-key map "\r"        'popup-isearch-done)
     (define-key map "\C-g"      'popup-isearch-cancel)
+    (define-key map "\C-b"      'popup-isearch-close)
+    (define-key map [left]      'popup-isearch-close)
     (define-key map "\C-h"      'popup-isearch-delete)
     (define-key map (kbd "DEL") 'popup-isearch-delete)
     map))
@@ -980,6 +982,11 @@ HELP-DELAY is a delay of displaying helps."
                ((eq binding 'popup-isearch-cancel)
                 (popup-isearch-update popup "" callback)
                 (cl-return t))
+               ((eq binding 'popup-isearch-close)
+                (popup-isearch-update popup "" callback)
+                (setq unread-command-events
+                      (append (listify-key-sequence key) 
unread-command-events))
+                (cl-return nil))
                ((eq binding 'popup-isearch-delete)
                 (if (> (length pattern) 0)
                     (setq pattern (substring pattern 0 (1- (length 
pattern))))))
@@ -1219,7 +1226,11 @@ PROMPT is a prompt string when reading events during 
event loop."
                                                :scroll-bar (popup-scroll-bar 
menu)
                                                :parent menu
                                                :parent-offset index
-                                               :help-delay help-delay))
+                                               :help-delay help-delay
+                                               :isearch isearch
+                                               :isearch-cursor-color 
isearch-cursor-color
+                                               :isearch-keymap isearch-keymap
+                                               :isearch-callback 
isearch-callback))
                   (and it (cl-return it)))
             (if (eq binding 'popup-select)
                 (cl-return (popup-item-value-or-self item))))))



reply via email to

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