[Top][All Lists]

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

Re: New comment-sexp command and key bind

From: Artur Malabarba
Subject: Re: New comment-sexp command and key bind
Date: Fri, 21 Aug 2015 13:24:46 +0100

2015-08-21 12:31 GMT+01:00 João Távora <address@hidden>:
> This is interesting, I just tried it.
> Was it your intention to make the uncommenting behaviour for
> consecutive sexps different from the commenting behaviour? The former
> keeps point at the beginning of the sexp, while the latter advances
> one sexp. I thing they should be uniform.

Yes, it was intentional, though I'm still experimenting with the
command so that's up for discussion.

- When uncommenting, it leaves point exactly where it was unless you
provide a prefix argument. With a prefix argument, it uncomments that
many sexps and moves point after them.

- When commenting, we always move point after the commented region
(the prefix argument still specifies a number of sexps to comment).

The only reason for this is that it's what seemed most useful to me. I
never want point to be inside a sexp I just commented out (what could
I possibly want to do with it?). OTOH, when I UNcomment something, I
sometimes want to edit it afterwards (sometimes I don't, like I said,
up for discussion).

> I would prefer to *not* advance sexps. But I realize that that has the
> drawback that it is difficult to advance one recently commented sexp.

I really like advancing when commenting.
It lets me comment a series of sexps by just holding down C-M- and
then repeatedly hitting ; (of course, I can use the prefix arg for
this, but sometimes I'm deciding which sexps to comment on the fly).
Like you mention, it's also hard to manually forward-sexp after having
commented it.

reply via email to

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