GNU bug report logs - #20915
25.0.50; [js-mode] electric annoyances

Previous Next

Package: emacs;

Reported by: Rasmus <rasmus <at> gmx.us>

Date: Sun, 28 Jun 2015 11:47:02 UTC

Severity: minor

Found in version 25.0.50

Full log


Message #44 received at 20915 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Rasmus <rasmus <at> gmx.us>, monnier <at> iro.umontreal.ca
Cc: 20915 <at> debbugs.gnu.org
Subject: Re: bug#20915: 25.0.50; [js-mode] electric annoyances
Date: Mon, 29 Jun 2015 11:49:56 +0300
On 06/29/2015 04:26 AM, Rasmus wrote:

> What about differentiating between functions saved to a var or an object
> slot:
>
>      var foo = function(a,b){...};
>      baz.f = function(a,b){...};
>
> Versus functions that are not saved.
>
>      [1,2,3].map(function(d){...});
>
> Is that identifiable and desirable?
>
> I'm expect Dmitry has a better understanding of this issue.

Looks doable: you skip to the current "function" keyword and see if it's 
preceded by an assignment operator.

An electric-layout-rules element can be a function, so that's not a problem.

> And you would not consider the lonely "]" an stylistic annoyance?  That, I
> guess, is the work of electric layout.

I'm not sure it is. Before we start guessing, why don't you write down 
the minimal configuration needed to reproduce this? Start with 'emacs -Q'.




This bug report was last modified 10 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.