]> code.delx.au - gnu-emacs-elpa/blob - packages/hydra/hydra-test.el
Merge commit '010e64bef8a9ec5539733ff0c2e92d075b25a271'
[gnu-emacs-elpa] / packages / hydra / hydra-test.el
1 ;;; hydra-test.el --- Tests for Hydra
2
3 ;; Copyright (C) 2015 Free Software Foundation, Inc.
4
5 ;; Author: Oleh Krehel
6
7 ;; This file is part of GNU Emacs.
8
9 ;; GNU Emacs is free software: you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
13
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22 ;;; Commentary:
23 ;;
24
25 ;;; Code:
26
27 (require 'ert)
28 (require 'hydra)
29 (message "Emacs version: %s" emacs-version)
30
31 (ert-deftest hydra-red-error ()
32 (should
33 (equal
34 (macroexpand
35 '(defhydra hydra-error (global-map "M-g")
36 "error"
37 ("h" first-error "first")
38 ("j" next-error "next")
39 ("k" previous-error "prev")
40 ("SPC" hydra-repeat "rep" :bind nil)))
41 '(progn
42 (set
43 (defvar hydra-error/keymap nil
44 "Keymap for hydra-error.")
45 (quote
46 (keymap
47 (32 . hydra-repeat)
48 (107 . hydra-error/previous-error)
49 (106 . hydra-error/next-error)
50 (104 . hydra-error/first-error)
51 (kp-subtract . hydra--negative-argument)
52 (kp-9 . hydra--digit-argument)
53 (kp-8 . hydra--digit-argument)
54 (kp-7 . hydra--digit-argument)
55 (kp-6 . hydra--digit-argument)
56 (kp-5 . hydra--digit-argument)
57 (kp-4 . hydra--digit-argument)
58 (kp-3 . hydra--digit-argument)
59 (kp-2 . hydra--digit-argument)
60 (kp-1 . hydra--digit-argument)
61 (kp-0 . hydra--digit-argument)
62 (57 . hydra--digit-argument)
63 (56 . hydra--digit-argument)
64 (55 . hydra--digit-argument)
65 (54 . hydra--digit-argument)
66 (53 . hydra--digit-argument)
67 (52 . hydra--digit-argument)
68 (51 . hydra--digit-argument)
69 (50 . hydra--digit-argument)
70 (49 . hydra--digit-argument)
71 (48 . hydra--digit-argument)
72 (45 . hydra--negative-argument)
73 (21 . hydra--universal-argument))))
74 (set
75 (defvar hydra-error/heads nil
76 "Heads for hydra-error.")
77 (quote
78 (("h"
79 first-error
80 "first"
81 :exit nil)
82 ("j"
83 next-error
84 "next"
85 :exit nil)
86 ("k"
87 previous-error
88 "prev"
89 :exit nil)
90 ("SPC"
91 hydra-repeat
92 "rep"
93 :bind nil
94 :exit nil))))
95 (set
96 (defvar hydra-error/hint nil
97 "Dynamic hint for hydra-error.")
98 (quote
99 (format
100 #("error: [h]: first, [j]: next, [k]: prev, [SPC]: rep."
101 8 9 (face hydra-face-red)
102 20 21 (face hydra-face-red)
103 31 32 (face hydra-face-red)
104 42 45 (face hydra-face-red)))))
105 (defun hydra-error/first-error nil
106 "Create a hydra with a \"M-g\" body and the heads:
107
108 \"h\": `first-error',
109 \"j\": `next-error',
110 \"k\": `previous-error',
111 \"SPC\": `hydra-repeat'
112
113 The body can be accessed via `hydra-error/body'.
114
115 Call the head: `first-error'."
116 (interactive)
117 (hydra-default-pre)
118 (let ((hydra--ignore t))
119 (hydra-keyboard-quit)
120 (setq hydra-curr-body-fn
121 (quote hydra-error/body)))
122 (condition-case err
123 (progn
124 (setq this-command
125 (quote first-error))
126 (call-interactively
127 (function first-error)))
128 ((quit error)
129 (message "%S" err)
130 (unless hydra-lv (sit-for 0.8))))
131 (when hydra-is-helpful
132 (if hydra-lv
133 (lv-message
134 (eval hydra-error/hint))
135 (message
136 (eval hydra-error/hint))))
137 (hydra-set-transient-map
138 hydra-error/keymap
139 (lambda nil
140 (hydra-keyboard-quit)
141 nil)
142 nil))
143 (defun hydra-error/next-error nil
144 "Create a hydra with a \"M-g\" body and the heads:
145
146 \"h\": `first-error',
147 \"j\": `next-error',
148 \"k\": `previous-error',
149 \"SPC\": `hydra-repeat'
150
151 The body can be accessed via `hydra-error/body'.
152
153 Call the head: `next-error'."
154 (interactive)
155 (hydra-default-pre)
156 (let ((hydra--ignore t))
157 (hydra-keyboard-quit)
158 (setq hydra-curr-body-fn
159 (quote hydra-error/body)))
160 (condition-case err
161 (progn
162 (setq this-command
163 (quote next-error))
164 (call-interactively
165 (function next-error)))
166 ((quit error)
167 (message "%S" err)
168 (unless hydra-lv (sit-for 0.8))))
169 (when hydra-is-helpful
170 (if hydra-lv
171 (lv-message
172 (eval hydra-error/hint))
173 (message
174 (eval hydra-error/hint))))
175 (hydra-set-transient-map
176 hydra-error/keymap
177 (lambda nil
178 (hydra-keyboard-quit)
179 nil)
180 nil))
181 (defun hydra-error/previous-error nil
182 "Create a hydra with a \"M-g\" body and the heads:
183
184 \"h\": `first-error',
185 \"j\": `next-error',
186 \"k\": `previous-error',
187 \"SPC\": `hydra-repeat'
188
189 The body can be accessed via `hydra-error/body'.
190
191 Call the head: `previous-error'."
192 (interactive)
193 (hydra-default-pre)
194 (let ((hydra--ignore t))
195 (hydra-keyboard-quit)
196 (setq hydra-curr-body-fn
197 (quote hydra-error/body)))
198 (condition-case err
199 (progn
200 (setq this-command
201 (quote previous-error))
202 (call-interactively
203 (function previous-error)))
204 ((quit error)
205 (message "%S" err)
206 (unless hydra-lv (sit-for 0.8))))
207 (when hydra-is-helpful
208 (if hydra-lv
209 (lv-message
210 (eval hydra-error/hint))
211 (message
212 (eval hydra-error/hint))))
213 (hydra-set-transient-map
214 hydra-error/keymap
215 (lambda nil
216 (hydra-keyboard-quit)
217 nil)
218 nil))
219 (unless (keymapp
220 (lookup-key
221 global-map
222 (kbd "M-g")))
223 (define-key global-map (kbd "M-g")
224 nil))
225 (define-key global-map [134217831 104]
226 (quote hydra-error/first-error))
227 (define-key global-map [134217831 106]
228 (quote hydra-error/next-error))
229 (define-key global-map [134217831 107]
230 (quote
231 hydra-error/previous-error))
232 (defun hydra-error/body nil
233 "Create a hydra with a \"M-g\" body and the heads:
234
235 \"h\": `first-error',
236 \"j\": `next-error',
237 \"k\": `previous-error',
238 \"SPC\": `hydra-repeat'
239
240 The body can be accessed via `hydra-error/body'."
241 (interactive)
242 (hydra-default-pre)
243 (let ((hydra--ignore nil))
244 (hydra-keyboard-quit)
245 (setq hydra-curr-body-fn
246 (quote hydra-error/body)))
247 (when hydra-is-helpful
248 (if hydra-lv
249 (lv-message
250 (eval hydra-error/hint))
251 (message
252 (eval hydra-error/hint))))
253 (hydra-set-transient-map
254 hydra-error/keymap
255 (lambda nil
256 (hydra-keyboard-quit)
257 nil)
258 nil)
259 (setq prefix-arg
260 current-prefix-arg))))))
261
262 (ert-deftest hydra-blue-toggle ()
263 (should
264 (equal
265 (macroexpand
266 '(defhydra hydra-toggle (:color blue)
267 "toggle"
268 ("t" toggle-truncate-lines "truncate")
269 ("f" auto-fill-mode "fill")
270 ("a" abbrev-mode "abbrev")
271 ("q" nil "cancel")))
272 '(progn
273 (set
274 (defvar hydra-toggle/keymap nil
275 "Keymap for hydra-toggle.")
276 (quote
277 (keymap
278 (113 . hydra-toggle/nil)
279 (97 . hydra-toggle/abbrev-mode-and-exit)
280 (102 . hydra-toggle/auto-fill-mode-and-exit)
281 (116 . hydra-toggle/toggle-truncate-lines-and-exit)
282 (kp-subtract . hydra--negative-argument)
283 (kp-9 . hydra--digit-argument)
284 (kp-8 . hydra--digit-argument)
285 (kp-7 . hydra--digit-argument)
286 (kp-6 . hydra--digit-argument)
287 (kp-5 . hydra--digit-argument)
288 (kp-4 . hydra--digit-argument)
289 (kp-3 . hydra--digit-argument)
290 (kp-2 . hydra--digit-argument)
291 (kp-1 . hydra--digit-argument)
292 (kp-0 . hydra--digit-argument)
293 (57 . hydra--digit-argument)
294 (56 . hydra--digit-argument)
295 (55 . hydra--digit-argument)
296 (54 . hydra--digit-argument)
297 (53 . hydra--digit-argument)
298 (52 . hydra--digit-argument)
299 (51 . hydra--digit-argument)
300 (50 . hydra--digit-argument)
301 (49 . hydra--digit-argument)
302 (48 . hydra--digit-argument)
303 (45 . hydra--negative-argument)
304 (21 . hydra--universal-argument))))
305 (set
306 (defvar hydra-toggle/heads nil
307 "Heads for hydra-toggle.")
308 (quote
309 (("t"
310 toggle-truncate-lines
311 "truncate"
312 :exit t)
313 ("f"
314 auto-fill-mode
315 "fill"
316 :exit t)
317 ("a"
318 abbrev-mode
319 "abbrev"
320 :exit t)
321 ("q" nil "cancel" :exit t))))
322 (set
323 (defvar hydra-toggle/hint nil
324 "Dynamic hint for hydra-toggle.")
325 (quote
326 (format
327 #("toggle: [t]: truncate, [f]: fill, [a]: abbrev, [q]: cancel."
328 9 10 (face hydra-face-blue)
329 24 25 (face hydra-face-blue)
330 35 36 (face hydra-face-blue)
331 48 49 (face hydra-face-blue)))))
332 (defun hydra-toggle/toggle-truncate-lines-and-exit nil
333 "Create a hydra with no body and the heads:
334
335 \"t\": `toggle-truncate-lines',
336 \"f\": `auto-fill-mode',
337 \"a\": `abbrev-mode',
338 \"q\": `nil'
339
340 The body can be accessed via `hydra-toggle/body'.
341
342 Call the head: `toggle-truncate-lines'."
343 (interactive)
344 (hydra-default-pre)
345 (hydra-keyboard-quit)
346 (setq hydra-curr-body-fn
347 (quote hydra-toggle/body))
348 (progn
349 (setq this-command
350 (quote toggle-truncate-lines))
351 (call-interactively
352 (function
353 toggle-truncate-lines))))
354 (defun hydra-toggle/auto-fill-mode-and-exit nil
355 "Create a hydra with no body and the heads:
356
357 \"t\": `toggle-truncate-lines',
358 \"f\": `auto-fill-mode',
359 \"a\": `abbrev-mode',
360 \"q\": `nil'
361
362 The body can be accessed via `hydra-toggle/body'.
363
364 Call the head: `auto-fill-mode'."
365 (interactive)
366 (hydra-default-pre)
367 (hydra-keyboard-quit)
368 (setq hydra-curr-body-fn
369 (quote hydra-toggle/body))
370 (progn
371 (setq this-command
372 (quote auto-fill-mode))
373 (call-interactively
374 (function auto-fill-mode))))
375 (defun hydra-toggle/abbrev-mode-and-exit nil
376 "Create a hydra with no body and the heads:
377
378 \"t\": `toggle-truncate-lines',
379 \"f\": `auto-fill-mode',
380 \"a\": `abbrev-mode',
381 \"q\": `nil'
382
383 The body can be accessed via `hydra-toggle/body'.
384
385 Call the head: `abbrev-mode'."
386 (interactive)
387 (hydra-default-pre)
388 (hydra-keyboard-quit)
389 (setq hydra-curr-body-fn
390 (quote hydra-toggle/body))
391 (progn
392 (setq this-command
393 (quote abbrev-mode))
394 (call-interactively
395 (function abbrev-mode))))
396 (defun hydra-toggle/nil nil
397 "Create a hydra with no body and the heads:
398
399 \"t\": `toggle-truncate-lines',
400 \"f\": `auto-fill-mode',
401 \"a\": `abbrev-mode',
402 \"q\": `nil'
403
404 The body can be accessed via `hydra-toggle/body'.
405
406 Call the head: `nil'."
407 (interactive)
408 (hydra-default-pre)
409 (hydra-keyboard-quit)
410 (setq hydra-curr-body-fn
411 (quote hydra-toggle/body)))
412 (defun hydra-toggle/body nil
413 "Create a hydra with no body and the heads:
414
415 \"t\": `toggle-truncate-lines',
416 \"f\": `auto-fill-mode',
417 \"a\": `abbrev-mode',
418 \"q\": `nil'
419
420 The body can be accessed via `hydra-toggle/body'."
421 (interactive)
422 (hydra-default-pre)
423 (let ((hydra--ignore nil))
424 (hydra-keyboard-quit)
425 (setq hydra-curr-body-fn
426 (quote hydra-toggle/body)))
427 (when hydra-is-helpful
428 (if hydra-lv
429 (lv-message
430 (eval hydra-toggle/hint))
431 (message
432 (eval hydra-toggle/hint))))
433 (hydra-set-transient-map
434 hydra-toggle/keymap
435 (lambda nil
436 (hydra-keyboard-quit)
437 nil)
438 nil)
439 (setq prefix-arg
440 current-prefix-arg))))))
441
442 (ert-deftest hydra-amaranth-vi ()
443 (should
444 (equal
445 (macroexpand
446 '(defhydra hydra-vi
447 (:pre
448 (set-cursor-color "#e52b50")
449 :post
450 (set-cursor-color "#ffffff")
451 :color amaranth)
452 "vi"
453 ("j" next-line)
454 ("k" previous-line)
455 ("q" nil "quit")))
456 '(progn
457 (set
458 (defvar hydra-vi/keymap nil
459 "Keymap for hydra-vi.")
460 (quote
461 (keymap
462 (113 . hydra-vi/nil)
463 (107 . hydra-vi/previous-line)
464 (106 . hydra-vi/next-line)
465 (kp-subtract . hydra--negative-argument)
466 (kp-9 . hydra--digit-argument)
467 (kp-8 . hydra--digit-argument)
468 (kp-7 . hydra--digit-argument)
469 (kp-6 . hydra--digit-argument)
470 (kp-5 . hydra--digit-argument)
471 (kp-4 . hydra--digit-argument)
472 (kp-3 . hydra--digit-argument)
473 (kp-2 . hydra--digit-argument)
474 (kp-1 . hydra--digit-argument)
475 (kp-0 . hydra--digit-argument)
476 (57 . hydra--digit-argument)
477 (56 . hydra--digit-argument)
478 (55 . hydra--digit-argument)
479 (54 . hydra--digit-argument)
480 (53 . hydra--digit-argument)
481 (52 . hydra--digit-argument)
482 (51 . hydra--digit-argument)
483 (50 . hydra--digit-argument)
484 (49 . hydra--digit-argument)
485 (48 . hydra--digit-argument)
486 (45 . hydra--negative-argument)
487 (21 . hydra--universal-argument))))
488 (set
489 (defvar hydra-vi/heads nil
490 "Heads for hydra-vi.")
491 (quote
492 (("j" next-line "" :exit nil)
493 ("k"
494 previous-line
495 ""
496 :exit nil)
497 ("q" nil "quit" :exit t))))
498 (set
499 (defvar hydra-vi/hint nil
500 "Dynamic hint for hydra-vi.")
501 (quote
502 (format
503 #("vi: j, k, [q]: quit."
504 4 5 (face hydra-face-amaranth)
505 7 8 (face hydra-face-amaranth)
506 11 12 (face hydra-face-teal)))))
507 (defun hydra-vi/next-line nil
508 "Create a hydra with no body and the heads:
509
510 \"j\": `next-line',
511 \"k\": `previous-line',
512 \"q\": `nil'
513
514 The body can be accessed via `hydra-vi/body'.
515
516 Call the head: `next-line'."
517 (interactive)
518 (hydra-default-pre)
519 (set-cursor-color "#e52b50")
520 (let ((hydra--ignore t))
521 (hydra-keyboard-quit)
522 (setq hydra-curr-body-fn
523 (quote hydra-vi/body)))
524 (condition-case err
525 (progn
526 (setq this-command
527 (quote next-line))
528 (call-interactively
529 (function next-line)))
530 ((quit error)
531 (message "%S" err)
532 (unless hydra-lv (sit-for 0.8))))
533 (when hydra-is-helpful
534 (if hydra-lv
535 (lv-message
536 (eval hydra-vi/hint))
537 (message (eval hydra-vi/hint))))
538 (hydra-set-transient-map
539 hydra-vi/keymap
540 (lambda nil
541 (hydra-keyboard-quit)
542 (set-cursor-color "#ffffff"))
543 (quote warn)))
544 (defun hydra-vi/previous-line nil
545 "Create a hydra with no body and the heads:
546
547 \"j\": `next-line',
548 \"k\": `previous-line',
549 \"q\": `nil'
550
551 The body can be accessed via `hydra-vi/body'.
552
553 Call the head: `previous-line'."
554 (interactive)
555 (hydra-default-pre)
556 (set-cursor-color "#e52b50")
557 (let ((hydra--ignore t))
558 (hydra-keyboard-quit)
559 (setq hydra-curr-body-fn
560 (quote hydra-vi/body)))
561 (condition-case err
562 (progn
563 (setq this-command
564 (quote previous-line))
565 (call-interactively
566 (function previous-line)))
567 ((quit error)
568 (message "%S" err)
569 (unless hydra-lv (sit-for 0.8))))
570 (when hydra-is-helpful
571 (if hydra-lv
572 (lv-message
573 (eval hydra-vi/hint))
574 (message (eval hydra-vi/hint))))
575 (hydra-set-transient-map
576 hydra-vi/keymap
577 (lambda nil
578 (hydra-keyboard-quit)
579 (set-cursor-color "#ffffff"))
580 (quote warn)))
581 (defun hydra-vi/nil nil
582 "Create a hydra with no body and the heads:
583
584 \"j\": `next-line',
585 \"k\": `previous-line',
586 \"q\": `nil'
587
588 The body can be accessed via `hydra-vi/body'.
589
590 Call the head: `nil'."
591 (interactive)
592 (hydra-default-pre)
593 (set-cursor-color "#e52b50")
594 (hydra-keyboard-quit)
595 (setq hydra-curr-body-fn
596 (quote hydra-vi/body)))
597 (defun hydra-vi/body nil
598 "Create a hydra with no body and the heads:
599
600 \"j\": `next-line',
601 \"k\": `previous-line',
602 \"q\": `nil'
603
604 The body can be accessed via `hydra-vi/body'."
605 (interactive)
606 (hydra-default-pre)
607 (set-cursor-color "#e52b50")
608 (let ((hydra--ignore nil))
609 (hydra-keyboard-quit)
610 (setq hydra-curr-body-fn
611 (quote hydra-vi/body)))
612 (when hydra-is-helpful
613 (if hydra-lv
614 (lv-message
615 (eval hydra-vi/hint))
616 (message (eval hydra-vi/hint))))
617 (hydra-set-transient-map
618 hydra-vi/keymap
619 (lambda nil
620 (hydra-keyboard-quit)
621 (set-cursor-color "#ffffff"))
622 (quote warn))
623 (setq prefix-arg
624 current-prefix-arg))))))
625
626 (ert-deftest hydra-zoom-duplicate-1 ()
627 (should
628 (equal
629 (macroexpand
630 '(defhydra hydra-zoom ()
631 "zoom"
632 ("r" (text-scale-set 0) "reset")
633 ("0" (text-scale-set 0) :bind nil :exit t)
634 ("1" (text-scale-set 0) nil :bind nil :exit t)))
635 '(progn
636 (set
637 (defvar hydra-zoom/keymap nil
638 "Keymap for hydra-zoom.")
639 (quote
640 (keymap
641 (114 . hydra-zoom/lambda-r)
642 (kp-subtract . hydra--negative-argument)
643 (kp-9 . hydra--digit-argument)
644 (kp-8 . hydra--digit-argument)
645 (kp-7 . hydra--digit-argument)
646 (kp-6 . hydra--digit-argument)
647 (kp-5 . hydra--digit-argument)
648 (kp-4 . hydra--digit-argument)
649 (kp-3 . hydra--digit-argument)
650 (kp-2 . hydra--digit-argument)
651 (kp-1 . hydra--digit-argument)
652 (kp-0 . hydra--digit-argument)
653 (57 . hydra--digit-argument)
654 (56 . hydra--digit-argument)
655 (55 . hydra--digit-argument)
656 (54 . hydra--digit-argument)
657 (53 . hydra--digit-argument)
658 (52 . hydra--digit-argument)
659 (51 . hydra--digit-argument)
660 (50 . hydra--digit-argument)
661 (49 . hydra-zoom/lambda-0-and-exit)
662 (48 . hydra-zoom/lambda-0-and-exit)
663 (45 . hydra--negative-argument)
664 (21 . hydra--universal-argument))))
665 (set
666 (defvar hydra-zoom/heads nil
667 "Heads for hydra-zoom.")
668 (quote
669 (("r"
670 (text-scale-set 0)
671 "reset"
672 :exit nil)
673 ("0"
674 (text-scale-set 0)
675 ""
676 :bind nil
677 :exit t)
678 ("1"
679 (text-scale-set 0)
680 nil
681 :bind nil
682 :exit t))))
683 (set
684 (defvar hydra-zoom/hint nil
685 "Dynamic hint for hydra-zoom.")
686 (quote
687 (format
688 #("zoom: [r 0]: reset."
689 7 8 (face hydra-face-red)
690 9 10 (face hydra-face-blue)))))
691 (defun hydra-zoom/lambda-r nil
692 "Create a hydra with no body and the heads:
693
694 \"r\": `(text-scale-set 0)',
695 \"0\": `(text-scale-set 0)',
696 \"1\": `(text-scale-set 0)'
697
698 The body can be accessed via `hydra-zoom/body'.
699
700 Call the head: `(text-scale-set 0)'."
701 (interactive)
702 (hydra-default-pre)
703 (let ((hydra--ignore t))
704 (hydra-keyboard-quit)
705 (setq hydra-curr-body-fn
706 (quote hydra-zoom/body)))
707 (condition-case err
708 (call-interactively
709 (function
710 (lambda nil
711 (interactive)
712 (text-scale-set 0))))
713 ((quit error)
714 (message "%S" err)
715 (unless hydra-lv (sit-for 0.8))))
716 (when hydra-is-helpful
717 (if hydra-lv
718 (lv-message
719 (eval hydra-zoom/hint))
720 (message
721 (eval hydra-zoom/hint))))
722 (hydra-set-transient-map
723 hydra-zoom/keymap
724 (lambda nil
725 (hydra-keyboard-quit)
726 nil)
727 nil))
728 (defun hydra-zoom/lambda-0-and-exit nil
729 "Create a hydra with no body and the heads:
730
731 \"r\": `(text-scale-set 0)',
732 \"0\": `(text-scale-set 0)',
733 \"1\": `(text-scale-set 0)'
734
735 The body can be accessed via `hydra-zoom/body'.
736
737 Call the head: `(text-scale-set 0)'."
738 (interactive)
739 (hydra-default-pre)
740 (hydra-keyboard-quit)
741 (setq hydra-curr-body-fn
742 (quote hydra-zoom/body))
743 (call-interactively
744 (function
745 (lambda nil
746 (interactive)
747 (text-scale-set 0)))))
748 (defun hydra-zoom/body nil
749 "Create a hydra with no body and the heads:
750
751 \"r\": `(text-scale-set 0)',
752 \"0\": `(text-scale-set 0)',
753 \"1\": `(text-scale-set 0)'
754
755 The body can be accessed via `hydra-zoom/body'."
756 (interactive)
757 (hydra-default-pre)
758 (let ((hydra--ignore nil))
759 (hydra-keyboard-quit)
760 (setq hydra-curr-body-fn
761 (quote hydra-zoom/body)))
762 (when hydra-is-helpful
763 (if hydra-lv
764 (lv-message
765 (eval hydra-zoom/hint))
766 (message
767 (eval hydra-zoom/hint))))
768 (hydra-set-transient-map
769 hydra-zoom/keymap
770 (lambda nil
771 (hydra-keyboard-quit)
772 nil)
773 nil)
774 (setq prefix-arg
775 current-prefix-arg))))))
776
777 (ert-deftest hydra-zoom-duplicate-2 ()
778 (should
779 (equal
780 (macroexpand
781 '(defhydra hydra-zoom ()
782 "zoom"
783 ("r" (text-scale-set 0) "reset")
784 ("0" (text-scale-set 0) :bind nil :exit t)
785 ("1" (text-scale-set 0) nil :bind nil)))
786 '(progn
787 (set
788 (defvar hydra-zoom/keymap nil
789 "Keymap for hydra-zoom.")
790 (quote
791 (keymap
792 (114 . hydra-zoom/lambda-r)
793 (kp-subtract . hydra--negative-argument)
794 (kp-9 . hydra--digit-argument)
795 (kp-8 . hydra--digit-argument)
796 (kp-7 . hydra--digit-argument)
797 (kp-6 . hydra--digit-argument)
798 (kp-5 . hydra--digit-argument)
799 (kp-4 . hydra--digit-argument)
800 (kp-3 . hydra--digit-argument)
801 (kp-2 . hydra--digit-argument)
802 (kp-1 . hydra--digit-argument)
803 (kp-0 . hydra--digit-argument)
804 (57 . hydra--digit-argument)
805 (56 . hydra--digit-argument)
806 (55 . hydra--digit-argument)
807 (54 . hydra--digit-argument)
808 (53 . hydra--digit-argument)
809 (52 . hydra--digit-argument)
810 (51 . hydra--digit-argument)
811 (50 . hydra--digit-argument)
812 (49 . hydra-zoom/lambda-r)
813 (48 . hydra-zoom/lambda-0-and-exit)
814 (45 . hydra--negative-argument)
815 (21 . hydra--universal-argument))))
816 (set
817 (defvar hydra-zoom/heads nil
818 "Heads for hydra-zoom.")
819 (quote
820 (("r"
821 (text-scale-set 0)
822 "reset"
823 :exit nil)
824 ("0"
825 (text-scale-set 0)
826 ""
827 :bind nil
828 :exit t)
829 ("1"
830 (text-scale-set 0)
831 nil
832 :bind nil
833 :exit nil))))
834 (set
835 (defvar hydra-zoom/hint nil
836 "Dynamic hint for hydra-zoom.")
837 (quote
838 (format
839 #("zoom: [r 0]: reset."
840 7 8 (face hydra-face-red)
841 9 10 (face hydra-face-blue)))))
842 (defun hydra-zoom/lambda-r nil
843 "Create a hydra with no body and the heads:
844
845 \"r\": `(text-scale-set 0)',
846 \"0\": `(text-scale-set 0)',
847 \"1\": `(text-scale-set 0)'
848
849 The body can be accessed via `hydra-zoom/body'.
850
851 Call the head: `(text-scale-set 0)'."
852 (interactive)
853 (hydra-default-pre)
854 (let ((hydra--ignore t))
855 (hydra-keyboard-quit)
856 (setq hydra-curr-body-fn
857 (quote hydra-zoom/body)))
858 (condition-case err
859 (call-interactively
860 (function
861 (lambda nil
862 (interactive)
863 (text-scale-set 0))))
864 ((quit error)
865 (message "%S" err)
866 (unless hydra-lv (sit-for 0.8))))
867 (when hydra-is-helpful
868 (if hydra-lv
869 (lv-message
870 (eval hydra-zoom/hint))
871 (message
872 (eval hydra-zoom/hint))))
873 (hydra-set-transient-map
874 hydra-zoom/keymap
875 (lambda nil
876 (hydra-keyboard-quit)
877 nil)
878 nil))
879 (defun hydra-zoom/lambda-0-and-exit nil
880 "Create a hydra with no body and the heads:
881
882 \"r\": `(text-scale-set 0)',
883 \"0\": `(text-scale-set 0)',
884 \"1\": `(text-scale-set 0)'
885
886 The body can be accessed via `hydra-zoom/body'.
887
888 Call the head: `(text-scale-set 0)'."
889 (interactive)
890 (hydra-default-pre)
891 (hydra-keyboard-quit)
892 (setq hydra-curr-body-fn
893 (quote hydra-zoom/body))
894 (call-interactively
895 (function
896 (lambda nil
897 (interactive)
898 (text-scale-set 0)))))
899 (defun hydra-zoom/body nil
900 "Create a hydra with no body and the heads:
901
902 \"r\": `(text-scale-set 0)',
903 \"0\": `(text-scale-set 0)',
904 \"1\": `(text-scale-set 0)'
905
906 The body can be accessed via `hydra-zoom/body'."
907 (interactive)
908 (hydra-default-pre)
909 (let ((hydra--ignore nil))
910 (hydra-keyboard-quit)
911 (setq hydra-curr-body-fn
912 (quote hydra-zoom/body)))
913 (when hydra-is-helpful
914 (if hydra-lv
915 (lv-message
916 (eval hydra-zoom/hint))
917 (message
918 (eval hydra-zoom/hint))))
919 (hydra-set-transient-map
920 hydra-zoom/keymap
921 (lambda nil
922 (hydra-keyboard-quit)
923 nil)
924 nil)
925 (setq prefix-arg
926 current-prefix-arg))))))
927
928 (ert-deftest defhydradio ()
929 (should (equal
930 (macroexpand
931 '(defhydradio hydra-test ()
932 (num "Num" [0 1 2 3 4 5 6 7 8 9 10])
933 (str "Str" ["foo" "bar" "baz"])))
934 '(progn
935 (defvar hydra-test/num 0
936 "Num")
937 (put 'hydra-test/num 'range [0 1 2 3 4 5 6 7 8 9 10])
938 (defun hydra-test/num ()
939 (hydra--cycle-radio 'hydra-test/num))
940 (defvar hydra-test/str "foo"
941 "Str")
942 (put 'hydra-test/str 'range ["foo" "bar" "baz"])
943 (defun hydra-test/str ()
944 (hydra--cycle-radio 'hydra-test/str))
945 (defvar hydra-test/names '(hydra-test/num hydra-test/str))))))
946
947 (ert-deftest hydra-blue-compat ()
948 (should
949 (equal
950 (macroexpand
951 '(defhydra hydra-toggle (:color blue)
952 "toggle"
953 ("t" toggle-truncate-lines "truncate")
954 ("f" auto-fill-mode "fill")
955 ("a" abbrev-mode "abbrev")
956 ("q" nil "cancel")))
957 (macroexpand
958 '(defhydra hydra-toggle (:exit t)
959 "toggle"
960 ("t" toggle-truncate-lines "truncate")
961 ("f" auto-fill-mode "fill")
962 ("a" abbrev-mode "abbrev")
963 ("q" nil "cancel"))))))
964
965 (ert-deftest hydra-amaranth-compat ()
966 (should
967 (equal
968 (macroexpand
969 '(defhydra hydra-vi
970 (:pre
971 (set-cursor-color "#e52b50")
972 :post
973 (set-cursor-color "#ffffff")
974 :color amaranth)
975 "vi"
976 ("j" next-line)
977 ("k" previous-line)
978 ("q" nil "quit")))
979 (macroexpand
980 '(defhydra hydra-vi
981 (:pre
982 (set-cursor-color "#e52b50")
983 :post
984 (set-cursor-color "#ffffff")
985 :foreign-keys warn)
986 "vi"
987 ("j" next-line)
988 ("k" previous-line)
989 ("q" nil "quit"))))))
990
991 (ert-deftest hydra-pink-compat ()
992 (should
993 (equal
994 (macroexpand
995 '(defhydra hydra-zoom (global-map "<f2>"
996 :color pink)
997 "zoom"
998 ("g" text-scale-increase "in")
999 ("l" text-scale-decrease "out")
1000 ("q" nil "quit")))
1001 (macroexpand
1002 '(defhydra hydra-zoom (global-map "<f2>"
1003 :foreign-keys run)
1004 "zoom"
1005 ("g" text-scale-increase "in")
1006 ("l" text-scale-decrease "out")
1007 ("q" nil "quit"))))))
1008
1009 (ert-deftest hydra-teal-compat ()
1010 (should
1011 (equal
1012 (macroexpand
1013 '(defhydra hydra-zoom (global-map "<f2>"
1014 :color teal)
1015 "zoom"
1016 ("g" text-scale-increase "in")
1017 ("l" text-scale-decrease "out")
1018 ("q" nil "quit")))
1019 (macroexpand
1020 '(defhydra hydra-zoom (global-map "<f2>"
1021 :foreign-keys warn
1022 :exit t)
1023 "zoom"
1024 ("g" text-scale-increase "in")
1025 ("l" text-scale-decrease "out")
1026 ("q" nil "quit"))))))
1027
1028 (ert-deftest hydra-format-1 ()
1029 (should (equal
1030 (let ((hydra-fontify-head-function
1031 'hydra-fontify-head-greyscale))
1032 (hydra--format
1033 'hydra-toggle
1034 nil
1035 "
1036 _a_ abbrev-mode: %`abbrev-mode
1037 _d_ debug-on-error: %`debug-on-error
1038 _f_ auto-fill-mode: %`auto-fill-function
1039 " '(("a" abbrev-mode nil)
1040 ("d" toggle-debug-on-error nil)
1041 ("f" auto-fill-mode nil)
1042 ("g" golden-ratio-mode nil)
1043 ("t" toggle-truncate-lines nil)
1044 ("w" whitespace-mode nil)
1045 ("q" nil "quit"))))
1046 '(concat (format "%s abbrev-mode: %S
1047 %s debug-on-error: %S
1048 %s auto-fill-mode: %S
1049 " "{a}" abbrev-mode "{d}" debug-on-error "{f}" auto-fill-function) "[{q}]: quit."))))
1050
1051 (ert-deftest hydra-format-2 ()
1052 (should (equal
1053 (let ((hydra-fontify-head-function
1054 'hydra-fontify-head-greyscale))
1055 (hydra--format
1056 'bar
1057 nil
1058 "\n bar %s`foo\n"
1059 '(("a" (quote t) "" :cmd-name bar/lambda-a :exit nil)
1060 ("q" nil "" :cmd-name bar/nil :exit t))))
1061 '(concat (format " bar %s\n" foo) "{a}, [q]."))))
1062
1063 (ert-deftest hydra-format-3 ()
1064 (should (equal
1065 (let ((hydra-fontify-head-function
1066 'hydra-fontify-head-greyscale))
1067 (hydra--format
1068 'bar
1069 nil
1070 "\n_<SPC>_ ^^ace jump\n"
1071 '(("<SPC>" ace-jump-char-mode nil :cmd-name bar/ace-jump-char-mode))))
1072 '(concat (format "%s ace jump\n" "{<SPC>}") ""))))
1073
1074 (ert-deftest hydra-format-4 ()
1075 (should
1076 (equal (hydra--format
1077 nil
1078 '(nil nil :hint nil)
1079 "\n_j_,_k_"
1080 '(("j" nil nil :exit t) ("k" nil nil :exit t)))
1081 '(concat (format "%s,%s"
1082 #("j" 0 1 (face hydra-face-blue))
1083 #("k" 0 1 (face hydra-face-blue))) ""))))
1084
1085 (ert-deftest hydra-format-5 ()
1086 (should
1087 (equal (hydra--format
1088 nil nil "\n_-_: mark _u_: unmark\n"
1089 '(("-" Buffer-menu-mark)
1090 ("u" Buffer-menu-unmark)))
1091 '(concat
1092 (format
1093 "%s: mark %s: unmark\n"
1094 #("-" 0 1 (face hydra-face-red))
1095 #("u" 0 1 (face hydra-face-red)))
1096 ""))))
1097
1098 (ert-deftest hydra-format-6 ()
1099 (should
1100 (equal (hydra--format
1101 nil nil "\n[_]_] forward [_[_] backward\n"
1102 '(("]" forward-char)
1103 ("[" backward-char)))
1104 '(concat
1105 (format
1106 "[%s] forward [%s] backward\n"
1107 #("]"
1108 0 1 (face
1109 hydra-face-red))
1110 #("["
1111 0 1 (face
1112 hydra-face-red)))
1113 ""))))
1114
1115 (ert-deftest hydra-format-7 ()
1116 (should
1117 (equal
1118 (hydra--format nil nil "test"
1119 '(("%" forward-char "" :exit nil)
1120 ("b" backward-char "" :exit nil)))
1121 '(format
1122 #("test: %%%%, b."
1123 6 7 (face hydra-face-red)
1124 7 8 (face hydra-face-red)
1125 8 9 (face hydra-face-red)
1126 9 10 (face hydra-face-red)
1127 12 13 (face hydra-face-red)))))
1128 (should
1129 (equal
1130 (hydra--format nil nil "\n_%_ forward\n"
1131 '(("%" forward-char nil :exit nil)))
1132 '(concat
1133 (format
1134 "%s forward\n"
1135 #("%%"
1136 0 2 (face hydra-face-red)))
1137 ""))))
1138
1139 (ert-deftest hydra-format-with-sexp-1 ()
1140 (should (equal
1141 (let ((hydra-fontify-head-function
1142 'hydra-fontify-head-greyscale))
1143 (hydra--format
1144 'hydra-toggle nil
1145 "\n_n_ narrow-or-widen-dwim %(progn (message \"checking\")(buffer-narrowed-p))asdf\n"
1146 '(("n" narrow-to-region nil) ("q" nil "cancel" :exit t))))
1147 '(concat (format "%s narrow-or-widen-dwim %Sasdf\n"
1148 "{n}"
1149 (progn
1150 (message "checking")
1151 (buffer-narrowed-p)))
1152 "[[q]]: cancel."))))
1153
1154 (ert-deftest hydra-format-with-sexp-2 ()
1155 (should (equal
1156 (let ((hydra-fontify-head-function
1157 'hydra-fontify-head-greyscale))
1158 (hydra--format
1159 'hydra-toggle nil
1160 "\n_n_ narrow-or-widen-dwim %s(progn (message \"checking\")(buffer-narrowed-p))asdf\n"
1161 '(("n" narrow-to-region nil) ("q" nil "cancel" :exit t))))
1162 '(concat (format "%s narrow-or-widen-dwim %sasdf\n"
1163 "{n}"
1164 (progn
1165 (message "checking")
1166 (buffer-narrowed-p)))
1167 "[[q]]: cancel."))))
1168
1169 (ert-deftest hydra-compat-colors-2 ()
1170 (should
1171 (equal
1172 (macroexpand
1173 '(defhydra hydra-test (:color amaranth)
1174 ("a" fun-a)
1175 ("b" fun-b :color blue)
1176 ("c" fun-c :color blue)
1177 ("d" fun-d :color blue)
1178 ("e" fun-e :color blue)
1179 ("f" fun-f :color blue)))
1180 (macroexpand
1181 '(defhydra hydra-test (:color teal)
1182 ("a" fun-a :color red)
1183 ("b" fun-b)
1184 ("c" fun-c)
1185 ("d" fun-d)
1186 ("e" fun-e)
1187 ("f" fun-f))))))
1188
1189 (ert-deftest hydra-compat-colors-3 ()
1190 (should
1191 (equal
1192 (macroexpand
1193 '(defhydra hydra-test ()
1194 ("a" fun-a)
1195 ("b" fun-b :color blue)
1196 ("c" fun-c :color blue)
1197 ("d" fun-d :color blue)
1198 ("e" fun-e :color blue)
1199 ("f" fun-f :color blue)))
1200 (macroexpand
1201 '(defhydra hydra-test (:color blue)
1202 ("a" fun-a :color red)
1203 ("b" fun-b)
1204 ("c" fun-c)
1205 ("d" fun-d)
1206 ("e" fun-e)
1207 ("f" fun-f))))))
1208
1209 (ert-deftest hydra-compat-colors-4 ()
1210 (should
1211 (equal
1212 (macroexpand
1213 '(defhydra hydra-test ()
1214 ("a" fun-a)
1215 ("b" fun-b :exit t)
1216 ("c" fun-c :exit t)
1217 ("d" fun-d :exit t)
1218 ("e" fun-e :exit t)
1219 ("f" fun-f :exit t)))
1220 (macroexpand
1221 '(defhydra hydra-test (:exit t)
1222 ("a" fun-a :exit nil)
1223 ("b" fun-b)
1224 ("c" fun-c)
1225 ("d" fun-d)
1226 ("e" fun-e)
1227 ("f" fun-f))))))
1228
1229 (ert-deftest hydra--pad ()
1230 (should (equal (hydra--pad '(a b c) 3)
1231 '(a b c)))
1232 (should (equal (hydra--pad '(a) 3)
1233 '(a nil nil))))
1234
1235 (ert-deftest hydra--matrix ()
1236 (should (equal (hydra--matrix '(a b c) 2 2)
1237 '((a b) (c nil))))
1238 (should (equal (hydra--matrix '(a b c d e f g h i) 4 3)
1239 '((a b c d) (e f g h) (i nil nil nil)))))
1240
1241 (ert-deftest hydra--cell ()
1242 (should (equal (hydra--cell "% -75s %%`%s" '(hydra-lv hydra-verbose))
1243 "When non-nil, `lv-message' (not `message') will be used to display hints. %`hydra-lv^^^^^
1244 When non-nil, hydra will issue some non essential style warnings. %`hydra-verbose")))
1245
1246 (ert-deftest hydra--vconcat ()
1247 (should (equal (hydra--vconcat '("abc\ndef" "012\n34" "def\nabc"))
1248 "abc012def\ndef34abc")))
1249
1250 (defhydradio hydra-tng ()
1251 (picard "_p_ Captain Jean Luc Picard:")
1252 (riker "_r_ Commander William Riker:")
1253 (data "_d_ Lieutenant Commander Data:")
1254 (worf "_w_ Worf:")
1255 (la-forge "_f_ Geordi La Forge:")
1256 (troi "_t_ Deanna Troi:")
1257 (dr-crusher "_c_ Doctor Beverly Crusher:")
1258 (phaser "_h_ Set phasers to " [stun kill]))
1259
1260 (ert-deftest hydra--table ()
1261 (let ((hydra-cell-format "% -30s %% -8`%s"))
1262 (should (equal (hydra--table hydra-tng/names 5 2)
1263 (substring "
1264 _p_ Captain Jean Luc Picard: % -8`hydra-tng/picard^^ _t_ Deanna Troi: % -8`hydra-tng/troi^^^^^^
1265 _r_ Commander William Riker: % -8`hydra-tng/riker^^^ _c_ Doctor Beverly Crusher: % -8`hydra-tng/dr-crusher
1266 _d_ Lieutenant Commander Data: % -8`hydra-tng/data^^^^ _h_ Set phasers to % -8`hydra-tng/phaser^^^^
1267 _w_ Worf: % -8`hydra-tng/worf^^^^
1268 _f_ Geordi La Forge: % -8`hydra-tng/la-forge" 1)))
1269 (should (equal (hydra--table hydra-tng/names 4 3)
1270 (substring "
1271 _p_ Captain Jean Luc Picard: % -8`hydra-tng/picard _f_ Geordi La Forge: % -8`hydra-tng/la-forge^^
1272 _r_ Commander William Riker: % -8`hydra-tng/riker^ _t_ Deanna Troi: % -8`hydra-tng/troi^^^^^^
1273 _d_ Lieutenant Commander Data: % -8`hydra-tng/data^^ _c_ Doctor Beverly Crusher: % -8`hydra-tng/dr-crusher
1274 _w_ Worf: % -8`hydra-tng/worf^^ _h_ Set phasers to % -8`hydra-tng/phaser^^^^" 1)))))
1275
1276 (ert-deftest hydra--make-funcall ()
1277 (should (equal (let ((body-pre 'foo))
1278 (hydra--make-funcall body-pre)
1279 body-pre)
1280 '(funcall (function foo)))))
1281
1282 (defhydra hydra-simple-1 (global-map "C-c")
1283 ("a" (insert "j"))
1284 ("b" (insert "k"))
1285 ("q" nil))
1286
1287 (defhydra hydra-simple-2 (global-map "C-c" :color amaranth)
1288 ("c" self-insert-command)
1289 ("d" self-insert-command)
1290 ("q" nil))
1291
1292 (defhydra hydra-simple-3 (global-map "C-c")
1293 ("g" goto-line)
1294 ("1" find-file)
1295 ("q" nil))
1296
1297 (defmacro hydra-with (in &rest body)
1298 `(let ((temp-buffer (generate-new-buffer " *temp*")))
1299 (save-window-excursion
1300 (unwind-protect
1301 (progn
1302 (switch-to-buffer temp-buffer)
1303 (transient-mark-mode 1)
1304 (insert ,in)
1305 (goto-char (point-min))
1306 (when (search-forward "~" nil t)
1307 (backward-delete-char 1)
1308 (set-mark (point)))
1309 (goto-char (point-max))
1310 (search-backward "|")
1311 (delete-char 1)
1312 (setq current-prefix-arg)
1313 ,@body
1314 (insert "|")
1315 (when (region-active-p)
1316 (exchange-point-and-mark)
1317 (insert "~"))
1318 (buffer-substring-no-properties
1319 (point-min)
1320 (point-max)))
1321 (and (buffer-name temp-buffer)
1322 (kill-buffer temp-buffer))))))
1323
1324 (ert-deftest hydra-integration-1 ()
1325 (should (string= (hydra-with "|"
1326 (execute-kbd-macro
1327 (kbd "C-c aabbaaqaabbaa")))
1328 "jjkkjjaabbaa|"))
1329 (should (string= (hydra-with "|"
1330 (condition-case nil
1331 (execute-kbd-macro
1332 (kbd "C-c aabb C-g"))
1333 (quit nil))
1334 (execute-kbd-macro "aaqaabbaa"))
1335 "jjkkaaqaabbaa|")))
1336
1337 (ert-deftest hydra-integration-2 ()
1338 (should (string= (hydra-with "|"
1339 (execute-kbd-macro
1340 (kbd "C-c c 1 c 2 d 4 c q")))
1341 "ccddcccc|"))
1342 (should (string= (hydra-with "|"
1343 (execute-kbd-macro
1344 (kbd "C-c c 1 c C-u d C-u 10 c q")))
1345 "ccddddcccccccccc|")))
1346
1347 (ert-deftest hydra-integration-3 ()
1348 (should (string= (hydra-with "foo\nbar|"
1349 (execute-kbd-macro
1350 (kbd "C-c g 1 RET q")))
1351 "|foo\nbar")))
1352
1353 (ert-deftest hydra-columns-1 ()
1354 (should (equal (eval
1355 (cadr
1356 (nth 2
1357 (nth 3
1358 (macroexpand
1359 '(defhydra hydra-info (:color blue
1360 :columns 3)
1361 "Info-mode"
1362 ("?" Info-summary "summary")
1363 ("]" Info-forward-node "forward")
1364 ("[" Info-backward-node "backward")
1365 ("<" Info-top-node "top node")
1366 (">" Info-final-node "final node")
1367 ("h" Info-help "help")
1368 ("d" Info-directory "info dir")
1369 ("f" Info-follow-reference "follow ref")
1370 ("g" Info-goto-node "goto node")
1371 ("l" Info-history-back "hist back")
1372 ("r" Info-history-forward "hist forward")
1373 ("i" Info-index "index")
1374 ("I" Info-virtual-index "virtual index")
1375 ("L" Info-history "hist")
1376 ("n" Info-next "next")
1377 ("p" Info-prev "previous")
1378 ("s" Info-search "search")
1379 ("S" Info-search-case-sensitively "case-search")
1380 ("T" Info-toc "TOC")
1381 ("u" Info-up "up")
1382 ("m" Info-menu "menu")
1383 ("t" hydra-info-to/body "info-to")))))))
1384 #("Info-mode:
1385 ?: summary ]: forward [: backward
1386 <: top node >: final node h: help
1387 d: info dir f: follow ref g: goto node
1388 l: hist back r: hist forward i: index
1389 I: virtual index L: hist n: next
1390 p: previous s: search S: case-search
1391 T: TOC u: up m: menu
1392 t: info-to"
1393 11 12 (face hydra-face-blue)
1394 28 29 (face hydra-face-blue)
1395 45 46 (face hydra-face-blue)
1396 57 58 (face hydra-face-blue)
1397 74 75 (face hydra-face-blue)
1398 91 92 (face hydra-face-blue)
1399 99 100 (face hydra-face-blue)
1400 116 117 (face hydra-face-blue)
1401 133 134 (face hydra-face-blue)
1402 146 147 (face hydra-face-blue)
1403 163 164 (face hydra-face-blue)
1404 180 181 (face hydra-face-blue)
1405 189 190 (face hydra-face-blue)
1406 206 207 (face hydra-face-blue)
1407 223 224 (face hydra-face-blue)
1408 231 232 (face hydra-face-blue)
1409 248 249 (face hydra-face-blue)
1410 265 266 (face hydra-face-blue)
1411 280 281 (face hydra-face-blue)
1412 297 298 (face hydra-face-blue)
1413 314 315 (face hydra-face-blue)
1414 322 323 (face hydra-face-blue)))))
1415
1416 (provide 'hydra-test)
1417
1418 ;;; hydra-test.el ends here