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

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

Re: Adding String to Beginning of Lines


From: Christopher Dimech
Subject: Re: Adding String to Beginning of Lines
Date: Wed, 11 Nov 2020 19:35:02 +0100

> Sent: Wednesday, November 11, 2020 at 7:12 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Adding String to Beginning of Lines
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > Have put the following, bet the insert is not progressing to the
> > last line of the selected region.  I started my selected region
> > on the first character of 'RFrec-field-nwltok' and ended my
> > selected region on the last character of 'insert'.
>
> Oh, of course, while inserting the stuff your specified end position
> gets outdated.  You can use a marker instead of a number:
>
>   (copy-marker (region-end))

I did not consider that detail.

> it will automatically be adjusted.  Arithmetic relations like `<' also
> accept markers, so you don't need to rewrite your code.
>
> BTW, your function calls `region-beginning' and `region-end' in the
> interactive spec and a second time in the function body: The function
> arguments BEG and END are ignored in the body.  That makes no sense.

You are correct, have now changed those parts.

> Michael.
>
>
>



reply via email to

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