branch: elpa/sly commit 954e5dad72fb5712dfa968222e2b46dfdf9a476c Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
Per #339: don't sly-eval from c-a-p-f function unless SLY connected * lib/sly-completion.el (sly--completion-request-completions): Check sly-connected-p. --- lib/sly-completion.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/sly-completion.el b/lib/sly-completion.el index 922dc8b..4c78780 100644 --- a/lib/sly-completion.el +++ b/lib/sly-completion.el @@ -161,11 +161,12 @@ immediately." (defun sly--completion-request-completions (pattern slyfun) "Request completions for PATTERN using SLYFUN. SLYFUN takes two arguments, a pattern and a package." - (let* ((sly-current-thread t)) - (sly--responsive-eval - (completions `(,slyfun ,(substring-no-properties pattern) - ',(sly-current-package))) - completions))) + (when (sly-connected-p) + (let* ((sly-current-thread t)) + (sly--responsive-eval + (completions `(,slyfun ,(substring-no-properties pattern) + ',(sly-current-package))) + completions)))) (defun sly-simple-completions (prefix) "Return (COMPLETIONS COMMON) where COMPLETIONS complete the PREFIX.