aboutsummaryrefslogtreecommitdiff
path: root/helpful.el
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2018-07-25 23:23:40 +0100
committerWilfred Hughes <me@wilfred.me.uk>2018-07-25 23:24:57 +0100
commite8db0f37db655565e4325d8fbb5b4524413f3877 (patch)
tree3f0ef0024b03c3cf57396ab33c6901e743467028 /helpful.el
parent1b4497ffe1e0f3d17b6370c6b1f29a77746e8497 (diff)
Simplify headings
Just say 'Documentation' rather than 'Function Documentation' and so on. Now that we have a summary sentence that says 'foo is a function' we don't need the verbose headings. Fixes #142
Diffstat (limited to 'helpful.el')
-rw-r--r--helpful.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/helpful.el b/helpful.el
index 02da733..ec83c5d 100644
--- a/helpful.el
+++ b/helpful.el
@@ -1746,10 +1746,6 @@ 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))
- (sym-type (cond
- ((not helpful--callable-p) "Variable")
- ((macrop helpful--sym) "Macro")
- (t "Function")))
(look-for-src (or (not primitive-p)
find-function-C-source-directory))
((buf pos opened)
@@ -1771,7 +1767,7 @@ state of the current symbol."
(when helpful--callable-p
(helpful--insert-section-break)
(insert
- (helpful--heading (format "%s Signature" sym-type))
+ (helpful--heading "Signature")
(helpful--syntax-highlight (helpful--signature helpful--sym))))
(when (not helpful--callable-p)
@@ -1846,7 +1842,7 @@ state of the current symbol."
(-when-let (docstring (helpful--docstring helpful--sym helpful--callable-p))
(helpful--insert-section-break)
(insert
- (helpful--heading (format "%s Documentation" sym-type))
+ (helpful--heading "Documentation")
(helpful--format-docstring docstring))
(when (helpful--in-manual-p helpful--sym)
(insert "\n\n")
@@ -1900,7 +1896,8 @@ state of the current symbol."
(helpful--insert-section-break)
(insert
(helpful--heading "Advice")
- (format "This %s is advised." (downcase sym-type))))
+ (format "This %s is advised."
+ (if (macrop helpful--sym) "macro" "function"))))
(let ((can-edebug
(helpful--can-edebug-p helpful--sym helpful--callable-p buf pos))