File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -250,3 +250,19 @@ pressing the wrong prefix.
250250Note that it does not make sense to define a single amaranth head, so this color can only
251251be assigned to the body. An amaranth body will always have some amaranth heads and some
252252blue heads (otherwise, it's impossible to exit), no reds.
253+
254+ ## Generate simple lambdas in-place:
255+
256+ Since version ` 0.9.0 ` it's possible to pass a single sexp instead of a function name or a lambda
257+ to a head. This sexp will be wrapped in an interactive lambda. Here's an example:
258+
259+ ``` cl
260+ (defhydra hydra-launcher (:color blue)
261+ "Launch"
262+ ("h" man "man")
263+ ("r" (browse-url "http://www.reddit.com/r/emacs/") "reddit")
264+ ("w" (browse-url "http://www.emacswiki.org/") "emacswiki")
265+ ("s" shell "shell")
266+ ("q" nil "cancel"))
267+ (global-set-key (kbd "C-c r") 'hydra-launcher/body)
268+ ```
You can’t perform that action at this time.
0 commit comments