help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Edit default of M-x replace-regexp


From: Xah
Subject: Re: Edit default of M-x replace-regexp
Date: Thu, 14 Aug 2008 13:32:02 -0700 (PDT)
User-agent: G2/1.0

> Hi everybody,
>
On Aug 14, 12:10 pm, Corey Foote <coreyfo...@hotmail.com> wrote:
> I've got a quick question. I did M-x replace-regexp and
> entered a regexp and newstring only to realize (after pressing return and 
> seeing
> the replacement fail) that the newstring I entered was not quite right. When I
> type M-x replace-regexp again, I get the choice to use my last replacement as 
> the
> default. Is there a way to edit this default (particularly the newstring part
> of the default) so that I don't have to type everything all over again?

For me, i've always just used the up/down arrow key to go back or
forward history.

What i typically do is call query-replace-regexp, then press return if
last used pair is good, else just use up arrow or down arrow to cycle.

query-replace-regexp's default shortcut is Ctrl+Alt+Shift+%. Too many
keystrokes. I just alias it to qrr.

(defalias 'qrr 'query-replace-regexp)

  Xah
∑ http://xahlee.org/

reply via email to

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