What the .emacs.d!?

Programming any lisp? Then this paredit-inspired snippet may be for you.

(defun paredit-wrap-round-from-behind ()
  (forward-sexp -1)
  (insert " ")
  (forward-char -1))

(define-key paredit-mode-map (kbd "M-)")

With point in front of a sexp, paredit-wrap-round (bound to M-(), will open a paren in front the the sexp, and place the closing paren at the end of it. That's pretty handy.

This snippet does the same, but from the other end. It saves me a C-M-b ever so often. I like it.

blog comments powered by Disqus