-
Notifications
You must be signed in to change notification settings - Fork 0
/
hera.el
35 lines (26 loc) · 778 Bytes
/
hera.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;;; hera.el --- Hera for Hydra
;; Copyright (C) 2018 Dustin Lacewell
;; Author: Dustin Lacewell <dlacewell@gmail.com>
;; Version: 0.1
;; Package-Requires: ((emacs "24") (hydra "0"))
;; Keywords: hydra
;; URL: http://github.com/dustinlacewell/hera
;;; Commentary:
;; This package provides a simple stack feature for Hydra.
;;; Code:
(require 'hydra)
;; this is a FIFO list of hydra bodies
(setq hera--stack nil)
(defun hera-push (hydra-body)
(when hydra-curr-body-fn
(push hydra-curr-body-fn hera--stack))
(call-interactively hydra-body))
(defun hera-pop ()
(let ((x (pop hera--stack)))
(when x
(call-interactively x))))
(defun hera-start (hydra-body)
(setq hera--stack nil)
(call-interactively hydra-body))
(provide 'hera)
;;; hera.el ends here