[Top][All Lists]

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

Re: [Nano-devel] Comment/Uncomment feature patch

From: Mike Scalora
Subject: Re: [Nano-devel] Comment/Uncomment feature patch
Date: Sun, 22 May 2016 07:28:37 -0600

On Sat, May 21, 2016 at 3:21 AM, Benno Schulenberg
<address@hidden> wrote:
> ...
> But... what is the whitespace doing there?  Programmers shouldn't
> be so nonchalant.  And if they are using syntax highlighting, the
> whitespace will be clearly visible, so it will not be surprising
> that the lines get commented.

The compiler writers are coddling them by not making the odd spacing
into syntax errors. I run with whitespace visible but most don't. You
want javascript programmers to be vigilant?

> It would be much simpler to only disregard lines that are fully
> empty, meaning: line->data[0] == '\0'.  That would stop the
> magicline from being a special case, too.

We can't stop coddling now. There will be too many bug reports.

You might have just hit tab once or twice to write a comment and then
hit the key. I would give the benefit of the doubt to the programmer
that he will make the line 'good' before saving.

> In do_comment(), you can reduce the messages at the end to
> "The line is empty"/"The lines are empty", and the parameter
> is then no longer needed, so you can rename type to action.

If only blank lines are selected, I comment now. Now the only time
nothing happens is if just the magic line is selected, so only one
error message.

"Can't comment past the end of the file."


Attachment: 0001-Add-new-comment-and-uncomment-feature-7.patch
Description: Binary data

reply via email to

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