Skip to content

Commit fbd08a5

Browse files
committed
Move lsp-treemacs-wcb-unless-killed in lsp-treemacs-generic
1 parent a48763b commit fbd08a5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lsp-treemacs-generic.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
(defvar-local lsp-treemacs--right-click-actions nil)
3333
(defvar-local lsp-treemacs-generic-filter nil)
3434

35+
(defmacro lsp-treemacs-wcb-unless-killed (buffer &rest body)
36+
"`with-current-buffer' unless buffer killed."
37+
(declare (indent 1) (debug t))
38+
`(when (buffer-live-p (get-buffer ,buffer))
39+
(with-current-buffer ,buffer
40+
,@body)))
41+
3542
(defun lsp-treemacs-generic-refresh (&optional _cache)
3643
(condition-case _err
3744
(let ((inhibit-read-only t))

lsp-treemacs.el

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,13 +590,6 @@ will be rendered an empty line between them."
590590
(-let (((_ _package _class jar-file) (s-match "jdt://contents/.*\/\\(.*\\)\/\\(.*\\).class\\?=.*?/\\(.*?\\)=\/" file)))
591591
(symbol-name (read (url-unhex-string jar-file )))))
592592

593-
(defmacro lsp-treemacs-wcb-unless-killed (buffer &rest body)
594-
"`with-current-buffer' unless buffer killed."
595-
(declare (indent 1) (debug t))
596-
`(when (buffer-live-p (get-buffer ,buffer))
597-
(with-current-buffer ,buffer
598-
,@body)))
599-
600593
(defun lsp-treemacs--get-xrefs-in-file (file-locs location-link)
601594
(-let (((filename . links) file-locs))
602595
(list :key filename

0 commit comments

Comments
 (0)