Skip to content

Commit 34328c6

Browse files
yaaamaWilfred
authored andcommitted
handle package-version safely to prevent listp error
When `package-version' is not what we expect (e.g a simple string), a `listp` error is thrown and you are unable to view the variable documentation due to it. This now handles it and provides a fallback value.
1 parent 4ba24ca commit 34328c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

helpful.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,8 +1317,8 @@ Return nil otherwise."
13171317
(package-version
13181318
(format
13191319
"This variable was added, or its default value changed, in %s version %s."
1320-
(car package-version)
1321-
(cdr package-version)))
1320+
(or (car-safe package-version) "unknown")
1321+
(or (cdr-safe package-version) "unknown")))
13221322
(emacs-version
13231323
(format
13241324
"This variable was added, or its default value changed, in Emacs %s."

0 commit comments

Comments
 (0)