|
From: | Dmitry Gutov |
Subject: | Re: make project--find-in-file generic, add interactive filename to project-find-file |
Date: | Mon, 1 Feb 2016 11:08:59 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 |
On 01/31/2016 05:23 PM, Stefan Monnier wrote:
The idea of putting it before &optional is to force people to try and think if there'd be a good default. Lots of packages use completing-read without passing a default simply because the author doesn't know about that feature.
IMHO, that might be a good reason to put DEFAULT right after &optional, but not before. We'll mention this argument several times more in the docstring, so it's not likely to be forgotten.
On the other hand, lots of GUI applications use the previous input as the default, in the absence of better choice. So we can consider making HIST non-optional, and use it for the default value when DEFAULT is not specified.
Other functions might still use minibuffer-complete-and-exit. And for other functions we should just make sure that the behavior is still correct (even if not perfect) and that they have enough info to make the behavior "perfect".
I suppose we can add a new global variable, that both minibuffer-complete-and-exit and the non-default completion-read-function's will look at.
[Prev in Thread] | Current Thread | [Next in Thread] |