8

When editing lisp code, I often end up with trailing parentheses scattered around (assuming | is point):

(defun example-function ()
  (let ((x (+ 1 1)))
    (when x
      (message x)|
      )
    ))

Are there any convenience commands for fixing this? Either in core Emacs, paredit/smartparens, or other packages?

I know I can press ) and paredit-close-round will fix the next parenthesis, but I want to fix all of them in one command.

Drew
  • 75,699
  • 9
  • 109
  • 225
Wilfred Hughes
  • 6,890
  • 2
  • 29
  • 59

1 Answers1

7

i (lispy-tab) from lispy does just that. Below is a screenshot of an ERT test visualization (using xv (lispy-view-test)).

lispy-tab

abo-abo
  • 13,943
  • 1
  • 29
  • 43