From 5caaf3da75d22daadacf763602e46e288b6de281 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 22 Jul 2017 13:17:51 +0100 Subject: Don't claim everything is advised! --- helpful.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/helpful.el b/helpful.el index 8dc6c93..dce7612 100644 --- a/helpful.el +++ b/helpful.el @@ -42,6 +42,7 @@ (require 'dash) (require 's) (require 'find-func) +(require 'nadvice) (defvar-local helpful--sym nil) @@ -391,9 +392,9 @@ 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) +(defun helpful--advised-p (sym) "A list of advice associated with SYM." - (advice--symbol-function sym)) + (advice--p (advice--symbol-function sym))) (defun helpful--format-reference (head ref-count position path) (-let* (((def name) head) @@ -491,7 +492,7 @@ state of the current symbol." (or (helpful--format-properties helpful--sym) "No properties.")) - (when (helpful--advice helpful--sym) + (when (helpful--advised-p helpful--sym) (insert (helpful--heading "\n\nAdvice\n") (format -- cgit v1.0