]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
9 years agoMerge commit 'f954c936afc1e3de21a3ee0d6e5add9853f8ed58'
Matthew Carter [Tue, 10 Mar 2015 05:04:13 +0000 (01:04 -0400)]
Merge commit 'f954c936afc1e3de21a3ee0d6e5add9853f8ed58'

9 years agoAdd some better defaults for helm selections
Matthew Carter [Tue, 10 Mar 2015 05:00:44 +0000 (01:00 -0400)]
Add some better defaults for helm selections

9 years agoUpdate seq.el to version 1.3
Nicolas Petton [Mon, 9 Mar 2015 11:35:07 +0000 (12:35 +0100)]
Update seq.el to version 1.3

* packages/seq/seq.el: update to version 1.3
* packages/seq/tests/seq-tests.el: update to version 1.3

9 years agoMerge commit '7eca7d023c95bc21c7838467b3a58d549afaf68d'
Artur Malabarba [Sun, 8 Mar 2015 00:20:36 +0000 (21:20 -0300)]
Merge commit '7eca7d023c95bc21c7838467b3a58d549afaf68d'

9 years agospinner: Update copyright
Artur Malabarba [Sun, 8 Mar 2015 00:20:18 +0000 (21:20 -0300)]
spinner: Update copyright

9 years agolet-alist: Update copyright
Artur Malabarba [Sun, 8 Mar 2015 00:19:38 +0000 (21:19 -0300)]
let-alist: Update copyright

9 years agoMerge commit 'a7b4e52766977b58c6b9899305e962a2b5235bda'
Artur Malabarba [Sun, 8 Mar 2015 00:17:26 +0000 (21:17 -0300)]
Merge commit 'a7b4e52766977b58c6b9899305e962a2b5235bda'

9 years agoRequire cl-lib
Artur Malabarba [Sun, 8 Mar 2015 00:17:05 +0000 (21:17 -0300)]
Require cl-lib

9 years agoAdd 'packages/spinner/' from commit '9477ee899d62259d4b946f243cdcdd9cdeb1e910'
Artur Malabarba [Sat, 7 Mar 2015 23:38:51 +0000 (20:38 -0300)]
Add 'packages/spinner/' from commit '9477ee899d62259d4b946f243cdcdd9cdeb1e910'

git-subtree-dir: packages/spinner
git-subtree-mainline: 5736e852fd48a0f1ba1c328dd4d03e3fa008a406
git-subtree-split: 9477ee899d62259d4b946f243cdcdd9cdeb1e910

