[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 292ddf32ba: Simplify helm--action-at-nth-set-fn-1
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 292ddf32ba: Simplify helm--action-at-nth-set-fn-1 |
Date: |
Thu, 18 Aug 2022 16:58:44 -0400 (EDT) |
branch: elpa/helm
commit 292ddf32ba03361468e78cdf77ee5902e7e75842
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Simplify helm--action-at-nth-set-fn-1
---
helm-core.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/helm-core.el b/helm-core.el
index 52d50155f3..03d176fce5 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -493,15 +493,14 @@ Default to Helm group when group is not defined in
source."
(put 'helm-customize-group 'helm-only t)
(defun helm--action-at-nth-set-fn-1 (value &optional negative)
- (cl-loop for n from 1 to 9
- for key = (format value n)
- for sym = (make-symbol (format
"helm-execute-selection-action-at-nth-+%d" n))
- for fn = `(lambda ()
- (interactive)
- (helm-execute-selection-action-at-nth ,(if negative (-
n) n)))
- do (progn
- (defalias sym fn)
- (define-key helm-map (kbd key) sym))))
+ (dotimes (n 9)
+ (let ((key (format value (1+ n)))
+ (fn (lambda ()
+ (interactive)
+ (helm-execute-selection-action-at-nth
+ (if negative (- (1+ n)) (1+ n))))))
+ (define-key helm-map (kbd key) nil)
+ (define-key helm-map (kbd key) fn))))
(defun helm--action-at-nth-set-fn- (var val)
(set var val)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm 292ddf32ba: Simplify helm--action-at-nth-set-fn-1,
ELPA Syncer <=