smartparens
smartparens copied to clipboard
Add macros `sp-get-when` and `sp-get-if`
This will allow us to reduce the nesting of forms such as this
(-when-let (ok (sp-get-sexp))
(sp-get ok
(kill-region :beg-in :end-in)
(goto-char :beg-in)))
by one level. This is used a lot in SP.
Older code (before dash control macros) uses
(let ((ok (save-excursion (sp-forward-sexp arg))))
(when ok (sp--unwrap-sexp ok))
ok)
which can also be replaced.