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

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

[nongnu] elpa/helm 09d9d67c8d 3/4: Add helm-get-nth-action docstring and


From: ELPA Syncer
Subject: [nongnu] elpa/helm 09d9d67c8d 3/4: Add helm-get-nth-action docstring and make test
Date: Sun, 7 Apr 2024 12:59:59 -0400 (EDT)

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

    Add helm-get-nth-action docstring and make test
    
    more readable.
---
 helm-core.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/helm-core.el b/helm-core.el
index 1b03b70e9b..be071c5bc2 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -7238,12 +7238,14 @@ Possible values are \\='left \\='right \\='below or 
\\='above."
     (helm-maybe-exit-minibuffer)))
 
 (defun helm-get-nth-action (n action)
+  "Return the nth N action from ACTION.
+Argument ACTION can be a symbol or a list of actions."
   (cond ((and (zerop n) (functionp action))
          action)
         ((listp action)
          (or (cdr (elt action n))
              (error "No such action")))
-        ((and (functionp action) (< 0 n))
+        ((and (functionp action) (> n 0))
          (error "Sole action"))
         (t
          (error "Error in `helm-select-nth-action'"))))



reply via email to

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