From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Default via M-n for M-x occur Date: Fri, 09 Jul 2004 12:05:57 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <3769.217.194.34.123.1089300821.squirrel@wwws.franken.de> <87acyas80r.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1089389200 28551 80.91.224.253 (9 Jul 2004 16:06:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Jul 2004 16:06:40 +0000 (UTC) Cc: stahl@eos.franken.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jul 09 18:06:27 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BixtK-0000Ku-00 for ; Fri, 09 Jul 2004 18:06:26 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BixtK-0004IZ-00 for ; Fri, 09 Jul 2004 18:06:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BixvV-0006PL-2Y for emacs-devel@quimby.gnus.org; Fri, 09 Jul 2004 12:08:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BixvI-0006Nm-Mh for emacs-devel@gnu.org; Fri, 09 Jul 2004 12:08:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BixvI-0006NS-1C for emacs-devel@gnu.org; Fri, 09 Jul 2004 12:08:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BixvH-0006NL-Tp for emacs-devel@gnu.org; Fri, 09 Jul 2004 12:08:27 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bixt3-0002nP-Pm for emacs-devel@gnu.org; Fri, 09 Jul 2004 12:06:11 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Bixsr-0001vV-Dz; Fri, 09 Jul 2004 12:05:57 -0400 Original-To: Juri Linkov In-reply-to: <87acyas80r.fsf@mail.jurta.org> (message from Juri Linkov on Thu, 08 Jul 2004 19:55:29 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25558 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25558 Currently `occur-read-primary-args' sets the default value to the last element of the regexp history. But the whole history list is available by M-p. It makes no sense to duplicate the last history element as a default value available by M-n. Since it does have a default, that default should (for consistency) be available through M-n. What I have in mind is this change. *************** *** 757,776 **** (nreverse result)))) (defun occur-read-primary-args () ! (list (let* ((default (car regexp-history)) ! (input ! (read-from-minibuffer ! (if default ! (format "List lines matching regexp (default `%s'): " ! default) ! "List lines matching regexp: ") ! nil ! nil ! nil ! 'regexp-history))) ! (if (equal input "") ! default ! input)) (when current-prefix-arg (prefix-numeric-value current-prefix-arg)))) --- 776,792 ---- (nreverse result)))) (defun occur-read-primary-args () ! (list (let ((default (car regexp-history))) ! (read-from-minibuffer ! (if default ! (format "List lines matching regexp (default `%s'): " ! default) ! "List lines matching regexp: ") ! nil ! nil ! nil ! 'regexp-history ! default)) (when current-prefix-arg (prefix-numeric-value current-prefix-arg))))