]> code.delx.au - gnu-emacs-elpa/commit
Finalize head inheritance
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 13 Apr 2015 09:33:01 +0000 (11:33 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 13 Apr 2015 09:33:01 +0000 (11:33 +0200)
commitd3d435deb6e1405d846c2296f7e41a956c519b06
tree78f1e30b6713276bb829dee92e89344b36f396b1
parentb351b7cfb2284c0d6a11e1bf4f10d7c8ef0debb2
Finalize head inheritance

* hydra.el (hydra--body-exit): New defun.
(defhydra): Ensure that each head doesn't need the :exit info from the
body any more by putting the aggregated :exit in the head's own plist.

* hydra-test.el: Update tests.

Each hydra will now declare its own heads as a variable `foo/heads`.
It's possible to inherit them like this:

(defhydra hydra-zoom-child (:inherit (hydra-zoom/heads))
  "zoom"
  ("q" nil))

One hydra can inherit from multiple parents. This one just adds a single
"q" head to the familiar hydra-zoom.

Fixes #57.
hydra-test.el
hydra.el