[Top][All Lists]

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

Re: hungry-delete in other modes

From: Nathaniel Flath
Subject: Re: hungry-delete in other modes
Date: Tue, 22 Feb 2011 21:23:12 -0500

I actually ran into this before, and ended up moving the necessary machinery out of cc-mode into it's own mode.  You can take a look at

Nathaniel Flath
On Tue, Feb 22, 2011 at 8:48 PM, Stefan Monnier <address@hidden> wrote:
> I really like the hungry-delete minor mode that cc-mode provides, so I
> would like to have it in other modes, specifically Python mode.

For DEL at least, you can

 (global-set-key [?\^?] 'backward-delete-char-untabify)

and even control it via buffer-local settings of

> Is there any reason why hungry-delete mode (or subword mode or
> auto-newline mode for that matter) is so tightly coupled with cc-mode?

Because the CC-mode author wanted to provide the feature to all CC-mode
users and/or did not make the effort to try and submit this feature for
separate inclusion in Emacs.

> Would it be possible to decouple them and make the functionality
> available to other modes as a minor mode instead of them being just
> "minor-mode-like features" in cc-mode?

Of course it's possible.  As a matter of fact we do have subword-mode,
as well as electric-layout-mode.


reply via email to

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