Article View: gnu.emacs.help
Article #188714Re: Anyone have a replace-regexp-region ? (here's one)
From: Andrew Sharpe
Date: Tue, 18 Jun 1991 19:24
Date: Tue, 18 Jun 1991 19:24
23 lines
1272 bytes
1272 bytes
(defun replace-region-regex (reg-begin reg-end)
"Replace regular expression in region."
(interactive "r")
(save-excursion
(save-restriction
(narrow-to-region reg-begin (1- reg-end))
(goto-char (point-min))
(call-interactively 'replace-regexp))))
> peterf@csis.dit.csiro.au (Peter A Fletcher) writes:
>
>> Hello there! I was wondering if anyone had an elisp
>> function to replace regexps in only the currently selected
>> region ? It would be a really handy thing to have around.
--
Andrew Sharpe uunet!sco!asharpe
---------------------------------
"Chuang Tzu dreamt he was a butterfly and did not know, when he awoke, if
he was a man who had dreamt he was a butterfly or a butterfly who now
dreamt he was a man."
Technical Details
Message-ID:
<12667@scolex.sco.COM>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!sco!asharpeReferences:
<HOLLEY.91Jun14140110@fog.sono.uucp>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,d85fd313923f4612 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-06-18 16:39:13 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!sco!asharpe From: asharpe@scolex.UUCP (Andrew Sharpe) Newsgroups: gnu.emacs.help Subject: Re: Anyone have a replace-regexp-region ? (here's one) Message-ID: <12667@scolex.sco.COM> Date: 18 Jun 91 19:24:50 GMT References: <HOLLEY.91Jun14140110@fog.sono.uucp> Sender: news@sco.COM Lines: 23