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

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

[elpa] master dfe1273 19/27: Simplify and improve the generated defuns


From: Oleh Krehel
Subject: [elpa] master dfe1273 19/27: Simplify and improve the generated defuns
Date: Sat, 24 Jan 2015 20:36:35 +0000

branch: master
commit dfe127346d4678003bbf86f04293a1a1746ea443
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Simplify and improve the generated defuns
    
    * hydra.el (hydra-create): Update.
---
 hydra.el |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hydra.el b/hydra.el
index 915ab9d..067b629 100644
--- a/hydra.el
+++ b/hydra.el
@@ -128,12 +128,12 @@ When `(keymapp METHOD)`, it becomes:
             `(defun ,name ()
                ,(format "%s\n\nCall the head: `%S'." doc (cadr head))
                (interactive)
-               (if (null ',(cadr head))
-                   (funcall hydra-last)
-                 (call-interactively #',(cadr head))
-                 (when hydra-is-helpful
-                   (message ,hint))
-                 (setq hydra-last (set-transient-map ',keymap t)))))
+               ,@(if (null (cadr head))
+                     '((funcall hydra-last))
+                     `((call-interactively #',(cadr head))
+                       (when hydra-is-helpful
+                         (message ,hint))
+                       (setq hydra-last (set-transient-map ',keymap t))))))
           heads names)
        (defun ,(intern (format "hydra-%s-body" body)) ()
          ,doc



reply via email to

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