more compatible with dropdown-list.el

This commit is contained in:
Zhang Chiyuan 2008-03-16 03:41:12 +00:00
parent c571a1ebc5
commit 1b45a9d545

View File

@ -769,12 +769,14 @@ You can also use this in window-system.
NOTE: You need to download and install dropdown-list.el to use this."
(if (fboundp 'dropdown-list)
(yas/template-content
(cdr (nth (dropdown-list (mapcar (lambda (i)
(let ((n (dropdown-list (mapcar (lambda (i)
(yas/template-name
(cdr i)))
templates))
templates)))
templates))))
(if n
(yas/template-content
(cdr (nth n templates)))
nil))
(error "Please download and install dropdown-list.el to use this")))
(defun yas/popup-for-template (templates)