Skip to content

Commit

Permalink
hydra-ox.el (hydra-ox): Update parameter list
Browse files Browse the repository at this point in the history
The `defhydradio' spec for each parameter was updated to:

    (name &optional doc value)

This way, it's easy to define this type of hydra:

(defhydradio hydra-tng ()
  (picard "_p_ Captain Jean Luc Picard:")
  (riker "_r_ Commander William Riker:")
  (data "_d_ Lieutenant Commander Data:")
  (worf "_w_ Worf:")
  (la-forge "_f_ Geordi La Forge:")
  (troi "_t_ Deanna Troi:")
  (dr-crusher "_c_ Doctor Beverly Crusher:")
  (phaser "_h_ Set phasers to " [stun kill]))

(defhydra hydra-tng (:color pink)
  (concat (hydra--table hydra-tng/names 7 2 '("  % -30s %% -3`%s" "%s %%`%s"))
          "\n\n")
  ("p" (hydra-tng/picard) nil)
  ("r" (hydra-tng/riker) nil)
  ("d" (hydra-tng/data) nil)
  ("w" (hydra-tng/worf) nil)
  ("f" (hydra-tng/la-forge) nil)
  ("t" (hydra-tng/troi) nil)
  ("c" (hydra-tng/dr-crusher) nil)
  ("h" (hydra-tng/phaser) nil)
  ("b" beam-down "beam down" :exit t)
  ("o" (hydra-reset-radios hydra-tng/names) "reset")
  ("q" nil "cancel"))
  • Loading branch information
abo-abo committed Mar 6, 2015
1 parent 77c8e40 commit 9623625
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hydra-ox.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
(require 'org)

(defhydradio hydra-ox ()
(body-only)
(export-scope [buffer subtree])
(async-export)
(visible-only)
(force-publishing))
(body-only "Export only the body.")
(export-scope "Export scope." [buffer subtree])
(async-export "When non-nil, export async.")
(visible-only "When non-nil, export visible only")
(force-publishing "Toggle force publishing"))

(defhydra hydra-ox-html (:color blue)
"ox-html"
Expand Down

0 comments on commit 9623625

Please sign in to comment.