[Top][All Lists]

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

Re: gas-mode.el - Comments welcome

From: Stefan Monnier
Subject: Re: gas-mode.el - Comments welcome
Date: Thu, 31 May 2007 13:07:08 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>> - it seems that comment-start, comment-start-skip, comment-end,
>> comment-end-skip are not defined.

> Not sure where what they would be needed for.  I'm providing my own
> fill functions.  Did I overlook anything?

It's used by all the functions in newcomment.el, including comment-dwim.
What do you gain by not defining them?

>> - not sure if I like the "use forward-sexp to jump to next occurrence of
>> highlighted symbol".  In conjunction with C-M-t for example, this is odd.
>> The intention of forwrd-sexp-function is to allow the use of elisp code
>> when the syntax-table isn't flexible enough to describe some "sexps"
>> (e.g. sexps like "begin ... end").  If you want to extend the semantics of
>> C-M-f (rather than forward-sexp which may very well be called
>> non-interactively by other pieces of Elisp code) then rebind this
>> key sequence.

> The idea why I didn't bind it to a key directly is that I wanted it to
> show up wherever the user has bound a syntax-based jump to.
> forward-sexp seemed the nearest match.

I still don't understand.  If you don't want to hard code C-M-f but just use
whichever binding the user has chosen for forward-sexp, then just use

>> Also its description of comment-dwim doesn't quite match my
>> understanding of it.  AFAIK it doesn't treat "comment with leading
>> white space" specially and it doesn't remove comments unless
>> provided with a C-u prefix.

> For the latter, it does.  That's part of the 'dwim'.

I wrote comment-dwim, so I'm surprised.  In which case exactly does
comment-dwim remove comments without providing it with a C-u prefix?
Unless maybe you mean "uncomment" instead of "remove comment" (but the two
are very different).

> For the former, it means that it tries to remove only the kind of comment
> point is on, leaving the others untouched.  There are different kinds of
> comments, starting in different columns, thus the 'leading white space'.
> I don't know of an other programming mode which has this distinction so
> I cannot say how it treats it.

Without even defining comment-start and other such variables, I'm really
surprised that comment-dwim would do all that.  And even if you define it,
I can't see how/where this happens, because I never thought of such
features (which doesn't mean that there might be clever ways to use the
command which I hadn't thought of).  But also as a user I don't understand
what that means.


reply via email to

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