Skip to content

Commit 975df29

Browse files
committed
listp -> sequencep
1 parent 564840a commit 975df29

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lsp-ui-doc.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ We don't extract the string that `lps-line' is already displaying."
262262
(when contents
263263
(cond
264264
((stringp contents) contents)
265-
((listp contents) ;; MarkedString[]
265+
((sequencep contents) ;; MarkedString[]
266266
(mapconcat 'lsp-ui-doc--extract-marked-string
267267
(lsp-ui-doc--filter-marked-string contents)
268268
"\n\n"

lsp-ui-sideline.el

+5-5
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ function signature)."
200200
(when contents
201201
(cond
202202
((stringp contents) contents)
203-
((listp contents) ;; MarkedString[]
204-
(--first (and (hash-table-p it)
205-
(lsp-ui-sideline--get-renderer (gethash "language" it)))
206-
contents))
203+
((sequencep contents) ;; MarkedString[]
204+
(seq-find (lambda (it) (and (hash-table-p it)
205+
(lsp-ui-sideline--get-renderer (gethash "language" it))))
206+
contents))
207207
((gethash "kind" contents) (gethash "value" contents)) ;; MarkupContent
208208
((gethash "language" contents) ;; MarkedString
209209
(and (lsp-ui-sideline--get-renderer (gethash "language" contents))
@@ -350,7 +350,7 @@ CURRENT is non-nil when the point is on the symbol."
350350
(defun lsp-ui-sideline--code-actions (actions)
351351
"Show code ACTIONS."
352352
(setq lsp-ui-sideline--code-actions actions)
353-
(dolist (action actions)
353+
(seq-doseq (action actions)
354354
(-let* ((title (->> (gethash "title" action)
355355
(replace-regexp-in-string "[\n\t ]+" " ")
356356
(concat lsp-ui-sideline-code-actions-prefix)))

0 commit comments

Comments
 (0)