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

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

Re: emacs insert icrement numbers


From: David Kastrup
Subject: Re: emacs insert icrement numbers
Date: Fri, 18 Aug 2006 08:38:31 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Jim Ottaway <j.ottaway@lse.ac.uk> writes:

> Regards,
>
> Pascal Bourguignon <pjb@informatimago.com> writes:
>
>> With latest versions (>=22), you can use \,form in the the substitutions.
>>
>> For example, select a region and:
>>
>> M-x replace-regexp RET \(.*\) RET 
>>     \,(progn(defvar n 0)(format "%3d " (incf n)))\1 RET
>>
>
> Or
>
> M-x replace-regexp RET ^ RET \,\#  
>
> [there are two spaces after the '\#'. I don't know why it needs 2 rather
> than one, though]

To distinguish this from
\,\#1
for example.  The space terminates \#.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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