Skip to content

Commit 888dc9c

Browse files
committed
Do not need to use setf when using push to update buffers.
Remove unnecessary setf, push will mutate the buffer list in place.
1 parent 669c7c4 commit 888dc9c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lsp-metals-treeview.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,8 @@ the WORKSPACE."
170170
(defun lsp--metals-treeview-add-buffer (workspace buffer)
171171
"Add the BUFFER to the list of treeview buffers associated with
172172
the WORKSPACE."
173-
(-when-let* ((state (lsp--metals-treeview-get-data workspace))
174-
(buffers (push buffer (lsp--metals-treeview-data-buffers state))))
175-
(setf (lsp--metals-treeview-data-buffers state) buffers)))
173+
(-when-let (state (lsp--metals-treeview-get-data workspace))
174+
(push buffer (lsp--metals-treeview-data-buffers state))))
176175

177176
(defun lsp--metals-treeview-remove-buffers (workspace)
178177
"Clear the buffers stored within treeview state data in

0 commit comments

Comments
 (0)