Last active
October 2, 2015 12:48
-
-
Save doitian/2245733 to your computer and use it in GitHub Desktop.
Use popup.el in yasnippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'popup) | |
(require 'yasnippet) | |
;; add some shotcuts in popup menu mode | |
(define-key popup-menu-keymap (kbd "M-n") 'popup-next) | |
(define-key popup-menu-keymap (kbd "TAB") 'popup-next) | |
(define-key popup-menu-keymap (kbd "<tab>") 'popup-next) | |
(define-key popup-menu-keymap (kbd "<backtab>") 'popup-previous) | |
(define-key popup-menu-keymap (kbd "M-p") 'popup-previous) | |
(defun yas/popup-isearch-prompt (prompt choices &optional display-fn) | |
(when (featurep 'popup) | |
(popup-menu* | |
(mapcar | |
(lambda (choice) | |
(popup-make-item | |
(or (and display-fn (funcall display-fn choice)) | |
choice) | |
:value choice)) | |
choices) | |
:prompt prompt | |
;; start isearch mode immediately | |
:isearch t | |
))) | |
(setq yas/prompt-functions '(yas/popup-isearch-prompt yas/no-prompt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It does't work for me, minibuffer shows this :"funcall: Symbol's function definition is void: yas/popup-isearch-prompt"