Skip to content

Commit 4200ed6

Browse files
committed
Minor improve code snippet from last commit
1 parent 58d2547 commit 4200ed6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ Then, put the `emacs-lsp-booster` binary in your $PATH (e.g. `~/.local/bin`).
9494
(not (functionp 'json-rpc-connection)) ;; native json-rpc
9595
(executable-find "emacs-lsp-booster"))
9696
(progn
97-
(let ((command-from-exec-path (executable-find (car orig-result))))
98-
(when command-from-exec-path
99-
(setcar orig-result command-from-exec-path)))
97+
(when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
98+
(setcar orig-result command-from-exec-path))
10099
(message "Using emacs-lsp-booster for %s!" orig-result)
101100
(cons "emacs-lsp-booster" orig-result))
102101
orig-result)))

0 commit comments

Comments
 (0)