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

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

bug#5586: 23.1.92.1; Electric indentation and hungry backspace deletion


From: Lennart Borgman
Subject: bug#5586: 23.1.92.1; Electric indentation and hungry backspace deletion in JavaScript mode (js-mode)
Date: Mon, 29 Mar 2010 00:37:24 +0200

On Sun, Mar 28, 2010 at 10:58 PM, Daniel Colascione
<dan.colascione@gmail.com> wrote:
>
> The chief difficulty I see is that in some modes, indentation isn't
> idempotent: if you ran indent-line-function from some generic electric
> code, it might change the indentation of the current line in unwanted
> ways. (Imagine python-mode, where indent-line-function cycles through
> feasible indentation levels for a given line.)
>
> At best, modes would have to opt-in, and if each mode needs some glue
> anyway, why not just let each mode handle electric characters itself?


Because without something like indent-line-function you can not handle
it in a more generic way.

The absense of this in some major modes has for example costed me a
lot of burden in mumamo (the framework in nXhtml for mult major modes
in a buffer). Actually indent-line-function is not generic enough. One
more level is needed: one that computes the desirable indentation.






reply via email to

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