Hungry delete
Bug #328853 reported by
Rbreu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
I really love the hungry-delete feature of Emacs'
c-mode. It would be great to have hungry-delete for
python-mode as well.
[http://
Related branches
lp:~a-roehler/python-mode/myrkwid
Merged
into
lp:python-mode
- python-mode.el developers: Pending requested
-
Diff: 5004 lines (+2516/-1849)5 files modifiedUnicodeEncodeError-lp:550661-test.py (+4/-0)
py-bug-numbered-tests.el (+738/-245)
python-mode-test.el (+202/-0)
python-mode-tests.sh (+88/-0)
python-mode.el (+1484/-1604)
Changed in python-mode: | |
assignee: | nobody → Andreas Roehler (a-roehler) |
Changed in python-mode: | |
status: | New → In Progress |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi,
applied the following at myrkwid-branch, which should enable the feature.
Thanks for the request
Andreas
;;;;;;;;;;;;
=== modified file 'python-mode.el' delete) backspace) ) delete- backwards) delete- backwards) delete- forward) def-or- class)
--- 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-
(define-key py-mode-map [backspace] 'py-electric-
+ ;; lp:328853
+ (define-key py-mode-map [?\C-c ?\d] 'py-hungry-
+ (define-key py-mode-map [?\C-c ?\C-\d] 'py-hungry-
+ (define-key py-mode-map [?\C-c delete] 'py-hungry-
;; Separate M-BS from C-M-h. The former should remain
;; backward-kill-word.
(define-key py-mode-map [(control meta h)] 'py-mark-
@@ -2674,6 +2678,8 @@
;; Functions for moving point delete- forward 'c-hungry- delete- forward) delete- backwards 'c-hungry- delete- backwards)
+(defalias 'py-hungry-
+(defalias 'py-hungry-