helpful

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

commit c5c62c59546b33c7a767f0954fb1718f4108e260
parent 9a245465ceeaa3006cf1b9e8688e2148b80fb016
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Sun, 22 Jul 2018 22:35:51 +0100

Say when variables are buffer-local

Fixes #120

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

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -1,5 +1,7 @@ # v0.13 +Buffer-local variables are now highlighted. + Variable values are now shown before docstrings. # v0.12 diff --git a/helpful.el b/helpful.el @@ -1514,6 +1514,11 @@ OBJ may be a symbol or a compiled function object." "autoloaded" 'helpful-info-button 'info-node "(elisp)Autoload")) + (buffer-local-button + (helpful--button + "buffer-local" + 'helpful-info-button + 'info-node "(elisp)Buffer-Local Variables")) ;; TODO: this only reports if a function is autoloaded ;; because we autoloaded it. This ignores newly defined ;; functions that are autoloaded. Built-in help has this @@ -1534,6 +1539,9 @@ OBJ may be a symbol or a compiled function object." (format "an %s" interactive-button)) ((and callable-p autoloaded-p) (format "an %s" autoload-button)) + ((and (not callable-p) + (local-variable-if-set-p sym)) + (format "a %s" buffer-local-button)) (t "a"))) (kind