[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] out comment every line
From: |
Lars Madsen |
Subject: |
Re: [AUCTeX] out comment every line |
Date: |
Tue, 3 Mar 2015 14:43:26 +0000 |
If I just to
(TeX-comment-region beg end)
(goto-char end)
I'm no longer at the end of the region. '% ' was added, so the region is now
longer.
I'm surely also missing something a lot easier here.
/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/address@hidden / More information:
http://au.dk/en/address@hidden
________________________________________
From: Nicolas Richard address@hidden
Sent: 03 March 2015 13:46
To: Lars Madsen
Cc: address@hidden
Subject: Re: out comment every line
Lars Madsen <address@hidden> writes:
> If you run TeX-comment-region it will out comment the lines that are
> not blank. How can I tell it to comment everyline even if it is blank?
Since Tassilo answered this part already, let's look at the story :
> I'm using this in a macro that cleans up some 'strange' syntax into a
> more normal env based stuff. But I'd like to keep the original. So the
> macro detects the material, copies it, outcomments the region
At this point you know where the region ends, don't you ?
> and has
> to insert the converted stuff after the commented area.
>
> but after TeX-comment-region, the cursor may still be inside the
> commented area, so I need to get out.
So you could use it here.
I know I missed something because this was too obvious, but what did I
miss ?
--
Nicolas Richard