]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy-hydra.el: Improve for hydra not installed
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 16 Jun 2015 09:42:46 +0000 (11:42 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 16 Jun 2015 09:43:26 +0000 (11:43 +0200)
* ivy-hydra.el (hydra): No error on require.
(package-installed-p): Enable recursive minibuffers.
(hydra-ivy): Use ASCII char instead of Unicode, since the char width may
cause misalignment.

ivy-hydra.el

index 20dd3b938577483f143799d28be7ecb61c8cd80d..a5b4dde98e07ebc8690f7eb53b1c92f4a9f2bad6 100644 (file)
@@ -26,7 +26,7 @@
 ;; shorter than usual, using mostly unprefixed keys.
 
 ;;; Code:
-(require 'hydra)
+(require 'hydra nil t)
 (require 'ivy)
 
 (unless (package-installed-p 'hydra)
     "This is a stub for the uninstalled `hydra' package."
     `(defun ,(intern (format "%S/body" name)) ()
        (interactive)
-       (if (yes-or-no-p "Package `hydra' not installed. Install?")
-           (progn
-             (package-install 'hydra)
-             (save-window-excursion
-               (find-library "ivy-hydra")
-               (byte-compile-file (buffer-file-name) t)))
-         (error "Please install `hydra' and recompile/reinstall `ivy-hydra'")))))
-
-
+       (let ((enable-recursive-minibuffers t))
+         (if (yes-or-no-p "Package `hydra' not installed. Install?")
+             (progn
+               (package-install 'hydra)
+               (save-window-excursion
+                 (find-library "ivy-hydra")
+                 (byte-compile-file (buffer-file-name) t)))
+           (error "Please install `hydra' and recompile/reinstall `ivy-hydra'"))))))
 
 (defhydra hydra-ivy (:hint nil
                      :color pink)
@@ -50,7 +49,7 @@
 ^^^^^^          ^Yes^     ^No^     ^Maybe^
 ^^^^^^^^^^^^^^---------------------------------------
 ^ ^ _k_ ^ ^     _f_ollow  _i_nsert _c_: calling %s(if ivy-calling \"on\" \"off\")
-_h_ ^^ _l_     _d_one    _o_ops   _m_: matcher %s(if (eq ivy--regex-function 'ivy--regex-fuzzy) \"fuzzy\" \"ivy\")
+_h_ ^+^ _l_     _d_one    _o_ops   _m_: matcher %s(if (eq ivy--regex-function 'ivy--regex-fuzzy) \"fuzzy\" \"ivy\")
 ^ ^ _j_ ^ ^
 "
   ;; arrows