[Top][All Lists]

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

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

From: Benno Schulenberg
Subject: Re: [Nano-devel] Comment/Uncomment feature patch
Date: Tue, 03 May 2016 10:41:03 +0200

On Mon, May 2, 2016, at 14:11, Mike Scalora wrote:
> On Sun, May 1, 2016 at 1:55 PM, Benno Schulenberg
> <address@hidden> wrote:
> > Maybe use what is used for parsing the arguments
> > of color commands.
> That one has some funky rules about embedded " but not with a
> space/blank after them. I don't want to break anyone's existing syntax
> files or inherit the odd rule.
> I would rather leave it as is if you are OK with it.

Yeah, it's fine.  It's nice to be able to quote the arguments of
linter and formatter.  But don't rename pick_up_name();
that's something for a separate patch.

> > Yes, but that is most likely not where the cursor was when
> > the commenting or uncommenting action was done.  It should
> > put the cursor back where it was.
> done.


> > I don't like the position of the comment command.  I think it should
> > be at the beginning, after the header and magic and linter commands,
> > not among the color commands.
> That's where I was aiming but missed, moved it.

They're still among the color commands...  :|

You also still have this declaration inside a for statement.  Fix it.
I can't even compile the thing when it's there.

And please learn to snip all text you're not responding to.

> > Comments should start with a capital and end with a period.
> > There needs to be a space after commands like 'while', and
> > around operands like '=='.   In the man page, sentences need
> > to be double spaced, and better punctuated.

Double-spaced sentences mean: a double space after the period.
That's what groff does when a period is at the end of the line.
So, for harmony, all sentences need a double space between them.

Also, there are some functions that are not preceded by a comment.
Each function needs one.  Further, comments among the declarations
need to be indented and /after/ the one they refer to.  And there should
be no * at the end of a comment line that continues on the next.

Further, undo_comment_action() does not seem to be a good name;
it does both undo and redo.  Maybe handle_comment_action() is better.

In do_comment() you don't need the variable comment_seq_len; it
isn't used again.  Also put all declarations at the start of the function,
not these bools in the middle.  And you don't need line_modified.
And instead of passing a bool add_comment, wouldn't it be easier
to just pass the action type?

> There's one == without spaces from the iTerm2 4/2/16 patch. Do you want
> a separate patch to fix that or let it go?

Send a separate patch, if you will.


-- - A fast, anti-spam email service.

reply via email to

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