Skip to content

Commit

Permalink
use cl instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Dec 28, 2023
1 parent 76d3993 commit 158e881
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sideline-eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 158e881

Please sign in to comment.