diff options
| author | Sau P <sau@yaaama.xyz> | 2024-08-28 10:28:16 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2025-01-31 08:45:49 -0800 |
| commit | 34328c639ed7aad371a3f57209acad2a5bb66401 (patch) | |
| tree | 3ab7b2a7cdaa74f9c7eabcd5148512630ce4a07b | |
| parent | 4ba24cac9fb14d5fdc32582cd947572040e82b2c (diff) | |
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.
| -rw-r--r-- | helpful.el | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1317,8 +1317,8 @@ Return nil otherwise." (package-version (format "This variable was added, or its default value changed, in %s version %s." - (car package-version) - (cdr package-version))) + (or (car-safe package-version) "unknown") + (or (cdr-safe package-version) "unknown"))) (emacs-version (format "This variable was added, or its default value changed, in Emacs %s." |
