emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 2af6cd5521 2/6: Make persistent-help support a var or


From: ELPA Syncer
Subject: [nongnu] elpa/helm 2af6cd5521 2/6: Make persistent-help support a var or a function as specified in doc
Date: Wed, 30 Mar 2022 09:58:29 -0400 (EDT)

branch: elpa/helm
commit 2af6cd5521c0199c5c15c4372f03d48ed464ab29
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Make persistent-help support a var or a function as specified in doc
---
 helm-source.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/helm-source.el b/helm-source.el
index 776d1b3201..f96c2d6ce4 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -1031,11 +1031,14 @@ an eieio class."
 ;;; Methods to build sources.
 ;;
 ;;
-(defun helm-source--persistent-help-string (string source)
+(defun helm-source--persistent-help-string (value source)
+  "Format `persistent-help' VALUE in SOURCE.
+Argument VALUE can be a string, a variable or a function."
   (substitute-command-keys
-   (concat "\\<helm-map>\\[helm-execute-persistent-action]: "
-           (or (format "%s (keeping session)" string)
-               (slot-value source 'header-line)))))
+   (format "\\<helm-map>\\[helm-execute-persistent-action]: %s (keeping 
session)"
+           (helm-aif value
+               (helm-interpret-value value source)
+             (slot-value source 'header-line)))))
 
 (defun helm-source--header-line (source)
   "Compute a default header line for SOURCE.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]