pmarinov / clean-aindent-mode

Emacs extension for simple indent and unindent
Other
32 stars 7 forks source link

interaction with subword-mode #6

Closed abred closed 8 years ago

abred commented 8 years ago

Hi,

great mode :)

However I have a minor issue when using it in combination with subword-mode M-DEL should delete the previous subword. Yet clean-aindent-mode overwrites this behavior and executes kill-word (if not in indent space). I'm currently using this hack, but maybe there is a cleaner solution

-(kill-word (- arg))  ;; Original "C-backspace" key function
+(if subword-mode
+    (subword-kill (- arg))
+  (kill-word (- arg)))  ;; Original "C-backspace" key function
pmarinov commented 8 years ago

I'm glad you find it useful. I will take a look at a possible implementation tonight or tomorrow.

In the worst case, if there is no any nicer way, we can use your implementation with the added check about whether we have subword-kill available and then call it.

abred commented 8 years ago

is fixed in emacs 25 (word-boundary table is updated and the default commands are used)