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

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

Re: one key-press to comment out lines of code?


From: Emanuel Berg
Subject: Re: one key-press to comment out lines of code?
Date: Thu, 01 May 2014 17:03:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> I already pointed out that M-; will nest.  And that
> it will unnest, but only if the region contains only
> commented lines.

OK, you mean uncomment-region will uncomment this,
while M-; will comment it additionally?

;; code
code

Then, one has to wonder why the second line is included
in the region to begin with? I guess, if you use this
on big chunks of code with comments and code
interleaved, it might be useful.

>> > A DWIM command is often limited this way; it is a
>> > compromise.
>>
>> It doesn't have to be.
>
> It has to be.  It is a guess wrt what any given user
> wants at any given time.

Yes, but from the users' perspective they know what
state gives what behaviour, so it is just an
alternative way (a better, often) to tell the computer
what to do. Or not having to do anything to still tell
the computer that, if the state is already ripe for
executing the command with a certain behaviour in
mind. And if the DWIM command is good, that should
happen more often than not.

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

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