[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 00d1679561 1/6: Rewrite helm-info-lookup-fallback-sou
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 00d1679561 1/6: Rewrite helm-info-lookup-fallback-source |
Date: |
Tue, 27 Feb 2024 13:04:38 -0500 (EST) |
branch: elpa/helm
commit 00d1679561a6dfd04b9037b58f7de74c054e572a
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Rewrite helm-info-lookup-fallback-source
---
helm-elisp.el | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/helm-elisp.el b/helm-elisp.el
index 61c542d720..c8bee2fd36 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -749,23 +749,23 @@ is only used to test DEFAULT."
("Info lookup" . helm-info-lookup-symbol))))
(defun helm-info-lookup-fallback-source (candidate)
- (let ((sym (helm-symbolify candidate))
- src-name fn)
- (cond ((class-p sym)
- (setq fn #'helm-describe-function
- src-name "Describe class"))
- ((cl-generic-p sym)
- (setq fn #'helm-describe-function
- src-name "Describe generic function"))
- ((fboundp sym)
- (setq fn #'helm-describe-function
- src-name "Describe function"))
- ((facep sym)
- (setq fn #'helm-describe-face
- src-name "Describe face"))
- (t
- (setq fn #'helm-describe-variable
- src-name "Describe variable")))
+ (cl-multiple-value-bind (fn src-name)
+ (helm-acase (helm-symbolify candidate)
+ ((guard (class-p it))
+ (list #'helm-describe-function
+ "Describe class"))
+ ((guard (cl-generic-p it))
+ (list #'helm-describe-function
+ "Describe generic function"))
+ ((guard (fboundp it))
+ (list #'helm-describe-function
+ "Describe function"))
+ ((guard (facep it))
+ (list #'helm-describe-face
+ "Describe face"))
+ (t
+ (list #'helm-describe-variable
+ "Describe variable")))
(helm-build-sync-source src-name
:candidates (list candidate)
:persistent-action (lambda (candidate)
- [nongnu] elpa/helm updated (9ad587f3cf -> d290f3adcc), ELPA Syncer, 2024/02/27
- [nongnu] elpa/helm 00d1679561 1/6: Rewrite helm-info-lookup-fallback-source,
ELPA Syncer <=
- [nongnu] elpa/helm d290f3adcc 6/6: Use helm-acase in more places, ELPA Syncer, 2024/02/27
- [nongnu] elpa/helm 4657367e25 3/6: Use cl-multiple-value-bind in helm-mode, ELPA Syncer, 2024/02/27
- [nongnu] elpa/helm 80326dc90e 2/6: No need to calculate lgst len in helm-lisp-completion-at-point, ELPA Syncer, 2024/02/27
- [nongnu] elpa/helm 385a4c48a1 4/6: Cleanup helm-elisp--show-help-1, ELPA Syncer, 2024/02/27
- [nongnu] elpa/helm b24f676798 5/6: Use helm-acase in helm-completing-read-default-1/2, ELPA Syncer, 2024/02/27