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

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

bug#8576: 23.2; js-mode doesn't support multi-line variable declarations


From: Dmitry Gutov
Subject: bug#8576: 23.2; js-mode doesn't support multi-line variable declarations
Date: Fri, 08 Jun 2012 03:04:16 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

> There's still one thing that I'd like to behave differently, but I
> thought I'd best discuss this first.

...

> Would that be acceptable? It'll make the code a bit more complicated,
> but I think it's worth it.

Personally, I think that's the desirable behavior, but you should keep in mind that this will require the indentation engine to look ahead in the buffer and account for the case when there's no text after the point, for example. Suppose the first value function actually has a non-empty body, and we're just typing the code for the first time. Even if we're using a snippet package that inserted "function() {}" for us, we will type the important comma after "}" only when the function body is written, and then we'll have to go back to reindent the body again.

I think that's acceptable, but that's not how indentation functions in Emacs usually work.

-- Dmitry





reply via email to

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