emacs-devel
[Top][All Lists]
Advanced

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

Re: Just a thought about comment-line


From: Yuri Khan
Subject: Re: Just a thought about comment-line
Date: Sun, 31 May 2020 16:57:37 +0700

On Sun, 31 May 2020 at 14:40, PEDRO ANDRES ARANDA GUTIERREZ <paranda@it.uc3m.es>

> Take any file, code or not, but let's say it is code...
> Now select two or more lines. The mark should be at the beginning of a line
> and the point at the beginning of a line two or more lines further down. If 
> you copy this region and paste it somewhere else you get what you want.
>
> However let's suppose that your theme is highlighting the region and you 
> comment the region with M-x comment-line. You will have the line at the point:
> 1.- not highlighted before M-x comment-line
> 2.- commented after M-x comment-line

Since you are selecting whole lines to be commented, you might find
comment-dwim (M-;) more to your liking. (If you select partial lines,
it may also split them if the current mode only has end-of-line
comments.)

FWIW I agree with you: a region that ends at the physical start of
line, before indentation, should not be considered to include that
line.



reply via email to

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