mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Fix Issue 138
This commit is contained in:
parent
54c4b7db00
commit
eb40f84432
12
yasnippet.el
12
yasnippet.el
@ -1572,17 +1572,19 @@ TEMPLATES is a list of `yas/template'."
|
|||||||
(when (featurep 'dropdown-list)
|
(when (featurep 'dropdown-list)
|
||||||
(let (formatted-choices
|
(let (formatted-choices
|
||||||
filtered-choices
|
filtered-choices
|
||||||
chosen
|
d
|
||||||
d)
|
n)
|
||||||
(dolist (choice choices)
|
(dolist (choice choices)
|
||||||
(setq d (or (and display-fn (funcall display-fn choice))
|
(setq d (or (and display-fn (funcall display-fn choice))
|
||||||
choice))
|
choice))
|
||||||
(when (stringp d)
|
(when (stringp d)
|
||||||
(push d formatted-choices)
|
(push d formatted-choices)
|
||||||
(push choice filtered-choices)))
|
(push choice filtered-choices)))
|
||||||
(setq chosen (and formatted-choices
|
|
||||||
(nth (dropdown-list formatted-choices)
|
(setq n (and formatted-choices (dropdown-list formatted-choices)))
|
||||||
filtered-choices))))))
|
(if n
|
||||||
|
(nth n filtered-choices)
|
||||||
|
(keyboard-quit)))))
|
||||||
|
|
||||||
(defun yas/completing-prompt (prompt choices &optional display-fn completion-fn)
|
(defun yas/completing-prompt (prompt choices &optional display-fn completion-fn)
|
||||||
(let (formatted-choices
|
(let (formatted-choices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user