I just started experimenting with Clojure and it is bugging me that I can't use c-hungry-delete-backwards because clojure-mode is not based on cc-mode. In other words, I want to make C-c C-backspace开发者_如何学Python delete all whitespace to the left of the cursor until it hits non-whitespace.
How can I make hungry delete or the equivalent work with Clojure + emacs? I'm not using swank or slime right now.
In my .emacs file at home I use:
(load "cc-mode")
(global-set-key (kbd "C-<delete>") 'c-hungry-delete-forward)
(global-set-key (kbd "C-<backspace>") 'c-hungry-delete-backwards)
Which gives me hungry delete everywhere.
On the other hand at work I have installed the hungry-delete package from package.el which provides hungry-delete as a minor mode which you can add to your clojure mode hook.
精彩评论