Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete extra parens in Paredit mode?

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)

like image 849
Sathish Avatar asked Jan 05 '13 09:01

Sathish


2 Answers

This is called paredit-splice-sexp, keybinding is M-s. Take a look at the paredit cheat sheet here.

like image 177
Michiel Borkent Avatar answered Oct 22 '22 00:10

Michiel Borkent


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.

like image 29
Phil Lord Avatar answered Oct 22 '22 01:10

Phil Lord