]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix Issue 138
authorcapitaomorte <joaotavora@gmail.com>
Mon, 3 May 2010 07:12:11 +0000 (07:12 +0000)
committercapitaomorte <joaotavora@gmail.com>
Mon, 3 May 2010 07:12:11 +0000 (07:12 +0000)
yasnippet.el

index 510fdc5f7383f54b01a9aae66427ac3cd5574de1..4cbde6f003b482b9cf85e6b3c3bd6de8c1871ea7 100644 (file)
@@ -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