From 7c8b37d922c6774d31a77cd6c7e07489cf82ae69 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Wed, 30 May 2018 11:34:26 -0600 Subject: [PATCH] Add more entries to `sp-paredit-bindings' --- smartparens.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/smartparens.el b/smartparens.el index c455e80d..eefca209 100644 --- a/smartparens.el +++ b/smartparens.el @@ -253,6 +253,7 @@ function will be considered." ("M-" . sp-splice-sexp-killing-backward) ("M-" . sp-splice-sexp-killing-forward) ("M-r" . sp-splice-sexp-killing-around) + ("M-(" . sp-wrap-round) ("C-)" . sp-forward-slurp-sexp) ;; barf/slurp ("C-" . sp-forward-slurp-sexp) ("C-}" . sp-forward-barf-sexp) @@ -262,6 +263,8 @@ function will be considered." ("C-{" . sp-backward-barf-sexp) ("C-M-" . sp-backward-barf-sexp) ("M-S" . sp-split-sexp) ;; misc + ("M-j" . sp-join-sexp) + ("M-?" . sp-convolute-sexp) ) "Paredit inspired bindings. @@ -9145,6 +9148,21 @@ comment." (forward-line 1) (indent-according-to-mode)))))))) +(defun sp-wrap-round () + "Wrap following sexp in round parentheses." + (interactive) + (sp-wrap-with-pair "(")) + +(defun sp-wrap-square () + "Wrap following sexp in square brackets." + (interactive) + (sp-wrap-with-pair "[")) + +(defun sp-wrap-curly () + "Wrap following sexp in curly braces." + (interactive) + (sp-wrap-with-pair "{")) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; show-smartparens-mode