helpful

a fork of Wilfred's helpful
git clone https://git.trogloxene.org/helpful.git
Log | Files | Refs | README

commit 96aa003213bedd4e21a86256f298c38acc6c326e
parent d5a01600e78f25e89abe4c577eba2aea62952c38
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Sun, 10 Dec 2017 11:55:16 +0000

Show the name of the variable too

This is useful in general, and more consistent, but it's particularly
useful for variable that don't have documentation. Previously, we
would just show the value, which is a little confusing.

Fixes #19.

Diffstat:
MCHANGELOG.md | 2+-
Mhelpful.el | 17++++++++++-------
2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -1,6 +1,6 @@ # v0.4 -No changes yet. +Show the name of variables at the top of the helpful buffer. # v0.3 diff --git a/helpful.el b/helpful.el @@ -545,19 +545,22 @@ state of the current symbol." (--map (helpful--outer-sexp buf it) positions)) (kill-buffer buf))) (erase-buffer) - (when helpful--callable-p + (if helpful--callable-p + (insert + (helpful--heading + (if (macrop helpful--sym) + "Macro Signature\n" + "Function Signature\n")) + (helpful--syntax-highlight (helpful--signature helpful--sym))) (insert (helpful--heading - (if (macrop helpful--sym) - "Macro Signature\n" - "Function Signature\n")) - (helpful--syntax-highlight (helpful--signature helpful--sym)))) + "Variable\n") + (symbol-name helpful--sym))) (-when-let (docstring (helpful--docstring helpful--sym helpful--callable-p)) - (when helpful--callable-p - (insert "\n\n")) (insert + "\n\n" (helpful--heading (cond ((not helpful--callable-p)