diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2018-10-21 15:14:56 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2018-10-21 15:14:56 +0100 |
| commit | a22ca6d4287dc9387bf7d95fa85b0ee6adde9376 (patch) | |
| tree | 5776f2711604394cfaed109e0c126b562ea2d6e2 | |
| parent | daa4a64652a924f9c1dafa3b5301d0a595660a8b (diff) | |
Tweak wording to make source code more obvious
For aliases, we're trying to show the alias definition, not the
underlying function/variable definition.
Closes #168
| -rw-r--r-- | helpful.el | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1842,6 +1842,7 @@ state of the current symbol." (start-line (line-number-at-pos)) (start-column (current-column)) (primitive-p (helpful--primitive-p helpful--sym helpful--callable-p)) + (canonical-sym (helpful--canonical-symbol helpful--sym helpful--callable-p)) (look-for-src (or (not primitive-p) find-function-C-source-directory)) ((buf pos opened) @@ -2045,7 +2046,10 @@ state of the current symbol." (helpful--insert-section-break) (insert - (helpful--heading "Source Code") + (helpful--heading + (if (eq helpful--sym canonical-sym) + "Source Code" + "Alias Source Code")) (cond (source-path (concat @@ -2080,7 +2084,9 @@ state of the current symbol." (t (helpful--syntax-highlight (concat - ";; Source file is unknown, showing raw function object.\n" + (if (eq helpful--sym canonical-sym) + ";; Could not find source code, showing raw function object.\n" + ";; Could not find alias source code, showing raw function object.\n") (helpful--pretty-print source))))))) (helpful--insert-section-break) |
