aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helpful.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/helpful.el b/helpful.el
index 6ce9b25..932a42e 100644
--- a/helpful.el
+++ b/helpful.el
@@ -387,6 +387,10 @@ E.g. (x x y z y) -> ((x . 2) (y . 2) (z . 1))"
(setcdr item-and-count (1+ (cdr item-and-count)))
(push (cons item 1) counts)))))
+(defun helpful--advice (sym)
+ "A list of advice associated with SYM."
+ (advice--symbol-function sym))
+
(defun helpful--format-reference (head ref-count position path)
(-let* (((def name) head)
(formatted-name
@@ -481,8 +485,15 @@ state of the current symbol."
(helpful--heading "\n\nSymbol Properties\n")
(or (helpful--format-properties helpful--sym)
- "No properties.")
+ "No properties."))
+
+ (when (helpful--advice helpful--sym)
+ (insert
+ (helpful--heading "\n\nAdvice\n")
+ (format
+ "This %s is advised." (if (macrop helpful--sym) "macro" "function"))))
+ (insert
(helpful--heading "\n\nDebugging\n")
(if (helpful--primitive-p helpful--sym)
""