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

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

[elpa] master b963c70 5/6: Improve the names of functions generated from


From: Oleh Krehel
Subject: [elpa] master b963c70 5/6: Improve the names of functions generated from lambdas
Date: Wed, 04 Feb 2015 18:51:22 +0000

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

    Improve the names of functions generated from lambdas
    
    * hydra.el (defhydra): Improve.
    
    Here, `hydra-window/lambda-v' function will be defined.
    
        (defhydra hydra-window ()
          "window"
          ("v" (lambda ()
                 (interactive)
                 (split-window-right)
                 (windmove-right))
               "vert"))
---
 hydra.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hydra.el b/hydra.el
index 72cbac9..738b77c 100644
--- a/hydra.el
+++ b/hydra.el
@@ -286,7 +286,10 @@ in turn can be either red or blue."
          (names (mapcar
                  (lambda (x)
                    (define-key keymap (kbd (car x))
-                     (intern (format "%S/%s" name (cadr x)))))
+                     (intern (format "%S/%s" name
+                                     (if (symbolp (cadr x))
+                                         (cadr x)
+                                       (concat "lambda-" (car x)))))))
                  heads))
          (body-name (intern (format "%S/body" name)))
          (body-key (unless (hydra--callablep body)



reply via email to

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