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
backward-delete-char-untabify-method.
> 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.
Stefan