What the .emacs.d!?

I love the symbiosis between expand-region and delete-selection-mode.


;; making paredit work with delete-selection-mode
(put 'paredit-forward-delete 'delete-selection 'supersede)
(put 'paredit-backward-delete 'delete-selection 'supersede)
(put 'paredit-open-round 'delete-selection t)
(put 'paredit-open-square 'delete-selection t)
(put 'paredit-doublequote 'delete-selection t)
(put 'paredit-newline 'delete-selection t)

This makes paredit-mode work with delete-selection-mode, replacing its wrapping behavior. If I want to wrap, I'll do it with the paredit-wrap-* commands explicitly.

blog comments powered by Disqus