diff --git a/lispy-pkg.el b/lispy-pkg.el index 7ec91123..493e82ed 100644 --- a/lispy-pkg.el +++ b/lispy-pkg.el @@ -1,8 +1,6 @@ (define-package "lispy" "0.24.0" "vi-like Paredit" '((emacs "24.1") - (ace-window "0.8.0") - (hydra "0.12.1") + (ace-window "0.9.0") (iedit "0.97") - (multiple-cursors "1.3.0") - (swiper "0.2.0"))) + (swiper "0.4.0"))) diff --git a/lispy.el b/lispy.el index 55d3b083..7c7218c8 100644 --- a/lispy.el +++ b/lispy.el @@ -151,7 +151,6 @@ (require 'lispy-inline) (require 'iedit) (require 'delsel) -(require 'hydra) (require 'swiper) ;;* Customization @@ -6188,6 +6187,19 @@ FUNC is obtained from (`lispy--insert-or-call' DEF PLIST)." ("f" lispy-flatten) ("a" lispy-teleport))) +(unless (package-installed-p 'hydra) + (defmacro defhydra (name &rest _) + "This is a stub for 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 "lispy") + (byte-compile-file (buffer-file-name) t))) + (error "Please install `hydra' and recompile/reinstall `lispy'"))))) + (defhydra lh-knight () "knight" ("j" lispy-knight-down)