comparison lisp/ilisp/completer.no-fun.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
257 ;;; 257 ;;;
258 (defun completer-choice (string choices delimiters use-words) 258 (defun completer-choice (string choices delimiters use-words)
259 "Return the best match of STRING in CHOICES with DELIMITERS between 259 "Return the best match of STRING in CHOICES with DELIMITERS between
260 words and T if it is unique. A match is unique if it is the only 260 words and T if it is unique. A match is unique if it is the only
261 possibility or when USE-WORDS the only possibility with the same 261 possibility or when USE-WORDS the only possibility with the same
262 number of words. The shortest string of multiple possibilities will be 262 number of words. The shortest string of multiple possiblities will be
263 the best match." 263 the best match."
264 (or (if (null (cdr choices)) (cons (car choices) t)) 264 (or (if (null (cdr choices)) (cons (car choices) t))
265 (let* ((regexp (concat "[^" delimiters "]*[" delimiters "]")) 265 (let* ((regexp (concat "[^" delimiters "]*[" delimiters "]"))
266 (words (if use-words (completer-words regexp string))) 266 (words (if use-words (completer-words regexp string)))
267 (choice choices) 267 (choice choices)