Mercurial > hg > xemacs-beta
comparison lisp/ilisp/completer.el @ 30:ec9a17fef872 r19-15b98
Import from CVS: tag r19-15b98
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:52:29 +0200 |
parents | b82b59fe008d |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
29:7976500f47f9 | 30:ec9a17fef872 |
---|---|
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 possiblities will be | 271 number of words. The shortest string of multiple possibilities 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) |