branch: elpa/helm commit 53c3456771e64d93d8bf7ae49affed8eab932340 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Use cl-letf instead of advice in helm-describe-class --- helm-lib.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/helm-lib.el b/helm-lib.el index 029013ee80..14036bd257 100644 --- a/helm-lib.el +++ b/helm-lib.el @@ -1474,16 +1474,12 @@ If object is a lambda, return \"Anonymous\"." (defun helm-describe-class (class) "Display documentation of Eieio CLASS, a symbol or a string." - (let ((advicep (advice-member-p #'helm-source--cl--print-table 'cl--print-table))) - (unless advicep - (advice-add 'cl--print-table :override #'helm-source--cl--print-table '((depth . 100)))) - (unwind-protect - (if (fboundp 'cl-describe-type) - (cl-describe-type (helm-symbolify class)) - (let ((helm-describe-function-function 'describe-function)) - (helm-describe-function (helm-symbolify class)))) - (unless advicep - (advice-remove 'cl--print-table #'helm-source--cl--print-table))))) + (cl-letf (((symbol-function 'cl--print-table) + #'helm-source--cl--print-table)) + (if (fboundp 'cl-describe-type) + (cl-describe-type (helm-symbolify class)) + (let ((helm-describe-function-function 'describe-function)) + (helm-describe-function (helm-symbolify class)))))) (defun helm-describe-function (func) "Display documentation of FUNC, a symbol or string."