comparison lisp/ilisp/completer.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents ec9a17fef872
children 360340f9fd5f
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
266 ;;; 266 ;;;
267 (defun completer-choice (string choices delimiters use-words) 267 (defun completer-choice (string choices delimiters use-words)
268 "Return the best match of STRING in CHOICES with DELIMITERS between 268 "Return the best match of STRING in CHOICES with DELIMITERS between
269 words and T if it is unique. A match is unique if it is the only 269 words and T if it is unique. A match is unique if it is the only
270 possibility or when USE-WORDS the only possibility with the same 270 possibility or when USE-WORDS the only possibility with the same
271 number of words. The shortest string of multiple possibilities will be 271 number of words. The shortest string of multiple possiblities will be
272 the best match." 272 the best match."
273 (or (if (null (cdr choices)) (cons (car choices) t)) 273 (or (if (null (cdr choices)) (cons (car choices) t))
274 (let* ((regexp (concat "[^" delimiters "]*[" delimiters "]")) 274 (let* ((regexp (concat "[^" delimiters "]*[" delimiters "]"))
275 (words (if use-words (completer-words regexp string))) 275 (words (if use-words (completer-words regexp string)))
276 (choice choices) 276 (choice choices)