Skip to content

Commit

Permalink
lsp-package-version: fallback to hardcode when fail
Browse files Browse the repository at this point in the history
  • Loading branch information
kiennq committed Dec 27, 2024
1 parent 9de4050 commit d9b4f49
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -9606,10 +9606,12 @@ This avoids overloading the server with many files when starting Emacs."
(declare-function package--alist "ext:package")

(defun lsp-package-version ()
"Returns a string with the version of the lsp-mode package"
(package-version-join
(package-desc-version
(car (alist-get 'lsp-mode (package--alist))))))
"Returns a string with the version of the lsp-mode package."
(condition-case nil
(package-version-join
(package-desc-version
(car (alist-get 'lsp-mode (package--alist)))))
(error "9.0.1")))

(defun lsp-version ()
"Return string describing current version of `lsp-mode'."
Expand Down

0 comments on commit d9b4f49

Please sign in to comment.