From 158e8819172b144364658833db80b7aa0ef24e72 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Wed, 27 Dec 2023 20:53:25 -0800 Subject: [PATCH] use cl instead --- sideline-eglot.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sideline-eglot.el b/sideline-eglot.el index d08a87e..54c55be 100644 --- a/sideline-eglot.el +++ b/sideline-eglot.el @@ -60,8 +60,8 @@ (if sideline-eglot--ht-candidates (ht-clear sideline-eglot--ht-candidates) (setq sideline-eglot--ht-candidates (ht-create))) - (dolist (row (eglot-code-actions (point))) - (ht-set sideline-eglot--ht-candidates (getf row :title) row)) + (dolist (row (ignore-errors (eglot-code-actions (point)))) + (ht-set sideline-eglot--ht-candidates (cl-getf row :title) row)) (funcall callback (ht-keys sideline-eglot--ht-candidates))) ;;;###autoload @@ -77,12 +77,12 @@ Argument COMMAND is required in sideline backend." (lambda (candidate &rest _) (when-let* ((matching-code-action (ht-get sideline-eglot--ht-candidates candidate)) - (command (getf matching-code-action :command)) + (command (cl-getf matching-code-action :command)) (server (eglot-current-server))) (sideline-eglot--inhibit-timeout (eglot-execute-command server - (getf command :command) - (getf command :arguments)))))))) + (cl-getf command :command) + (cl-getf command :arguments)))))))) (provide 'sideline-eglot) ;;; sideline-eglot.el ends here