[Top][All Lists]

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

Re: python-mode (python.el): python-backspace

From: Dave Love
Subject: Re: python-mode (python.el): python-backspace
Date: Fri, 04 Jun 2004 16:41:16 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Hmm... in my world, only Python and Haskell have a notion of a "valid"
> indentation.

I'm obviously in a different world, but `indentation rules' meant what
the indentation engine does, not whether indentation is significant.

> All others all any indentation whatsoever.  In most modes, it
> is true that the syntax is redundant enough that there is little choice
> given a particular indentation style, but indentation style is not
> always followed, and auto-indentation doesn't always work correctly.

I'm not convinced that a specific binding of DEL would help most of
the time in such cases.

> Several major modes use a M-TAB binding to "delete one level of
> indentation".

That seems pretty broken.  Which ones?

> I think binding such a command to DEL makes perfect sense.

I think it would break various things (even if it did check for being
outside strings and comments), and I don't think that it makes sense
in most of the modes I use, including programming language ones.  I'm
sure it shouldn't be the default for DEL.

> But it would be good to allow modes like python-mode to tune its
> behavior to be more correct.

Well, I still maintain that Python and Haskell, for instance, should
have specialized behaviour for TAB and DEL which aren't likely to
result from tuning anything else.

>> What's wrong with `backward-delete-char-untabify-method' for that?
> Nothing, other than the fact that it does not include "delete to prev level
> of indent".  Oh and that you first have to bind
> backward-delete-char-untabify globally and then set the variable (and that
> some major modes might then "gratuitously" override the binding locally, of
> course).

That seems to apply to anything you change globally.  At least that
gives people/modes a hook to change things if they want to, assuming
the global binding of DEL to backward-delete-char-untabify with
default value of nil, but I don't see the need to break compatibility
to do that sort of thing at all.

reply via email to

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