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

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

[elpa] externals/hydra 6442faf3da 20/35: hydra.el (hydra--make-defun): R


From: ELPA Syncer
Subject: [elpa] externals/hydra 6442faf3da 20/35: hydra.el (hydra--make-defun): Refactor
Date: Tue, 25 Oct 2022 22:59:06 -0400 (EDT)

branch: externals/hydra
commit 6442faf3da7fd40ca4e3d0c599e36f95a3a30112
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    hydra.el (hydra--make-defun): Refactor
---
 hydra.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hydra.el b/hydra.el
index 3508532795..c73736f98f 100644
--- a/hydra.el
+++ b/hydra.el
@@ -875,7 +875,8 @@ BODY-AFTER-EXIT is added to the end of the wrapper."
         (hint (intern (format "%S/hint" name)))
         (body-foreign-keys (hydra--body-foreign-keys body))
         (body-timeout (plist-get body :timeout))
-        (body-idle (plist-get body :idle)))
+        (body-idle (plist-get body :idle))
+        (curr-body-fn-sym (intern (format "%S/body" name))))
     `(defun ,cmd-name ()
        ,doc
        (interactive)
@@ -884,7 +885,7 @@ BODY-AFTER-EXIT is added to the end of the wrapper."
        ,@(when body-pre (list body-pre))
        ,@(if (hydra--head-property head :exit)
              `((hydra-keyboard-quit)
-               (setq hydra-curr-body-fn ',(intern (format "%S/body" name)))
+               (setq hydra-curr-body-fn ',curr-body-fn-sym)
                ,@(if body-after-exit
                      `((unwind-protect
                             ,(when cmd
@@ -896,7 +897,7 @@ BODY-AFTER-EXIT is added to the end of the wrapper."
             nil
             `((let ((hydra--ignore ,(not (eq (cadr head) 'body))))
                 (hydra-keyboard-quit)
-                (setq hydra-curr-body-fn ',(intern (format "%S/body" name))))
+                (setq hydra-curr-body-fn ',curr-body-fn-sym))
               ,(when cmd
                  `(condition-case err
                       ,(hydra--call-interactively cmd (cadr head))



reply via email to

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