diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2017-07-22 13:06:50 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2017-07-22 13:06:50 +0100 |
| commit | eae94d82684c2b2addde75b19d564d2e4677d4ca (patch) | |
| tree | 63fb72e4e739741cb26b92c6402cee1c4ef91d7f | |
| parent | efa395ee083a648478f5e7601b183ee87e5537db (diff) | |
Report when functions/macros are advised
| -rw-r--r-- | helpful.el | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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) "" |
