-
-
Notifications
You must be signed in to change notification settings - Fork 114
Comparing changes
Open a pull request
base repository: abo-abo/hydra
base: 0.11.0
head repository: abo-abo/hydra
compare: master
Commits on Feb 23, 2015
-
Allow for a custom key format spec in docstrings
* hydra.el (hydra-key-format-spec): New defcustom. (hydra--format): Use `hydra-key-format-spec'. Allow for 0-9 and / in key bindings. Here's an example of how to use a flexible format spec for each key: (let (hydra-key-format-spec) (defhydra hydra-zoom (global-map "<f2>") " zoom: _g_reater _ -5l_esser re_ 7c_enter zer_0_" ("g" text-scale-increase nil) ("l" text-scale-decrease nil) ("c" recenter-top-bottom nil) ("0" (text-scale-set 0) nil :exit t))) Fixes #50.
Configuration menu - View commit details
-
Copy full SHA for c413b5f - Browse repository at this point
Copy the full SHA c413b5fView commit details
Commits on Feb 24, 2015
-
Simplify the hint part of each head
* hydra.el (defhydra): All heads that don't have a hint, will get "" as hint. The behavior will remain the same. (hydra--head-property): Simplify, since plist is now always `cdddr'. (hydra--hint): Simplify, heads always have length at least 3. Simplify, third element is always a string or nil.
Configuration menu - View commit details
-
Copy full SHA for f231dc0 - Browse repository at this point
Copy the full SHA f231dc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c06695 - Browse repository at this point
Copy the full SHA 3c06695View commit details -
Improve handling of heads with duplicate cmd
hydra.el (hydra--delete-duplicates): Modify :cmd-name property of duplicate head to to name of the head that it duplicates. Heads are considered duplicate if their CMD and COLOR is the same. The first of the duplicates gets a defun, the rest call it. * hydra.el (defhydra): Bring heads into a uniform notation. If a docstring is missing, set it to "". Set :cmd-name property to the head's name. * hydra-test.el: Add tests. Fixes #52.
Configuration menu - View commit details
-
Copy full SHA for 55682e7 - Browse repository at this point
Copy the full SHA 55682e7View commit details -
Don't bind nil heads in outside keymaps
* hydra.el (hydra-exit): New command to be used for nil heads. (hydra--delete-duplicates): Update for `hydra-exit'. (defhydra): Don't bind `hydra-exit' in outside keymaps. * hydra-test.el (hydra-blue-toggle): Update test. (hydra-amaranth-vi): Update test. Fixes #48.
Configuration menu - View commit details
-
Copy full SHA for eb1e0fc - Browse repository at this point
Copy the full SHA eb1e0fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for e567bd6 - Browse repository at this point
Copy the full SHA e567bd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26c3fee - Browse repository at this point
Copy the full SHA 26c3feeView commit details
Commits on Feb 25, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 3040f45 - Browse repository at this point
Copy the full SHA 3040f45View commit details -
hydra.el (hydra-key-format-spec): set default to "%s"
* hydra-test.el (hydra-format): Update test. (hydra-format-with-sexp): Update test.
Configuration menu - View commit details
-
Copy full SHA for 6d6bbd4 - Browse repository at this point
Copy the full SHA 6d6bbd4View commit details
Commits on Feb 26, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 9fc928b - Browse repository at this point
Copy the full SHA 9fc928bView commit details
Commits on Feb 27, 2015
-
Add
hydra-repeat': hydra-specific
repeat'* hydra.el (hydra-repeat): New defun. (hydra-repeat--command): New defvar. (hydra-repeat--prefix-arg): New defvar. Example: (defhydra hydra-vi () "vi" ("h" backward-char) ("j" next-line) ("k" previous-line) ("l" forward-char) ("." hydra-repeat)) (global-set-key (kbd "C-v") 'hydra-vi/body) "C-v 4l.." will result in movement forward by 4 chars 3 times: first time from "4l", the other two from "..". Fixes #59.
Configuration menu - View commit details
-
Copy full SHA for 7de26d0 - Browse repository at this point
Copy the full SHA 7de26d0View commit details -
Add some features for generating tables
* hydra.el (hydra--pad): New defun. (hydra--matrix): New defun. (hydra--cell): New defun. (hydra--vconcat): New defun. (hydra-cell-format): New defcustom. (hydra--table): New defun. (hydra-reset-radios): New defun. (defhydra): Allow docstring to be eval-able. (defhydradio): Don't define `.../reset-radios', instead define `.../names' that can be passed to `hydra-reset-radios'. (hydra-multipop): New defmacro. (hydra--radio): Update the order - the docstring is now a mandatory second arg, value is the optional third. * hydra-test.el (defhydradio): Update test. (hydra--pad): Add test. (hydra--matrix): Add test. (hydra--cell): Add test. (hydra--vconcat): Add test. (hydra--table): Add test.
Configuration menu - View commit details
-
Copy full SHA for 8e90037 - Browse repository at this point
Copy the full SHA 8e90037View commit details -
* hydra.el (hydra--delete-duplicates): Update. (hydra--vconcat): Trim trailing spaces. * hydra-test.el (hydra-red-error): Update test. (hydra--table): Update test.
Configuration menu - View commit details
-
Copy full SHA for 41f98bd - Browse repository at this point
Copy the full SHA 41f98bdView commit details
Commits on Feb 28, 2015
-
hydra.el (hydra--format): Amend key regex
Recognize the '{' and '}' keys.
Configuration menu - View commit details
-
Copy full SHA for 764f4b6 - Browse repository at this point
Copy the full SHA 764f4b6View commit details
Commits on Mar 2, 2015
-
Add :timeout option to hydra body
* hydra.el (hydra--make-defun): Call `hydra-timeout' with :timeout if it's given. (hydra-timer): New var to hold the timer. (hydra-timeout): New function to call `hydra-keyboard-quit' with delay. (hydra-keyboard-quit): Cancel `hydra-timeout' timer. Re #34.
Configuration menu - View commit details
-
Copy full SHA for 9c68e0a - Browse repository at this point
Copy the full SHA 9c68e0aView commit details
Commits on Mar 4, 2015
-
Configuration menu - View commit details
-
Copy full SHA for e1e2e3e - Browse repository at this point
Copy the full SHA e1e2e3eView commit details -
Allow for a %s(test) spec in docstring
* hydra.el (hydra-set-transient-map): Avoid compiler warnings. (hydra--format): Add s? to regex. - %(test) will translate to (format "%S" (test)) - %s(test) will translate to (format "%s" (test)) The width specifiers should work for both, e.g. % -10(test) or % -10s(test). Example: (defhydra hydra-marked-items (dired-mode-map "") " Number of marked items: %(length (dired-get-marked-files)) Directory size: %s(shell-command-to-string \"du -hs\") " ("m" dired-mark "mark")) Fixes #65.
Configuration menu - View commit details
-
Copy full SHA for 8dec3cd - Browse repository at this point
Copy the full SHA 8dec3cdView commit details
Commits on Mar 5, 2015
-
hydra-ox.el: Emulate org-mode export dispatch
* hydra-ox.el (hydra-ox): New radiogroup. (hydra-ox-html): New hydra. (hydra-ox-latex): New hydra. (hydra-ox-text): New hydra. (hydra-ox): New hydra that includes the above three hydras. (org-mode-map): Add test binding. Re #66.
8Configuration menu - View commit details
-
Copy full SHA for e342c33 - Browse repository at this point
Copy the full SHA e342c33View commit details
Commits on Mar 6, 2015
-
Add option to specify :hint in body
* hydra.el (hydra-plist-get-default): New defun, extended `plist-get'. (hydra--head-property): Use `hydra-plist-get-default'. (defhydra): The heads will inherit their hint from body :hint parameter. They can override it, of course. The most use you can get out of this parameter is to specify :hint nil for hydras with a format-style docstring. Example: (defhydra hydra-org-template (:color blue :hint nil) " _c_enter _q_uote _L_aTeX: _l_atex _e_xample _i_ndex: _a_scii _v_erse _I_NCLUDE: _s_rc ^ ^ _H_TML: _h_tml ^ ^ _A_SCII: " ("s" (hot-expand "<s")) ("e" (hot-expand "<e")) ("q" (hot-expand "<q")) ("v" (hot-expand "<v")) ("c" (hot-expand "<c")) ("l" (hot-expand "<l")) ("h" (hot-expand "<h")) ("a" (hot-expand "<a")) ("L" (hot-expand "<L")) ("i" (hot-expand "<i")) ("I" (hot-expand "<I")) ("H" (hot-expand "<H")) ("A" (hot-expand "<A")) ("<" self-insert-command "ins") ("o" nil "quit")) Some setup: (defun hot-expand (str) "Expand org template." (insert str) (org-try-structure-completion)) (define-key org-mode-map "<" (lambda () (interactive) (if (looking-back "^") (hydra-org-template/body) (self-insert-command 1))))
Configuration menu - View commit details
-
Copy full SHA for 77c8e40 - Browse repository at this point
Copy the full SHA 77c8e40View commit details -
hydra-ox.el (hydra-ox): Update parameter list
The `defhydradio' spec for each parameter was updated to: (name &optional doc value) This way, it's easy to define this type of hydra: (defhydradio hydra-tng () (picard "_p_ Captain Jean Luc Picard:") (riker "_r_ Commander William Riker:") (data "_d_ Lieutenant Commander Data:") (worf "_w_ Worf:") (la-forge "_f_ Geordi La Forge:") (troi "_t_ Deanna Troi:") (dr-crusher "_c_ Doctor Beverly Crusher:") (phaser "_h_ Set phasers to " [stun kill])) (defhydra hydra-tng (:color pink) (concat (hydra--table hydra-tng/names 7 2 '(" % -30s %% -3`%s" "%s %%`%s")) "\n\n") ("p" (hydra-tng/picard) nil) ("r" (hydra-tng/riker) nil) ("d" (hydra-tng/data) nil) ("w" (hydra-tng/worf) nil) ("f" (hydra-tng/la-forge) nil) ("t" (hydra-tng/troi) nil) ("c" (hydra-tng/dr-crusher) nil) ("h" (hydra-tng/phaser) nil) ("b" beam-down "beam down" :exit t) ("o" (hydra-reset-radios hydra-tng/names) "reset") ("q" nil "cancel"))
Configuration menu - View commit details
-
Copy full SHA for 9623625 - Browse repository at this point
Copy the full SHA 9623625View commit details -
Update `golden-ratio-mode' work-around
* lv.el (lv-window): Update. (lv-message): Update. Re #64.
Configuration menu - View commit details
-
Copy full SHA for b840227 - Browse repository at this point
Copy the full SHA b840227View commit details
Commits on Mar 9, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 88c7dc4 - Browse repository at this point
Copy the full SHA 88c7dc4View commit details
Commits on Mar 10, 2015
-
"C-g" (`hydra-keyboard-quit' ) should run :post
* hydra.el (hydra--handle-nonhead): Bind the plain `hydra-keyboard-quit' only when there's no :post. (defhydra): When there's :post, add another head for keyboard quit. * hydra-test.el (hydra-amaranth-vi): Update test. Fixes #67.
Configuration menu - View commit details
-
Copy full SHA for a867927 - Browse repository at this point
Copy the full SHA a867927View commit details
Commits on Mar 11, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 5c2f420 - Browse repository at this point
Copy the full SHA 5c2f420View commit details -
* hydra-init.el: Add bare init. Now, typing: make compile in the hydra repository will start an "emacs -q" with all hydras from hydra-examples.el defined. Thus you can test that they work for you. The simplest one is "<f2> g", you can type that in any buffer. If you want to test with a different version of emacs, just type e.g.: make compile emacs=emacs24 Re #70.
Configuration menu - View commit details
-
Copy full SHA for bca2441 - Browse repository at this point
Copy the full SHA bca2441View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58075f5 - Browse repository at this point
Copy the full SHA 58075f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a071b60 - Browse repository at this point
Copy the full SHA a071b60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 622c798 - Browse repository at this point
Copy the full SHA 622c798View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f4c835 - Browse repository at this point
Copy the full SHA 7f4c835View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9432e8 - Browse repository at this point
Copy the full SHA c9432e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f11348 - Browse repository at this point
Copy the full SHA 3f11348View commit details -
Configuration menu - View commit details
-
Copy full SHA for 556db52 - Browse repository at this point
Copy the full SHA 556db52View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfe65da - Browse repository at this point
Copy the full SHA bfe65daView commit details
Commits on Mar 12, 2015
-
lv.el: Update truncation rules
* lv.el (lv-window): Defer `truncate-lines' to `lv-message'. Set window hscroll to 0, just in case. (lv-message): If STR is one-line, set `truncate-lines' to nil, otherwise set it to t. Make `window-min-height' buffer-local and set it to the amount of newlines in STR. Re #40.
Configuration menu - View commit details
-
Copy full SHA for 3c4b3fd - Browse repository at this point
Copy the full SHA 3c4b3fdView commit details -
Bind [switch-frame] to `hydra-keyboard-quit'
* hydra.el (hydra-base-map): Update. * hydra-test.el: Update. Fixes #73.
Configuration menu - View commit details
-
Copy full SHA for 9f9dcf9 - Browse repository at this point
Copy the full SHA 9f9dcf9View commit details
Commits on Mar 13, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 5e8c7f2 - Browse repository at this point
Copy the full SHA 5e8c7f2View commit details
Commits on Mar 14, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 543e97b - Browse repository at this point
Copy the full SHA 543e97bView commit details
Commits on Mar 15, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 3a77bf6 - Browse repository at this point
Copy the full SHA 3a77bf6View commit details
Commits on Mar 17, 2015
-
* hydra-examples.el (hydra-toggle-simple): Rename from `hydra-toggle'. (hydra-rectangle): New hydra.
Configuration menu - View commit details
-
Copy full SHA for 97d6987 - Browse repository at this point
Copy the full SHA 97d6987View commit details
Commits on Mar 20, 2015
-
Don't bind `hydra-keyboard-quit' in foreign keymaps
* hydra.el (defhydra): Update. Fixes #78.
Configuration menu - View commit details
-
Copy full SHA for d44bf58 - Browse repository at this point
Copy the full SHA d44bf58View commit details -
* hydra.el (hydra--make-defun): When both :timeout and :post are given, if `hydra-timeout' runs out, it will call :post before `hydra-keyboard-quit'. (hydra-timeout): Update to call function if it's given. Always call `hydra-keyboard-quit' afterwards. For this example code: (global-set-key (kbd "C-c t") (defhydra test-hydra-b (:timeout 2.0 :post (message "test b quit")) "test b" ("x" (message "x")) ("y" (message "y")) ("q" nil "quit"))) The message "test b quit" is issued: - on "q" - on "x" or "y", after one of them has started the timer, and the timer ran out. The timer is set to 2.0 seconds, and is reset each time "x" or "y" is pressed. - not on a plain "C-c t" Fixes #34
Configuration menu - View commit details
-
Copy full SHA for eb181fd - Browse repository at this point
Copy the full SHA eb181fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e4b1fa - Browse repository at this point
Copy the full SHA 8e4b1faView commit details
Commits on Mar 21, 2015
-
hydra.el (hydra-keyboard-quit): Clean up the message area
* hydra.el (hydra-keyboard-quit): Update. Fixes #80.
Configuration menu - View commit details
-
Copy full SHA for 30a073b - Browse repository at this point
Copy the full SHA 30a073bView commit details -
Set pink/amaranth override recursively
* hydra.el (hydra--modify-keymap): New defun. (hydra--handle-nonhead): Update. Fixes #81.
Configuration menu - View commit details
-
Copy full SHA for 498d78b - Browse repository at this point
Copy the full SHA 498d78bView commit details
Commits on Mar 22, 2015
-
* hydra.el (hydra--format): Save match data. (hydra--handle-nonhead): Don't quote lambda. (hydra--cycle-radio): Use cl-incf.
Configuration menu - View commit details
-
Copy full SHA for 7783f89 - Browse repository at this point
Copy the full SHA 7783f89View commit details -
hydra.el: Turn on lexical-binding
* hydra.el (hydra-set-transient-map): Fix warning. (hydra--head-color): Fix warning. (hydra--hint): Update signature. (hydra--format): Update. (hydra--matrix): Fix warning. (defhydra): Fix warning. (defhydradio): Fix warning.
Configuration menu - View commit details
-
Copy full SHA for 03771f4 - Browse repository at this point
Copy the full SHA 03771f4View commit details
Commits on Mar 23, 2015
-
* hydra.el (hydra--format): Update. Treat variables in the same way as s-expressions. * hydra-test.el (hydra-format-2): Add test. (hydra-format-with-sexp-2): Add test. Fixes #85
Configuration menu - View commit details
-
Copy full SHA for f6697f3 - Browse repository at this point
Copy the full SHA f6697f3View commit details -
Fix blue/red heads with same cmd
* hydra.el (hydra--make-defun): Update. (hydra--head-name): Change signature, since body is needed to determine the color. When the head will exit, add "-and-exit" to its name (except for the nil head and body). (defhydra): Update the call to `hydra--head-name', since it's not valid until the head has a hint. * hydra-test.el (hydra-blue-toggle): Update. (hydra-amaranth-vi): Update. (hydra-zoom-duplicate-1): Update. (hydra-zoom-duplicate-2): Update. Fixes #84
Configuration menu - View commit details
-
Copy full SHA for c8c6b8c - Browse repository at this point
Copy the full SHA c8c6b8cView commit details
Commits on Mar 24, 2015
-
Fix argument to `replace-match'
* hydra.el (hydra--format): Update. * hydra-test.el (hydra-format-3): Add test. Fixes #91
Configuration menu - View commit details
-
Copy full SHA for 71491b9 - Browse repository at this point
Copy the full SHA 71491b9View commit details -
Mention the leading newline in `defhydra' docstring
* hydra.el (hydra--handle-switch-frame): Update doc. (hydra--format): Update doc. (hydra-timeout): Update doc. (defhydra): Update doc. (defhydradio): Update doc. Fixes #88.
Configuration menu - View commit details
-
Copy full SHA for 87e4574 - Browse repository at this point
Copy the full SHA 87e4574View commit details
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.