From eb40f8443225fcbe38b931aca43cfcf68b8d79a1 Mon Sep 17 00:00:00 2001 From: capitaomorte Date: Mon, 3 May 2010 07:12:11 +0000 Subject: [PATCH] Fix Issue 138 --- yasnippet.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/yasnippet.el b/yasnippet.el index 510fdc5..4cbde6f 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1572,17 +1572,19 @@ TEMPLATES is a list of `yas/template'." (when (featurep 'dropdown-list) (let (formatted-choices filtered-choices - chosen - d) + d + n) (dolist (choice choices) (setq d (or (and display-fn (funcall display-fn choice)) choice)) (when (stringp d) (push d formatted-choices) (push choice filtered-choices))) - (setq chosen (and formatted-choices - (nth (dropdown-list formatted-choices) - filtered-choices)))))) + + (setq n (and formatted-choices (dropdown-list formatted-choices))) + (if n + (nth n filtered-choices) + (keyboard-quit))))) (defun yas/completing-prompt (prompt choices &optional display-fn completion-fn) (let (formatted-choices