helpful

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

commit 23de5e81b4a2ac6875072eb03e1469ff3454fbde
parent d6751969e475d6383223631a1175a50e913a5333
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Mon,  5 Jun 2017 21:39:14 +0100

Silence more warnings

Diffstat:
Mhelpful.el | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/helpful.el b/helpful.el @@ -181,7 +181,7 @@ This allows us to distinguish strings from symbols." "Describe the symbol that this button represents." (let ((sym (button-get button 'symbol))) (if (fboundp sym) - (helpful sym) + (helpful-function sym) (describe-variable sym)))) (defun helpful--describe-button (sym) @@ -206,13 +206,13 @@ This allows us to distinguish strings from symbols." docstring t t)) -(defun helpful--syntax-highlight (source &optional major-mode) - "Return a propertized version of SOURCE in MAJOR-MODE." - (unless major-mode - (setq major-mode #'emacs-lisp-mode)) +(defun helpful--syntax-highlight (source &optional mode) + "Return a propertized version of SOURCE in MODE." + (unless mode + (setq mode #'emacs-lisp-mode)) (with-temp-buffer (insert source) - (delay-mode-hooks (funcall major-mode)) + (delay-mode-hooks (funcall mode)) (if (fboundp 'font-lock-ensure) (font-lock-ensure) (with-no-warnings @@ -348,7 +348,7 @@ E.g. (x x y z y) -> ((x . 2) (y . 2) (z . 1))" (push (cons item 1) counts))))) (defun helpful--format-reference (head ref-count position path) - (-let ((def name) head) + (-let [(def name) head] (propertize (helpful--syntax-highlight (format "(%s %s ...)\t; %d reference%s"