branch: externals/hyperbole
commit c3f8c4bc4834f2969a8a05a09a5cdab87f4945ed
Author: Bob Weiner <r...@gnu.org>
Commit: Bob Weiner <r...@gnu.org>

    hact.el (actype:act, action:params): Add Emacs 30 closure support
---
 ChangeLog |  4 ++++
 hact.el   | 10 +++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fe56abcc29..7659ae3216 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-05-12  Bob Weiner  <r...@gnu.org>
+
+* hact.el (actype:act, action:params): Add Emacs 30 closure support.
+
 2024-05-06  Bob Weiner  <r...@gnu.org>
 
 * hyrolo.el (hyrolo-name-at-p): Fix to test point is in 
'hyrolo-display-buffer'.
diff --git a/hact.el b/hact.el
index 4833778ada..28ba545c81 100644
--- a/hact.el
+++ b/hact.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    18-Sep-91 at 02:57:09
-;; Last-Mod:     14-Apr-24 at 01:33:24 by Bob Weiner
+;; Last-Mod:     12-May-24 at 22:02:42 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -366,7 +366,9 @@ Autoloads action function if need be to get the parameter 
list."
             (compiled-function-arglist action)
           (action:params-emacs action)))
        ((symbolp action)
-        (car (cdr (and (fboundp action) (hypb:indirect-function action)))))))
+        (car (cdr (and (fboundp action) (hypb:indirect-function action)))))
+       ((and (fboundp #'closurep) (closurep action))
+        (aref action 0))))
 
 (defun action:param-list (action)
   "Return list of actual ACTION parameters (remove `&' special forms)."
@@ -411,7 +413,9 @@ performing ACTION."
           (setq args (hpath:absolute-arguments actype args)))
       (let ((hist-elt (hhist:element)))
        (run-hooks 'action-act-hook)
-       (prog1 (or (if (or (symbolp action) (listp action)
+       (prog1 (or (when (and (fboundp #'closurep) (closurep action))
+                        (funcall action args))
+                  (if (or (symbolp action) (listp action)
                           (byte-code-function-p action)
                           (subrp action)
                           (and (stringp action) (not (integerp action))

Reply via email to