From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: JURTA Message-ID: <874ngrsecv.fsf@mail.jurta.org> References: <877glsyecw.fsf@gmail.com> <87621cfhff.fsf@mail.jurta.org> <87d2vfbtup.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362389457 32108 80.91.229.3 (4 Mar 2013 09:30:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Mar 2013 09:30:57 +0000 (UTC) Cc: 13687@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 04 10:31:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCRjr-0007TI-No for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Mar 2013 10:31:19 +0100 Original-Received: from localhost ([::1]:56079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRjW-0004MO-AU for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Mar 2013 04:30:58 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRjR-0004MH-Rx for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2013 04:30:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCRjM-0006Ox-Pf for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2013 04:30:53 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRjM-0006Ot-KY for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2013 04:30:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UCRjZ-000546-Tf for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2013 04:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Mar 2013 09:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13687-submit@debbugs.gnu.org id=B13687.136238945319452 (code B ref 13687); Mon, 04 Mar 2013 09:31:01 +0000 Original-Received: (at 13687) by debbugs.gnu.org; 4 Mar 2013 09:30:53 +0000 Original-Received: from localhost ([127.0.0.1]:58229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UCRjR-00053g-Dm for submit@debbugs.gnu.org; Mon, 04 Mar 2013 04:30:53 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:53626 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UCRjO-00053Y-ON for 13687@debbugs.gnu.org; Mon, 04 Mar 2013 04:30:51 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id D6418258B92902; Mon, 4 Mar 2013 01:30:34 -0800 (PST) In-Reply-To: <87d2vfbtup.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 04 Mar 2013 11:16:06 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72065 Archived-At: > 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.