[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 8a0e01d56d 1/3: Allow always using cl--print-table ad
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 8a0e01d56d 1/3: Allow always using cl--print-table advice if specified by user globally |
Date: |
Thu, 14 Sep 2023 16:00:18 -0400 (EDT) |
branch: elpa/helm
commit 8a0e01d56d526fffd33ebc80e123cb4428dd43b0
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Allow always using cl--print-table advice if specified by user globally
Otherwise as before if the advice is not
enabled externally it is removed when helm exit.
---
helm-lib.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/helm-lib.el b/helm-lib.el
index 70df22089c..02569a43f2 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1291,13 +1291,16 @@ differently depending of answer:
(defun helm-describe-class (class)
"Display documentation of Eieio CLASS, a symbol or a string."
- (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))))
- (advice-remove 'cl--print-table #'helm-source--cl--print-table)))
+ (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)))))
(defun helm-describe-function (func)
"Display documentation of FUNC, a symbol or string."