9 years agoMerge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa
Artur Malabarba [Sat, 7 Mar 2015 23:37:45 +0000 (20:37 -0300)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa

9 years agoAdd url
Artur Malabarba [Sat, 7 Mar 2015 23:31:18 +0000 (20:31 -0300)]
Add url

9 years agoA couple more spinners
Artur Malabarba [Sat, 7 Mar 2015 23:03:49 +0000 (20:03 -0300)]
A couple more spinners

9 years agoADd gif
Artur Malabarba [Sat, 7 Mar 2015 22:54:22 +0000 (19:54 -0300)]
ADd gif

9 years agoWhitespace
Artur Malabarba [Sat, 7 Mar 2015 22:43:29 +0000 (19:43 -0300)]
Whitespace

9 years agoReadme
Artur Malabarba [Sat, 7 Mar 2015 22:43:24 +0000 (19:43 -0300)]
Readme

9 years agoHeadline
Artur Malabarba [Sat, 7 Mar 2015 22:27:31 +0000 (19:27 -0300)]
Headline

9 years agoCustomizable speed
Artur Malabarba [Sat, 7 Mar 2015 22:25:29 +0000 (19:25 -0300)]
Customizable speed

9 years agoAdd spinners
Artur Malabarba [Sat, 7 Mar 2015 22:25:13 +0000 (19:25 -0300)]
Add spinners

9 years agorainbow: fix font-lock-mode refresh
Julien Danjou [Fri, 6 Mar 2015 16:01:32 +0000 (17:01 +0100)]
rainbow: fix font-lock-mode refresh

9 years agoAdd file
Artur Malabarba [Fri, 6 Mar 2015 14:18:56 +0000 (11:18 -0300)]
Add file

9 years agoMerge commit 'e342c330807fdd09adba974611122d1c95bdf07d' from hydra
Oleh Krehel [Fri, 6 Mar 2015 12:58:08 +0000 (13:58 +0100)]
Merge commit 'e342c330807fdd09adba974611122d1c95bdf07d' from hydra

9 years agoInitial commit
Artur Malabarba [Fri, 6 Mar 2015 10:26:25 +0000 (07:26 -0300)]
Initial commit

9 years agohydra-ox.el: Emulate org-mode export dispatch
Oleh Krehel [Thu, 5 Mar 2015 20:29:50 +0000 (21:29 +0100)]
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.

9 years agoUpdate with a couple helm colors
Matthew Carter [Thu, 5 Mar 2015 03:01:01 +0000 (22:01 -0500)]
Update with a couple helm colors

9 years agoMerge commit 'e085a333867959a1b36015a3ad8e12e5bd6550d9' from company
Dmitry Gutov [Wed, 4 Mar 2015 17:01:20 +0000 (19:01 +0200)]
Merge commit 'e085a333867959a1b36015a3ad8e12e5bd6550d9' from company

9 years agocompany--merge-async: Handle mixed sync/async and immediate callbacks better
Dmitry Gutov [Wed, 4 Mar 2015 16:58:18 +0000 (18:58 +0200)]
company--merge-async: Handle mixed sync/async and immediate callbacks better

Fixes #315

9 years agoAllow for a %s(test) spec in docstring
Oleh Krehel [Wed, 4 Mar 2015 16:34:42 +0000 (17:34 +0100)]
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.

9 years agolv.el (lv-window): Bind `golden-ratio-mode' to nil
Oleh Krehel [Wed, 4 Mar 2015 14:37:14 +0000 (15:37 +0100)]
lv.el (lv-window): Bind `golden-ratio-mode' to nil

Re #64.

9 years agoAdd :timeout option to hydra body
Oleh Krehel [Mon, 2 Mar 2015 20:47:50 +0000 (21:47 +0100)]
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.

9 years ago* timerfunctions.el: Numerous fixes to make it comply with checkdoc
Dave Goel [Mon, 2 Mar 2015 18:58:42 +0000 (13:58 -0500)]
* timerfunctions.el: Numerous fixes to make it comply with checkdoc

Fix compiler warnings.

9 years agoloc-changes/loc-changes.el: Fix footer
Stefan Monnier [Sun, 1 Mar 2015 16:31:45 +0000 (11:31 -0500)]
loc-changes/loc-changes.el: Fix footer

9 years agohydra.el (hydra--format): Amend key regex
hura [Sat, 28 Feb 2015 01:01:57 +0000 (20:01 -0500)]
hydra.el (hydra--format): Amend key regex

Recognize the '{' and '}' keys.

9 years agoAdd 'packages/loc-changes/' from commit 'efbe022eaeef0ccc54ffe219216974a786c3301c'
rocky [Fri, 27 Feb 2015 23:28:08 +0000 (18:28 -0500)]
Add 'packages/loc-changes/' from commit 'efbe022eaeef0ccc54ffe219216974a786c3301c'

git-subtree-dir: packages/loc-changes
git-subtree-mainline: 771168c071a65dde3d55c320381419917be3aaff
git-subtree-split: efbe022eaeef0ccc54ffe219216974a786c3301c

9 years agoAdd loc-changes:alist-describe to show what marks have been set.
rocky [Fri, 27 Feb 2015 20:52:39 +0000 (15:52 -0500)]
Add loc-changes:alist-describe to show what marks have been set.

9 years agoDon't wrap `hydra-repeat'
Oleh Krehel [Fri, 27 Feb 2015 19:32:09 +0000 (20:32 +0100)]
Don't wrap `hydra-repeat'

* hydra.el (hydra--delete-duplicates): Update.
(hydra--vconcat): Trim trailing spaces.

* hydra-test.el (hydra-red-error): Update test.
(hydra--table): Update test.

9 years agoGo over travis testing.
rocky [Fri, 27 Feb 2015 18:54:19 +0000 (13:54 -0500)]
Go over travis testing.

9 years agoRevise for FSF release
rocky [Fri, 27 Feb 2015 18:11:28 +0000 (13:11 -0500)]
Revise for FSF release

9 years agoAdd some features for generating tables
Oleh Krehel [Fri, 27 Feb 2015 18:05:43 +0000 (19:05 +0100)]
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.

9 years agoAdd `hydra-repeat': hydra-specific `repeat'
Oleh Krehel [Fri, 27 Feb 2015 12:15:13 +0000 (13:15 +0100)]
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.

9 years agohydra.el (hydra--format): Amend key regex
François Févotte [Thu, 26 Feb 2015 15:43:34 +0000 (11:43 -0400)]
hydra.el (hydra--format): Amend key regex

Recognize the '=' key.

9 years ago* load-relative/test/test-file.el: Fix up copyright
Stefan Monnier [Wed, 25 Feb 2015 17:31:03 +0000 (12:31 -0500)]
* load-relative/test/test-file.el: Fix up copyright

9 years agohydra.el (hydra-key-format-spec): set default to "%s"
Oleh Krehel [Wed, 25 Feb 2015 15:56:19 +0000 (16:56 +0100)]
hydra.el (hydra-key-format-spec): set default to "%s"

* hydra-test.el (hydra-format): Update test.
(hydra-format-with-sexp): Update test.

9 years agohydra.el (hydra--format): Amend key regex
Oleh Krehel [Wed, 25 Feb 2015 10:37:58 +0000 (11:37 +0100)]
hydra.el (hydra--format): Amend key regex

Re #50.

9 years agoMerge commit '0e1d1440e4819d76cc68b213431722884af66e89'
rocky [Wed, 25 Feb 2015 01:24:48 +0000 (20:24 -0500)]
Merge commit '0e1d1440e4819d76cc68b213431722884af66e89'

9 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa
rocky [Wed, 25 Feb 2015 01:22:49 +0000 (20:22 -0500)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa

9 years agoBump version number
rocky [Wed, 25 Feb 2015 01:22:16 +0000 (20:22 -0500)]
Bump version number

9 years agoThank you, Phil Lord!
rocky [Wed, 25 Feb 2015 01:21:53 +0000 (20:21 -0500)]
Thank you, Phil Lord!

9 years agoRemove hydra-exit
Oleh Krehel [Tue, 24 Feb 2015 18:20:46 +0000 (19:20 +0100)]
Remove hydra-exit

* hydra-test.el: Revert tests.

* hydra.el (hydra-exit): Delete, since `hydra-exit' doesn't run :post.
(hydra--delete-duplicates): Simplify.
(defhydra): Simplify.

Hydras with nil body will still not be bound in outside keymaps.

Re #48
Fixes #53

9 years agolv.el (lv-window): set-window-parameter 'no-other-window
Oleh Krehel [Tue, 24 Feb 2015 17:34:11 +0000 (18:34 +0100)]
lv.el (lv-window): set-window-parameter 'no-other-window

9 years agoDon't bind nil heads in outside keymaps
Oleh Krehel [Tue, 24 Feb 2015 14:50:49 +0000 (15:50 +0100)]
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.

9 years agoImprove handling of heads with duplicate cmd
Oleh Krehel [Tue, 24 Feb 2015 14:31:46 +0000 (15:31 +0100)]
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.

9 years agoAmend the key regex in docstring to include <>
Oleh Krehel [Tue, 24 Feb 2015 11:02:27 +0000 (12:02 +0100)]
Amend the key regex in docstring to include <>

Re #50.

9 years agoSimplify the hint part of each head
Oleh Krehel [Tue, 24 Feb 2015 10:42:00 +0000 (11:42 +0100)]
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.

9 years agoAllow for a custom key format spec in docstrings
Oleh Krehel [Mon, 23 Feb 2015 22:03:13 +0000 (23:03 +0100)]
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.

9 years agoRename compat toggle - :nonheads -> :foreign-keys
Oleh Krehel [Mon, 23 Feb 2015 17:40:12 +0000 (18:40 +0100)]
Rename compat toggle - :nonheads -> :foreign-keys

* hydra-test.el: Add tests.

* hydra.el (hydra--head-color): Update.
(hydra--body-foreign-keys): New defun.
(hydra--body-color): Update.
(hydra--handle-nonhead): Update.

* README.md: Update.

9 years agohydra.el (hydra-verbose): New defcustom
Oleh Krehel [Mon, 23 Feb 2015 15:45:45 +0000 (16:45 +0100)]
hydra.el (hydra-verbose): New defcustom

* hydra.el (hydra--head-color): Switch from `error' to `hydra--complain'
  in one case.
(hydra--complain): New defun.

Fixes #47.

9 years agohydra.el (hydra--make-defun): Update signature
Oleh Krehel [Mon, 23 Feb 2015 14:46:48 +0000 (15:46 +0100)]
hydra.el (hydra--make-defun): Update signature

9 years agoAvoid generating multiple defuns with same name
Oleh Krehel [Mon, 23 Feb 2015 14:12:17 +0000 (15:12 +0100)]
Avoid generating multiple defuns with same name

* hydra.el (hydra--head-name): New defun.
(hydra--delete-duplicates): New defun.
(defhydra): Update to use `hydra--delete-duplicates' and `hydra--head-name'.

9 years agohydra.el (hydra-keyboard-quit): Add
Oleh Krehel [Mon, 23 Feb 2015 13:50:25 +0000 (14:50 +0100)]
hydra.el (hydra-keyboard-quit): Add

* hydra.el (hydra--handle-nonhead): Use `hydra-keyboard-quit'.
(defhydra): Work-around multiple definitions.

* hydra-test.el (hydra-red-error): Update test.
(hydra-blue-toggle): Update test.

9 years agoFix :exit t / :exit nil inheritance issue
Oleh Krehel [Mon, 23 Feb 2015 10:54:29 +0000 (11:54 +0100)]
Fix :exit t / :exit nil inheritance issue

* hydra-test.el (hydra-compat-colors): Add test.

* hydra.el (hydra--aggregate-color): New defun.
(hydra--head-color): Update.

Fixes #46.

9 years agoUpdate README.md
hura [Sun, 22 Feb 2015 20:14:26 +0000 (15:14 -0500)]
Update README.md

9 years agoMerge pull request #5 from phillord/feature/find-file-relative
R. Bernstein [Sat, 21 Feb 2015 21:45:29 +0000 (16:45 -0500)]
Merge pull request #5 from phillord/feature/find-file-relative

Change require to path relative load. Many thanks. I appreciate all of the good work.

9 years agoCommentary updates for new functions.
Phillip Lord [Sat, 21 Feb 2015 21:37:57 +0000 (21:37 +0000)]
Commentary updates for new functions.

9 years agoAdd :body-pre switch
Oleh Krehel [Sat, 21 Feb 2015 16:44:34 +0000 (17:44 +0100)]
Add :body-pre switch

It will be run as the first thing in the prefix/body function.

re #41

Example:

    (defvar hydra-vi/init-pos nil)
    (defhydra hydra-vi (:body-pre (setq hydra-vi/init-pos (point))
                        :color pink)
      "vi"
      ;; arrows
      ("h" backward-char)
      ("j" next-line)
      ("k" previous-line)
      ("l" forward-char)
      ;; exit points
      ("q" (goto-char hydra-vi/init-pos) "ins" :exit t)
      ("C-n" (forward-line 1) nil :exit t)
      ("C-p" (forward-line -1) nil :exit t))

9 years agohydra-examples.el: Add example 9
Oleh Krehel [Sat, 21 Feb 2015 16:43:40 +0000 (17:43 +0100)]
hydra-examples.el: Add example 9

9 years agoChange require to path relative load.
Phillip Lord [Sat, 21 Feb 2015 13:16:45 +0000 (13:16 +0000)]
Change require to path relative load.

9 years agoAllow sexps in Ruby-style docstrings
Oleh Krehel [Sat, 21 Feb 2015 10:15:16 +0000 (11:15 +0100)]
Allow sexps in Ruby-style docstrings

* hydra.el (hydra--format): Improve. No error handling or checking yet,
  but should work fine if the docstring is correct.

* hydra-test.el (hydra-format-with-sexp): Add test.

Fixes #42.

9 years agohydra-test.el (hydra-format): New test
Oleh Krehel [Sat, 21 Feb 2015 09:33:14 +0000 (10:33 +0100)]
hydra-test.el (hydra-format): New test

* hydra.el (hydra-fontify-head-greyscale): New defun. Usable as
  `hydra-fontify-head-function'.

9 years agohydra.el (hydra--handle-nonhead): Update signature
Oleh Krehel [Sat, 21 Feb 2015 09:21:06 +0000 (10:21 +0100)]
hydra.el (hydra--handle-nonhead): Update signature

* hydra.el (hydra--format): Update docstring.
(hydra-pink-fallback): Add docstring.
(defhydra): Update call to `hydra--handle-nonhead'.

9 years agoFix pink and teal Hydras running :post
Oleh Krehel [Fri, 20 Feb 2015 17:35:04 +0000 (18:35 +0100)]
Fix pink and teal Hydras running :post

* hydra.el (hydra--make-defun): Update.

9 years agohydra.el (hydra--handle-nonhead): Fix bug
Oleh Krehel [Fri, 20 Feb 2015 17:17:26 +0000 (18:17 +0100)]
hydra.el (hydra--handle-nonhead): Fix bug

9 years agohydra.el: remove no :pre, :post restriction for Emacs<24.4
Oleh Krehel [Fri, 20 Feb 2015 17:16:52 +0000 (18:16 +0100)]
hydra.el: remove no :pre, :post restriction for Emacs<24.4

9 years agoImprove compatibility for Emacs <= 24.3
Oleh Krehel [Fri, 20 Feb 2015 16:51:52 +0000 (17:51 +0100)]
Improve compatibility for Emacs <= 24.3

* hydra.el (hydra-set-transient-map): Always take 3 arguments.
(hydra--pred): New defun.
(hydra-disable): Update, `overriding-terminal-local-map' is actually
also bound in 24.3.

Fixes #29

9 years agoAdd an option to fontify heads in a custom way
Oleh Krehel [Fri, 20 Feb 2015 14:41:32 +0000 (15:41 +0100)]
Add an option to fontify heads in a custom way

* hydra.el (hydra--hint): Forward to `hydra-fontify-head'.
(hydra-fontify-head-function): New defvar.
(hydra-fontify-head-default): New defun that represents the classic
fontification behavior.
(hydra-fontify-head): Fontification dispatch - use
`hydra-fontify-head-default'
unless `hydra-fontify-head-function' is set.
(hydra--format): Forward to `hydra-fontify-head'.

Example:

    (setq hydra-fontify-head-function
          (lambda (head body)
            (let ((color (hydra--head-color head body)))
              (format
               (if (eq color 'blue)
                   "[%s]"
                 "{%s}") (car head)))))

Call `defhydra' here, then reset:

    (setq hydra-fontify-head-function nil)

Call another `defhydra' here.

9 years agoAdd example for `Buffer-menu-mode'
Oleh Krehel [Fri, 20 Feb 2015 13:18:21 +0000 (14:18 +0100)]
Add example for `Buffer-menu-mode'

9 years agoIntercept quit signals
Oleh Krehel [Fri, 20 Feb 2015 13:09:41 +0000 (14:09 +0100)]
Intercept quit signals

* hydra.el (hydra--format): Make keys wider.
(hydra--make-defun): Catch quit.
(hydra-pink-fallback): Catch quit.

* hydra-test.el: Update tests.

9 years agoAllow `format'-style width specifiers in docstring
Oleh Krehel [Fri, 20 Feb 2015 10:24:54 +0000 (11:24 +0100)]
Allow `format'-style width specifiers in docstring

* hydra.el (hydra--hint): Process less data.
(hydra--format): Change to add `format'-style width specifiers.

Example:

(defhydra hydra-toggle (:color pink)
  "
_a_ abbrev-mode:    % 4`abbrev-mode^^^^     _f_ auto-fill-mode:    %`auto-fill-function
_d_ debug-on-error: % 4`debug-on-error^     _t_ truncate-lines:    %`truncate-lines
_w_ whitespace-mode:% 4`whitespace-mode     _g_ golden-ratio-mode: %`golden-ratio-mode
"
  ("a" abbrev-mode nil)
  ("d" toggle-debug-on-error nil)
  ("f" auto-fill-mode nil)
  ("g" golden-ratio-mode nil)
  ("t" toggle-truncate-lines nil)
  ("w" whitespace-mode nil)
  ("q" nil "quit"))

Here, ^^^ represent empty characters used to compensate for the fact
that the lengths of variable symbols are different.
You can choose not to use them. The result will be the same, but your
code will look misaligned.

Fixes #39.

9 years agohydra.el (hydra-add-font-lock): Add `defhydradio'
Oleh Krehel [Fri, 20 Feb 2015 09:40:22 +0000 (10:40 +0100)]
hydra.el (hydra-add-font-lock): Add `defhydradio'

9 years agoMerge pull request #4 from phillord/feature/find-file-relative
R. Bernstein [Thu, 19 Feb 2015 21:31:58 +0000 (16:31 -0500)]
Merge pull request #4 from phillord/feature/find-file-relative

with-relative-file is now idempotent and tests!

9 years agohydra.el (hydra--head-color): Improve
Oleh Krehel [Thu, 19 Feb 2015 21:23:14 +0000 (22:23 +0100)]
hydra.el (hydra--head-color): Improve

* hydra.el (hydra--face): Second arg should be BODY.
(hydra--head-color): Second arg should be BODY.

9 years agowith-relative-file is now idempotent and tests!
Phillip Lord [Thu, 19 Feb 2015 21:06:58 +0000 (21:06 +0000)]
with-relative-file is now idempotent and tests!

The first version of with-relative-file left a new buffer around, unless
the file was already open, in which case the existing buffer would be
changed. It was all very stateful and this was not very fixable. This
version uses with-temp-buffer instead, so leaves Emacs as it found it.
This does remove the ability to save to the file from within this
buffer.

9 years agoREADME.md: fix tables
Oleh Krehel [Thu, 19 Feb 2015 20:53:32 +0000 (21:53 +0100)]
README.md: fix tables

9 years agoAdd compat color-less syntax
Oleh Krehel [Thu, 19 Feb 2015 20:45:01 +0000 (21:45 +0100)]
Add compat color-less syntax

* hydra.el (hydra--head-color): Adapt compat switches.
(hydra--body-color): Adapt compat switches.
(hydra--handle-nonhead): Move verbatim from `defhydra'.
(defhydra): Move verbatim to `hydra--handle-nonhead'.

* README.md: Update with two tables.

* hydra-test.el: Add compat tests.

New compat switches are:

- ":exit t" for ":color blue"
- ":nonheads warn" for ":color amaranth"
- ":nonheads warn :exit t" for ":color teal"
- ":nonheads run" for ":color pink"

See the compat tests to get the intuition of how both ways translate
between each other.

Fixes #27.

9 years agoGenerate a global resetter in `defhydradio'
Oleh Krehel [Thu, 19 Feb 2015 17:45:46 +0000 (18:45 +0100)]
Generate a global resetter in `defhydradio'

* hydra.el (defhydradio): `NAME/reset-radios' will be generated.
(hydra--quote-maybe): Don't quote nil.

* hydra-test.el: Update test.

9 years agohydra.el (defhydra): Fix typo
Oleh Krehel [Thu, 19 Feb 2015 17:29:12 +0000 (18:29 +0100)]
hydra.el (defhydra): Fix typo

Re #38

9 years agohydra.el (hydra-pink-fallback): Add
Oleh Krehel [Thu, 19 Feb 2015 17:13:11 +0000 (18:13 +0100)]
hydra.el (hydra-pink-fallback): Add

* hydra.el (defhydra): More advanced handling of the pink fallback.

Re #38.

9 years agoFix typos
Oleh Krehel [Thu, 19 Feb 2015 16:51:12 +0000 (17:51 +0100)]
Fix typos

* hydra.el (defhydra): Fix A/An and "aboring".

9 years agohydra-examples.el: Add example 7
Oleh Krehel [Thu, 19 Feb 2015 15:49:15 +0000 (16:49 +0100)]
hydra-examples.el: Add example 7

9 years agohydra.el (hydra--hint): Add exception
Oleh Krehel [Thu, 19 Feb 2015 15:48:31 +0000 (16:48 +0100)]
hydra.el (hydra--hint): Add exception

* hydra.el (hydra--hint): Don't add semicolon to docstrings that start
  with a newline.

9 years agohydra.el (hydra--head-color): fix for teal color
Oleh Krehel [Thu, 19 Feb 2015 15:06:48 +0000 (16:06 +0100)]
hydra.el (hydra--head-color): fix for teal color

9 years ago* jgraph-mode.el (jgraph-mode): Fix strings.
Stefan Monnier [Thu, 19 Feb 2015 14:57:38 +0000 (09:57 -0500)]
* jgraph-mode.el (jgraph-mode): Fix strings.

Fixes: debbugs:19898
(jgraph--syntax-end-of-string, jgraph--syntax-propertize): New functions.

9 years agoAdd teal body color
Oleh Krehel [Thu, 19 Feb 2015 14:56:17 +0000 (15:56 +0100)]
Add teal body color

* hydra.el (hydra-face-teal): New face.
(hydra--face): Update.
(defhydra): Teal color is the same as amaranth, except the heas inherit
blue instead of red.

This Hydra can reasonably be either blue or teal:

    (global-set-key
       (kbd "C-c C-v")
       (defhydra hydra-toggle (:color teal)
         "toggle"
         ("a" abbrev-mode "abbrev")
         ("d" toggle-debug-on-error "debug")
         ("f" auto-fill-mode "fill")
         ("t" toggle-truncate-lines "truncate")
         ("w" whitespace-mode "whitespace")
         ("q" nil "cancel")))

9 years agohydra.el (hydra--hint): Take same arguments as `defhydra'
Oleh Krehel [Thu, 19 Feb 2015 14:50:50 +0000 (15:50 +0100)]
hydra.el (hydra--hint): Take same arguments as `defhydra'

9 years agoUpdate faces
Oleh Krehel [Thu, 19 Feb 2015 14:48:41 +0000 (15:48 +0100)]
Update faces

* hydra.el (hydra-face-red): Set default to actual color red.
(hydra-face-blue): Set default to actual color blue.
(hydra-face-amaranth): Explain better in the doc.
(hydra-face-pink): Explain better in the doc.

9 years agoMerge pull request #3 from phillord/feature/find-file-relative
R. Bernstein [Thu, 19 Feb 2015 14:19:40 +0000 (09:19 -0500)]
Merge pull request #3 from phillord/feature/find-file-relative

New functions for opening files.

9 years agohydra.el (hydra--hint): Take same arguments as `defhydra'
Oleh Krehel [Thu, 19 Feb 2015 14:15:01 +0000 (15:15 +0100)]
hydra.el (hydra--hint): Take same arguments as `defhydra'

9 years agohydra.el (hydra--message): Take same arguments as `defhydra'
Oleh Krehel [Thu, 19 Feb 2015 14:06:34 +0000 (15:06 +0100)]
hydra.el (hydra--message): Take same arguments as `defhydra'

9 years agoMinor refactoring
Oleh Krehel [Thu, 19 Feb 2015 14:02:11 +0000 (15:02 +0100)]
Minor refactoring

* hydra.el (hydra--head-color): Rename from `hydra--color'.
(hydra--body-color): New defun.
(hydra--message): First arg isn't pre-processed by `hydra--hint'.
(defhydra): Update call to `hydra-message'.

9 years agoAllow for Ruby-style Hydra docstrings
Oleh Krehel [Thu, 19 Feb 2015 13:19:18 +0000 (14:19 +0100)]
Allow for Ruby-style Hydra docstrings

* hydra.el (hydra--unalias-var): New defun.
(hydra--format): New defun.
(hydra--message): Use `hydra-format' instead of a static string.
Update signature.
(defhydra): Add a warning the pink Hydras can't yet handle unbound
prefix, e.g. "C-x". Update arguments given to `hydra--message'.

* hydra-test.el: Update tests, only hint functions were slightly
  affected.

Example of using the newfound functionality:

    (defhydra hydra-toggle (:color pink)
      "
    _a_ abbrev-mode:       %`abbrev-mode
    _d_ debug-on-error:    %`debug-on-error
    _f_ auto-fill-mode:    %`auto-fill-function
    _g_ golden-ratio-mode: %`golden-ratio-mode
    _t_ truncate-lines:    %`truncate-lines
    _w_ whitespace-mode:   %`whitespace-mode

    "
      ("a" abbrev-mode nil)
      ("d" toggle-debug-on-error nil)
      ("f" auto-fill-mode nil)
      ("g" golden-ratio-mode nil)
      ("t" toggle-truncate-lines nil)
      ("w" whitespace-mode nil)
      ("q" nil "cancel"))

    (global-set-key (kbd "C-c C-v") 'hydra-toggle/body)

Here, "Foo %`abbrev-mode" becomes equivelent to:
    (format "Foo %S" abbrev-mode).

And "_a_" becomes equivalent to:
    (propertize "a" 'face 'hydra-face-pink).

The hints for all heads except "q" have been set to nil, since their
equivalent is already displayed in the docstring.

9 years agoNew functions for opening files.
Phillip Lord [Thu, 19 Feb 2015 13:23:16 +0000 (13:23 +0000)]
New functions for opening files.

find-file-noselect-relative opens a file with a relative path.
with-relative-file is a macro that runs in a buffer created with the
contents of the file.