commit 8176a22e5520a78e4aee236ff78d794809d1418f parent 80d97bcb4e5b4dbabda93cd2296bd40d76dad50d Author: Wilfred Hughes <me@wilfred.me.uk> Date: Sat, 3 Jun 2017 17:18:22 +0100 Handle function having no callers Diffstat:
| M | helpful.el | | | 14 | +++++++++----- |
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/helpful.el b/helpful.el @@ -363,11 +363,15 @@ state of the current symbol." (or (helpful--format-properties helpful--sym) "No properties.") (helpful--heading "\n\nReferences\n") - (if source-path - (format "Callers in %s:\n%s" - (f-filename source-path) - (helpful--format-position-heads references)) - "Could not find source file.") + (cond + ((and source-path references) + (format "Callers in %s:\n%s" + (helpful--format-position-heads references))) + (source-path + (format "No callers found in %s." + (f-filename source-path))) + (t + "Could not find source file.")) (helpful--heading "\n\nSource Code\n") ;; TODO: Use // comments for primitives. (if source-path