1

Using hungry-delete is really nice, see this Blog post. But with paredit activated, hungry-delete functions are not triggered.

paredit defines <delete> as paredit-forward-delete and DEL as paredit-backward-delete, while
hungry-delete uses key <delete> for hungry-delete-forward and DEL for hungry-delete-backward

How to get hungry-delete working in paredit-mode with keeping the features of both modes?
(This means the modes should share the DEL and <delete> key)

  • Looking at the source code, I noticed paredit-backward-delete calls backward-delete-char-untabify, so (instead of using hungry-delete) you can (setq backward-delete-char-untabify-method 'all) and to get hungry-delete like behavior from paredit-backward-delete. (Notice this only deals with the backward deletion case, it is no help at all for forward deletion.) – Omar Jun 24 '17 at 4:36
  • @Omar oh, this is nice. Is there a potential drawback from setting this variable? – jue Jun 24 '17 at 12:58
  • I don't there should be any problem using that variable, @jue, if you look at the documentation you'll see this is what it's meant to be used for. I think of setting it to all as the built in alternative to (the backwards half of) hungry delete mode. – Omar Jun 25 '17 at 0:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.