[Top][All Lists]

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

hungry-delete in other modes

From: Christoph
Subject: hungry-delete in other modes
Date: Tue, 22 Feb 2011 18:21:17 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

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.

Right now, this does not seem to possible easily, because python-mode
does not inherit from cc-mode, correct?

I can do 

(require 'cc-mode)
(global-set-key (kbd "C-<delete>") 'c-hungry-delete-forward)
(global-set-key (kbd "C-<backspace>") 'c-hungry-delete-backwards)

which enables the hungry-delete globally, but I would like to have some
more finer control over the behavior and set it up in a mode-hook, like

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


reply via email to

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