helpful

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

commit 554a4191a222923e5fb3cc37ddcefa55af61053a
parent adfa1691d75a47777a661d41b7883c57c8ca501c
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Tue, 20 Feb 2018 22:53:04 +0000

Improve wording

"without source code" is confusing when we have the raw function
object. We show that, so users do see some source code.

However, we don't have the source file, so we don't have the
source code with the original macros and comments.

Clarify that we're just showing the function object itself. Fixes #97.

Diffstat:
Mhelpful.el | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/helpful.el b/helpful.el @@ -1321,7 +1321,7 @@ OBJ may be a symbol or a compiled function object." (primitive-p "defined in C source code") (t - "without source code")))) + "without a source file")))) (when opened (kill-buffer buf)) @@ -1500,8 +1500,7 @@ state of the current symbol." "Set C source directory" 'helpful-c-source-directory))) (t - (helpful--syntax-highlight - (format ";; Source file is unknown\n"))))) + ""))) (when source (insert (cond @@ -1514,7 +1513,9 @@ state of the current symbol." (helpful--format-closure helpful--sym source))))) (t (helpful--syntax-highlight - (helpful--pretty-print source)))))) + (concat + ";; Source file is unknown, showing raw function object.\n" + (helpful--pretty-print source))))))) (helpful--insert-section-break) @@ -1635,7 +1636,7 @@ escapes that are used by `substitute-command-keys'." (pop-to-buffer (helpful--buffer sym t)) (helpful-update)) (t - (user-error "%s is bound to symbol %s which is not a command" + (user-error "%s is bound to %s which is not a command" (key-description key-sequence) sym)))))