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

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

Re: replace-regexp


From: Stefan Monnier
Subject: Re: replace-regexp
Date: Sat, 08 May 2021 19:11:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Emanuel Berg via Users list for the GNU Emacs text editor [2021-05-08 23:54:03] 
wrote:
> Stefan Monnier via Users list for the GNU Emacs text editor wrote:
>> My comment wasn't just for regexp-replacement but more
>> generally for operating on a region. So better or not will
>> depend on the specific case. In many cases either way is
>> about as good.
> In general I don't like to use `setq' and in this case it also

You can use (let ((end (copy-marker end t))) ...), of course.
I don't find it cryptic at all, but I'm probably not well placed to judge.
In any case, my main point was that using narrowing can have undesirable
side effects because narrowing has a far-reaching impact on operations
in the buffer, so depending on what you need to do within your loop you
might prefer to stay away from it (unless this far-reaching impact is
exactly what you're looking for, obviously).


        Stefan




reply via email to

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