ParEdit (paredit.el) is a minor Emacs mode for performing structured editing of S-expression data. The typical example of this would be Lisp, Scheme or Clojure source code. ParEdit helps keep parentheses balanced and adds many keys for moving S-expressions and moving around in S-expressions. WWW: https://www.emacswiki.org/emacs/ParEdit