unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ben North" <ben@redfrontdoor.org>
Cc: rms@gnu.org
Subject: Re: query-replace and command-history
Date: Wed, 26 Feb 2003 15:26:02 -0000 (GMT)	[thread overview]
Message-ID: <59867.141.162.101.251.1046273162.squirrel@www.redfrontdoor.org> (raw)

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

             reply	other threads:[~2003-02-26 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 15:26 Ben North [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-20 18:12 query-replace and command-history Ben North
2003-02-21 21:43 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59867.141.162.101.251.1046273162.squirrel@www.redfrontdoor.org \
    --to=ben@redfrontdoor.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).