Mercurial > hg > xemacs-beta
diff lisp/behavior.el @ 5666:daf5accfe973
Use #'test-completion, minibuf.el, instead of implementing same.
lisp/ChangeLog addition:
2012-05-14 Aidan Kehoe <kehoea@parhasard.net>
Update minibuf.el to use #'test-completion, use the generality of
recent completion changes to avoid some unnecessary consing when
reading.
* behavior.el (read-behavior):
* cus-edit.el (custom-face-prompt):
* cus-edit.el (widget-face-action):
* faces.el (read-face-name):
* minibuf.el:
* minibuf.el (minibuffer-completion-table):
* minibuf.el (exact-minibuffer-completion-p):
Removed. #'test-completion is equivalent to this, but more
general.
* minibuf.el (minibuffer-do-completion-1): Use #'test-completion.
* minibuf.el (completing-read): Update the documentation of the
arguments used for completion.
* minibuf.el (minibuffer-complete-and-exit): Use #'test-completion.
* minibuf.el (exit-minibuffer): Use #'test-completion.
* minibuf.el (minibuffer-smart-mouse-tracker): Use #'test-completion.
* minibuf.el (read-color): No need to construct a completion table
separate from the colour list.
src/ChangeLog addition:
2012-05-14 Aidan Kehoe <kehoea@parhasard.net>
* minibuf.c (Ftest_completion):
Correct some documentation here.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 14 May 2012 08:46:05 +0100 |
parents | cc6f0266bc36 |
children | 66d2f63df75f |
line wrap: on
line diff
--- a/lisp/behavior.el Sat May 12 18:12:13 2012 +0100 +++ b/lisp/behavior.el Mon May 14 08:46:05 2012 +0100 @@ -345,16 +345,10 @@ for history command, and as the value to return if the user enters the empty string." (let ((result - (completing-read - prompt - (let (list) - (maphash #'(lambda (key value) - (push (cons (symbol-name key) value) list)) - behavior-hash-table) - list) - nil must-match initial-contents (or history 'behavior-history) - default-value))) - (if (and result (stringp result)) + (completing-read prompt behavior-hash-table nil must-match + initial-contents (or history 'behavior-history) + default-value))) + (if (stringp result) (intern result) result)))