Permalink
Browse files

when multiple choices occured, select one

  • Loading branch information...
1 parent c1bfd55 commit bac5b9d3ee66f4d2d51bda0fcdab052d0ebb4589 @cubicdaiya cubicdaiya committed Oct 10, 2009
Showing with 5 additions and 3 deletions.
  1. +5 −3 cppref.el
View
@@ -91,11 +91,13 @@ browser."
(if (not reference)
(error (concat "no document found for " name)))
(if candidates
- (error (concat "multiple choices for " name ":\n\t"
- (mapconcat 'identity candidates "\n\t"))))
-
+ (setq reference (cppref-select-from-multiple-choices
+ candidates)))
(cppref-visit-reference reference)))
+(defun cppref-select-from-multiple-choices (choices)
+ (completing-read "multiple choies. push tab key. select :" choices nil t ""))
+
(defun cppref-init-doc-dir ()
(if (not cppref-doc-dir)
(let* ((library-path (find-library-name "cppref"))

0 comments on commit bac5b9d

Please sign in to comment.