- (setq highlight (ecomplete-highlight-match-line matches line))
- (while (not (memq (setq command (read-event highlight)) '(? return)))
- (cond
- ((eq command ?n)
- (setq line (min (1+ line) max-lines)))
- ((eq command ?p)
- (setq line (max (1- line) 0))))
- (setq highlight (ecomplete-highlight-match-line matches line)))
- (when (eq command 'return)
- (nth line (split-string matches "\n"))))))
+ (if (not choose)
+ (progn
+ (message "%s" matches)
+ nil)
+ (setq highlight (ecomplete-highlight-match-line matches line))
+ (while (not (memq (setq command (read-event highlight)) '(? return)))
+ (cond
+ ((eq command ?\M-n)
+ (setq line (min (1+ line) max-lines)))
+ ((eq command ?\M-p)
+ (setq line (max (1- line) 0))))
+ (setq highlight (ecomplete-highlight-match-line matches line)))
+ (when (eq command 'return)
+ (nth line (split-string matches "\n")))))))