From: Oleh Krehel Date: Fri, 4 Mar 2016 19:59:27 +0000 (+0100) Subject: Merge commit 'e0454a100541ce3f1f732b97894a3441cef3316f' from hydra X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/ab7d7f3c0cad5145d6e171ff29b8443bd34706cc?hp=5cf5b85bd3205bfecb7a34926b33690d06c7d0b8 Merge commit 'e0454a100541ce3f1f732b97894a3441cef3316f' from hydra --- diff --git a/packages/hydra/.elpaignore b/packages/hydra/.elpaignore new file mode 100644 index 000000000..a6b1577f2 --- /dev/null +++ b/packages/hydra/.elpaignore @@ -0,0 +1,6 @@ +targets/ +.travis.yml +.dir-locals.el +Makefile +README.md +hydra-test.el diff --git a/packages/hydra/hydra-examples.el b/packages/hydra/hydra-examples.el index 1468f3ffd..9264feb86 100644 --- a/packages/hydra/hydra-examples.el +++ b/packages/hydra/hydra-examples.el @@ -260,6 +260,7 @@ _v_ariable _u_ser-option ;; (global-set-key (kbd "C-c h") 'hydra-apropos/body) ;;** Example 11: rectangle-mark-mode +(require 'rect) (defhydra hydra-rectangle (:body-pre (rectangle-mark-mode 1) :color pink :post (deactivate-mark)) @@ -270,10 +271,10 @@ _h_ _l_ _o_k _y_ank ^^^^ _e_xchange _u_ndo ^^^^ ^ ^ _p_aste " - ("h" backward-char nil) - ("l" forward-char nil) - ("k" previous-line nil) - ("j" next-line nil) + ("h" rectangle-backward-char nil) + ("l" rectangle-forward-char nil) + ("k" rectangle-previous-line nil) + ("j" rectangle-next-line nil) ("e" hydra-ex-point-mark nil) ("n" copy-rectangle-as-kill nil) ("d" delete-rectangle nil) @@ -329,7 +330,7 @@ _h_ _l_ _o_k _y_ank "Exchange point and mark." (interactive) (if rectangle-mark-mode - (exchange-point-and-mark) + (rectangle-exchange-point-and-mark) (let ((mk (mark))) (rectangle-mark-mode 1) (goto-char mk)))) diff --git a/packages/hydra/hydra.el b/packages/hydra/hydra.el index 1516c856b..8c6ce7f95 100644 --- a/packages/hydra/hydra.el +++ b/packages/hydra/hydra.el @@ -5,7 +5,7 @@ ;; Author: Oleh Krehel ;; Maintainer: Oleh Krehel ;; URL: https://github.com/abo-abo/hydra -;; Version: 0.13.4 +;; Version: 0.13.5 ;; Keywords: bindings ;; Package-Requires: ((cl-lib "0.5")) @@ -141,11 +141,12 @@ warn: keep KEYMAP and issue a warning instead of running the command." "Disable the current Hydra." (setq hydra-deactivate nil) (remove-hook 'pre-command-hook 'hydra--clearfun) - (if (fboundp 'remove-function) - (remove-function input-method-function #'hydra--imf) - (when hydra--input-method-function - (setq input-method-function hydra--input-method-function) - (setq hydra--input-method-function nil))) + (unless hydra--ignore + (if (fboundp 'remove-function) + (remove-function input-method-function #'hydra--imf) + (when hydra--input-method-function + (setq input-method-function hydra--input-method-function) + (setq hydra--input-method-function nil)))) (dolist (frame (frame-list)) (with-selected-frame frame (when overriding-terminal-local-map @@ -585,7 +586,7 @@ The expressions can be auto-expanded according to NAME." offset) (while (setq start (string-match - "\\(?:%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_\\( ?-?[0-9]*?\\)\\(\\[\\|]\\|[-[:alnum:] ~.,;:/|?<>={}*+#%@!&]+?\\)_\\)" + "\\(?:%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_\\( ?-?[0-9]*?\\)\\(\\[\\|]\\|[-[:alnum:] ~.,;:/|?<>={}*+#%@!&^]+?\\)_\\)" docstring start)) (cond ((eq ?_ (aref (match-string 0 docstring) 0)) (let* ((key (match-string 4 docstring)) @@ -600,7 +601,7 @@ The expressions can be auto-expanded according to NAME." hydra-key-format-spec (concat "%" (match-string 3 docstring) "s")) t nil docstring))) - (error "Unrecognized key: _%s_" key)))) + (warn "Unrecognized key: _%s_" key)))) (t (let* ((varp (if (eq ?` (aref (match-string 2 docstring) 0)) 1 0)) diff --git a/packages/hydra/lv.el b/packages/hydra/lv.el index 8d6192f76..23d2c3071 100644 --- a/packages/hydra/lv.el +++ b/packages/hydra/lv.el @@ -98,7 +98,7 @@ Only the background color is significant." (insert (propertize "__" 'face 'lv-separator 'display '(space :height (1))) (propertize "\n" 'face 'lv-separator 'line-height t))) - (setq-local window-min-height n-lines) + (set (make-local-variable 'window-min-height) n-lines) (setq truncate-lines (> n-lines 1)) (let ((window-resize-pixelwise t) (window-size-fixed nil))