bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp)


From: Juri Linkov
Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp): Let-bind `default' to the first
Date: Mon, 04 Mar 2013 11:28:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> The question was one of how `read-regexp' should behave?
>
> If (car DEFAULTS) is nil should it offer (car SUGGESTIONS) as a default
> or offer an empty string for default.

As bug#13805 indicates, `read-regexp' should return an empty string
when the caller specifies that (car DEFAULTS) is nil.

This is like what `read-from-minibuffer' does.  But note that
`read-from-minibuffer' is even more strict, and doesn't return
the default value even if it's specified, i.e. typing RET
after evaluating

(read-from-minibuffer "Prompt: " nil nil nil nil "default")

returns an empty string instead of the default value.
This is because its arg DEFAULT-VALUE acts more like
a suggestion available for M-n whose values should not be
returned for empty input.





reply via email to

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