I'm using Paredit in Emacs to edit Lisp code. How do I delete an extra pair of parens that I accidentally inserted? Paredit does not allow this without extra commands.
((square 5))
into (square 5)
This is called paredit-splice-sexp
, keybinding is M-s
. Take a look at the paredit cheat sheet here.
Read up on barfage and slurpage.
You can also installed "paredit-menu.el" which provides a menu of actions, with tooltips that show you their effects.
Paredit occasionally gets you into a situation when the easiest thing to do is to turn it off, fix everything and turn it on again. However, it is worth the effort.
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