|
From: | Leo |
Subject: | Any objection to adding completing-read-function? |
Date: | Tue, 28 Dec 2010 08:03:48 +0000 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.2.91 (Mac OS X 10.6.5) |
Hello all, I have been locally using a variable like that to replace completing-read with ido-completing-read and it appears to me to improve efficiency in many places. So I wonder if there is any objection to adding a new variable completing-read-function that when set replaces completing-read? Let me know if I should submit it to the bug tracker. After applying the attached patch, one may customise it like this: (setq completing-read-function 'ido-completing-read*) (defun ido-completing-read* (prompt choices &optional predicate require-match initial-input hist def inherit-input-method) (if (and (listp choices) (not (functionp choices))) (ido-completing-read prompt (if (listp (car choices)) (mapcar 'car choices) choices) predicate require-match initial-input hist def inherit-input-method) (let ((completing-read-function nil)) (completing-read prompt choices predicate require-match initial-input hist def inherit-input-method)))) Here are some screenshots: I switching to a bookmark:
bookmark.png
Description: PNG image
Switching to a branch in magit:
emacs.png
Description: PNG image
Loading lisp systems in slime:
slime.png
Description: PNG image
Patch:
crf.diff
Description: Text Data
Cheers, Leo
[Prev in Thread] | Current Thread | [Next in Thread] |