aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2018-02-20 23:10:22 +0000
committerWilfred Hughes <me@wilfred.me.uk>2018-02-20 23:12:13 +0000
commit4abe04870467beb8a5a798773e1f145f65298e59 (patch)
tree65c7bbba80f645ae6403c52494871f273ac76777
parentdff87aea520cf4fcd161751b01754f810d5b6041 (diff)
Don't show a version if no version has been specified
If a symbol is obsolete but we don't know when, just say obsolete.
-rw-r--r--CHANGELOG.md2
-rw-r--r--helpful.el4
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 554968b..56dcb04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@ file. We now provide a button to navigate to that buffer.
Improved wording for functions with no source at all.
+Fixed an issue with obsolete aliases without version information.
+
# v0.7
Helpful buffers now start with a summary of what you're looking at,
diff --git a/helpful.el b/helpful.el
index 9ba50da..7a59d5b 100644
--- a/helpful.el
+++ b/helpful.el
@@ -210,7 +210,9 @@ Return SYM otherwise."
'callable-p callable-p)))
(cond
(obsolete-info
- (format "%s (obsolete since %s)" sym-button (-last-item obsolete-info)))
+ (-if-let (version (-last-item obsolete-info))
+ (format "%s (obsolete since %s)" sym-button version)
+ (format "%s (obsolete)" sym-button)))
(t
sym-button))))