Is there an easy way to delete the smallest-possible non-atomic s-expression based on the cursor location? I want to turn this (the "|" is the cursor)
(defun foo (bar)
(if bar
|789
(+ 456 123)))
into this
(defun foo (bar)
|)
It seems like a useful thing to be able to do, but I couldn't find a relevant (one-step) command on the Paredit cheat sheet.
I didn't find a predefined command either.
Fortunately, with Emacs it's really easy to implement your own.
For example:
(define-key global-map (kbd "C-c C-d")
(lambda () (interactive) (backward-up-list) (paredit-kill)))
C-M-u
does the right thing inside strings in paredit 23, so `C-M-u C-M-k' will work even inside a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With