[Top][All Lists]

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

Re: hungry-delete in other modes

From: Stefan Monnier
Subject: Re: hungry-delete in other modes
Date: Tue, 22 Feb 2011 20:48:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> 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]