Skip to content

Commit ac86c55

Browse files
committed
Remove wrapper around package-get-version
It's no longer needed now that we target Emacs 27.
1 parent 23a7e4f commit ac86c55

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

cider-util.el

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -429,19 +429,11 @@ propertized (defaults to current buffer)."
429429
(defvar cider-version)
430430
(defvar cider-codename)
431431

432-
(defun cider--pkg-version ()
433-
"Extract CIDER's package version from its package metadata."
434-
;; Use `cond' below to avoid a compiler unused return value warning
435-
;; when `package-get-version' returns nil. See #3181.
436-
;; FIXME: Inline the logic from package-get-version and adapt it
437-
(cond ((fboundp 'package-get-version)
438-
(package-get-version))))
439-
440432
(defun cider--version ()
441433
"Retrieve CIDER's version.
442434
A codename is added to stable versions."
443435
(if (string-match-p "-snapshot" cider-version)
444-
(let ((pkg-version (cider--pkg-version)))
436+
(let ((pkg-version (package-get-version)))
445437
(if pkg-version
446438
;; snapshot versions include the MELPA package version
447439
(format "%s (package: %s)" cider-version pkg-version)

test/cider-util-tests.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ buffer."
6464
(it "handles snapshot versions"
6565
(setq cider-version "0.11.0-snapshot"
6666
cider-codename "Victory")
67-
(spy-on 'cider--pkg-version :and-return-value "20160301.2217")
67+
(spy-on 'package-get-version :and-return-value "20160301.2217")
6868
(expect (cider--version) :to-equal "0.11.0-snapshot (package: 20160301.2217)")))
6969

7070
(defvar some-cider-hook)

0 commit comments

Comments
 (0)