[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Any objection to adding completing-read-function?
From: |
Stefan Monnier |
Subject: |
Re: Any objection to adding completing-read-function? |
Date: |
Tue, 21 Jun 2011 21:50:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> +(defun completing-read-default (prompt collection &optional predicate
> require-match
> + initial-input hist def
> inherit-input-method)
Please stay within 80 columns.
> + "Default method for reading from the minibuffer with completion.
> +See `completing-read' for the meaning of the arguments."
> + (let* ((minibuffer-completion-table collection)
> + (minibuffer-completion-predicate predicate)
> + (minibuffer-completion-confirm (not require-match))
This `not' doesn't preserve the behavior when `confirm' is not t.
> + (keymap (if require-match
> + (if minibuffer-completing-file-name
The C code checks (memq minibuffer-completing-file-name '(nil
lambda)) instead. Are you sure your code is correct, and if so why?
> + (result (read-from-minibuffer prompt initial-input keymap
> + nil hist def inherit-input-method)))
The C code does some funny dance with the initial-input before passing
it to read_minibuf, which read-from-minibuffer (and your code) doesn't
do, so I suspect that your code does not preserve the
corresponding behavior.
Stefan