diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2022-09-19 22:22:42 +0200 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2023-03-15 12:19:10 +0100 |
commit | 35c0d9ab6303734a5741403b30bb5f46f5ab82ec (patch) | |
tree | b33c0a17b31a1d2050d8676584d57ba621a91d87 | |
parent | f19bb0075dc0fba8c5b8fed4e277aa5e0a2ef09d (diff) |
feat: Add extra guard for SLY evaluation
-rw-r--r-- | nyxt.el | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -135,11 +135,13 @@ connect Slynk to it." (setq nyxt-process nil))))))) ((or (nyxt--system-process-p) nyxt-process) - (with-current-buffer (sly-mrepl--find-buffer) - (unless (string= (sly-current-package) "nyxt-user") - (sly-mrepl--eval-for-repl '(slynk-mrepl:guess-and-set-package "nyxt-user"))) - (nyxt-sly-eval sexps) - (nyxt-exwm-focus-window :focus focus)))))) + (if (sly-mrepl--find-buffer) + (with-current-buffer (sly-mrepl--find-buffer) + (unless (string= (sly-current-package) "nyxt-user") + (sly-mrepl--eval-for-repl '(slynk-mrepl:guess-and-set-package "nyxt-user"))) + (nyxt-sly-eval sexps) + (nyxt-exwm-focus-window :focus focus)) + (error "No SLY REPL buffer found")))))) (defun nyxt-extension-p (system &optional symbol) "Check if Nyxt extension SYSTEM exists in the ASDF source registry. @@ -177,7 +179,7 @@ Optionally test if SYMBOL is bound." (defun nyxt-init () "Start Nyxt and focus on its window." (interactive) - (nyxt-run '(nothing) :focus t :autostart t)) + (nyxt-run nil :focus t :autostart t)) ;;;###autoload (defun nyxt-quit () |