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

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

quick 'perform last replace again'


From: Phil Carmody
Subject: quick 'perform last replace again'
Date: 21 Apr 2008 13:12:26 +0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Subject line seems to describe the question succinctly.

I've been inserting some typedefs in some C code, and using 
query-replace to turn uint8_t's into whatever_t's. However,
I'm only changing a small proportion of each match, so it 
became a drag. I'd rather just have the ability to move and 
scroll around the file (so _not_ in query-replace mode), and 
when I spot something that needs to be changed I'd like to 
just move the cursor onto the line containing it, press some 
magic key sequence, and have it replace either the first 
(or all) instances of the most-recently-used match with the
most-recently-used replacement on the current line. I do not
want to be left in query-replace mode - I want to then 
continue editing.

And by 'match' I don't mean the most recently used incremental
search, I mean the last thing used as a FROM-STRING in a 
replace-string or query-replace.

I'm quite prepared to have a solution which wraps those
functions in order to store some state.

It looks like it should be quite an easy task, but I'm
exceptionally rusty currently.

Cheers,
Phil
-- 
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration


reply via email to

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