branch: elpa/helm
commit 0027977cef1d16f8422ba178f2db4e396287589a
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Add a persistent-action in helm-elisp-describe-slots
---
 helm-elisp.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/helm-elisp.el b/helm-elisp.el
index eecceca9acd..d0ea96b4763 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -835,13 +835,20 @@ is only used to test DEFAULT."
                                              disp 'face 'font-lock-keyword-face
                                              'display (concat ":" disp))
                                             real)))
+                   :persistent-action (lambda (candidate)
+                                        (helm-elisp--persistent-help
+                                         candidate
+                                         #'helm-elisp--describe-slot))
                    :persistent-help "Describe slot"
                    :popup-info (lambda (c) (caddr (split-string c "\n" t)))
-                   :action (lambda (candidate)
-                             (with-output-to-temp-buffer (help-buffer)
-                               (princ candidate))))
+                   :action (helm-make-actions
+                            "Describe slot" 'helm-elisp--describe-slot))
         :buffer "*helm class slots*"))
 
+(defun helm-elisp--describe-slot (slot)
+  (with-output-to-temp-buffer (help-buffer)
+    (princ slot)))
+
 (defun helm-apropos-toggle-details ()
   "Toggle details in `helm-apropos'."
   (interactive)

Reply via email to