hydra.el (defhydra): Document the :column feature

Fixes #307
master
Oleh Krehel 7 years ago
parent 2ad0b01611
commit 05871dd6c8
  1. 1
      README.md
  2. 7
      hydra-examples.el
  3. 4
      hydra.el

@ -427,3 +427,4 @@ Here's a list of body keys that can be overridden in each head:
- `:exit`
- `:color`
- `:bind`
- `:column`

@ -333,6 +333,13 @@ _y_: ?y? year _q_: quit _L__l__c_: log = ?l?"
;; Recommended binding:
;; (define-key org-agenda-mode-map "v" 'hydra-org-agenda-view/body)
;;** Example 13: automatic columns
(defhydra hydra-movement ()
("j" next-line "down" :column "Vertical")
("k" previous-line "up")
("l" forward-char "forward" :column "Horizontal")
("h" backward-char "back"))
;;* Helpers
(require 'windmove)

@ -1182,7 +1182,7 @@ nil. If you don't even want the KEY to be printed, set HINT
explicitly to nil.
The heads inherit their PLIST from BODY-PLIST and are allowed to
override some keys. The keys recognized are :exit and :bind.
override some keys. The keys recognized are :exit, :bind, and :column.
:exit can be:
- nil (default): this head will continue the Hydra state.
@ -1192,6 +1192,8 @@ override some keys. The keys recognized are :exit and :bind.
- nil: this head will not be bound in BODY-MAP.
- a lambda taking KEY and CMD used to bind a head.
:column is a string that sets the column for all subsequent heads.
It is possible to omit both BODY-MAP and BODY-KEY if you don't
want to bind anything. In that case, typically you will bind the
generated NAME/body command. This command is also the return

Loading…
Cancel
Save