[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read-regexp

From: Juri Linkov
Subject: Re: read-regexp
Date: Sun, 19 Oct 2008 02:29:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>>>> The problem is in the ambiguous name of the argument DEFAULT.
>>>> It was intended to provide exactly the same functionality as the
>>>> argument STRING-DESCRIBING-DEFAULT of the function `read-face-name',
>>>> i.e. to display in the minibuffer prompt what default the function
>>>> will use if the user types RET.
>>> The question is rather: why isn't that string available via M-n as
>>> defaults usually do?  I think adding that regexp to M-n is a better
>>> option, and that makes the use of the name `default'
>>> completely justified.
>> This string is not available via M-n due to historical requirements of
>> `occur'.  It used to display the last element of regexp-history
>> in the prompt and use it when the user types RET.  Other commands
>> that use read-regexp historically don't require such a string.
> I still don't understand.  Your occur explanation explains why it's
> displayed in the prompt and used as default value, but not why it's not
> in the M-n.

It's not in the M-n because the last history element is available in the
history list via M-p.  Since the same value is already available via
M-p and RET, we can avoid putting it to the third place - M-n, thus
making access to other values on M-n more easy with less keystrokes.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]