From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ben North" Newsgroups: gmane.emacs.devel Subject: Re: query-replace and command-history Date: Wed, 26 Feb 2003 15:26:02 -0000 (GMT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <59867.141.162.101.251.1046273162.squirrel@www.redfrontdoor.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1046273583 6606 80.91.224.249 (26 Feb 2003 15:33:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 26 Feb 2003 15:33:03 +0000 (UTC) Cc: rms@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18o3XB-0001bx-00 for ; Wed, 26 Feb 2003 16:31:49 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18o3na-0000Jm-00 for ; Wed, 26 Feb 2003 16:48:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18o3XL-0004O1-00 for emacs-devel@quimby.gnus.org; Wed, 26 Feb 2003 10:31:59 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18o3WZ-0003Mw-00 for emacs-devel@gnu.org; Wed, 26 Feb 2003 10:31:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18o3WQ-0003EF-00 for emacs-devel@gnu.org; Wed, 26 Feb 2003 10:31:02 -0500 Original-Received: from [217.114.166.155] (helo=excalibur.blacknightsolutions.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18o3RU-0008Nn-00; Wed, 26 Feb 2003 10:25:56 -0500 Original-Received: from blacknightsolutions.com (localhost.localdomain [127.0.0.1]) h1QFQ2j26518; Wed, 26 Feb 2003 15:26:02 GMT Original-Received: from 141.162.101.251 (SquirrelMail authenticated user rfd_ben) by www.redfrontdoor.org with HTTP; Wed, 26 Feb 2003 15:26:02 -0000 (GMT) Original-To: X-Priority: 3 Importance: Normal X-Mailer: SquirrelMail (version 1.2.11) X-MailScanner: Found to be clean X-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.3, required 9, EMAIL_ATTRIBUTION, SPAM_PHRASE_00_01, SUBJ_HAS_UNIQ_ID) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11982 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11982 I recently wrote: > I would like to propose the following patch to replace.el, which > modifies the behaviour of `query-replace' and friends slightly, > when `transient-mark-mode' is turned on. > > [ Messy patch which hacks around with `command-history' directly ] RMS replied: > I will fix this in a cleaner way. I've just looked at the most recent code in Savannah, and the fix is indeed cleaner. I think one small bug remains, though. If you give a prefix argument to `map-query-replace-regexp' by pressing C-u (as opposed to C-u 4), you get a if: Wrong type argument: number-or-marker-p, (4) error. This patch fixes that: diff -u HEAD-replace.el new-replace.el --- HEAD-replace.el 2003-02-26 14:08:57.000000000 +0000 +++ new-replace.el 2003-02-26 14:39:15.000000000 +0000 @@ -252,7 +252,7 @@ from) nil nil nil 'query-replace-history from t)) - (list from to current-prefix-arg + (list from to (prefix-numeric-value current-prefix-arg) (if (and transient-mark-mode mark-active) (region-beginning)) (if (and transient-mark-mode mark-active) Thanks, Ben. ---- This e-mail messages has been scanned by MailScanner and is believed to be clean of dangerous content and virus'. http://www.mailscanner.info