[Top][All Lists]

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

Re: query-replace and command-history

From: Ben North
Subject: Re: query-replace and command-history
Date: Wed, 26 Feb 2003 15:26:02 -0000 (GMT)

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)


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 @@
               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)
           (if (and transient-mark-mode mark-active)



This e-mail messages has been scanned by MailScanner and is believed to be
clean of dangerous content and virus'.

reply via email to

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