Comment 1 for bug 328853

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi,

applied the following at myrkwid-branch, which should enable the feature.

Thanks for the request

Andreas

;;;;;;;;;;;;

=== modified file 'python-mode.el'
--- python-mode.el 2011-04-04 12:36:19 +0000
+++ python-mode.el 2011-04-05 08:41:49 +0000
@@ -939,6 +939,10 @@
     ;; who cares? XEmacs 20 does the right thing with these too).
     (define-key py-mode-map [delete] 'py-electric-delete)
     (define-key py-mode-map [backspace] 'py-electric-backspace))
+ ;; lp:328853
+ (define-key py-mode-map [?\C-c ?\d] 'py-hungry-delete-backwards)
+ (define-key py-mode-map [?\C-c ?\C-\d] 'py-hungry-delete-backwards)
+ (define-key py-mode-map [?\C-c delete] 'py-hungry-delete-forward)
   ;; Separate M-BS from C-M-h. The former should remain
   ;; backward-kill-word.
   (define-key py-mode-map [(control meta h)] 'py-mark-def-or-class)
@@ -2674,6 +2678,8 @@

 ;; Functions for moving point
+(defalias 'py-hungry-delete-forward 'c-hungry-delete-forward)
+(defalias 'py-hungry-delete-backwards 'c-hungry-delete-backwards)