Fix void-variable sp-get-thing

When smartparens is disabled.
This commit is contained in:
Henrik Lissner 2021-02-15 14:57:14 -05:00
parent be9b3ff352
commit 91f8d3e5d0

View file

@ -66,7 +66,9 @@ If `buffer-file-name' isn't set, uses `default-directory'."
"Delete back to the previous column of whitespace, or as much whitespace as
possible, or just one char if that's not possible."
(interactive)
(let* ((context (ignore-errors (sp-get-thing)))
(let* ((context
(if (bound-and-true-p smartparens-mode)
(ignore-errors (sp-get-thing))))
(op (plist-get context :op))
(cl (plist-get context :cl))
open-len close-len)