[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7783f89 27/28: Minor fixes
From: |
Oleh Krehel |
Subject: |
[elpa] master 7783f89 27/28: Minor fixes |
Date: |
Sun, 22 Mar 2015 16:34:49 +0000 |
branch: master
commit 7783f89cdbb3e3ba57f232552729715148e0b9a1
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Minor fixes
* hydra.el (hydra--format): Save match data.
(hydra--handle-nonhead): Don't quote lambda.
(hydra--cycle-radio): Use cl-incf.
---
hydra.el | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/hydra.el b/hydra.el
index 44d27ef..a3e8b9b 100644
--- a/hydra.el
+++ b/hydra.el
@@ -499,7 +499,8 @@ The expressions can be auto-expanded according to NAME."
((eq ?` (aref (match-string 2 docstring) 0))
(push (hydra--unalias-var
- (substring (match-string 2 docstring) 1) prefix) varlist)
+ (substring (match-string 2 docstring) 1) prefix)
+ varlist)
(setq docstring
(replace-match
(concat "%" (match-string 1 docstring) "S")
@@ -507,13 +508,14 @@ The expressions can be auto-expanded according to NAME."
(t
(let* ((spec (match-string 1 docstring))
- (lspec (length spec)))
+ (lspec (length spec))
+ (me2 (match-end 2)))
(setq offset
(with-temp-buffer
(insert (substring docstring (+ 1 start (length spec))))
(goto-char (point-min))
(push (read (current-buffer)) varlist)
- (point)))
+ (- (point) (point-min))))
(when (or (zerop lspec)
(/= (aref spec (1- (length spec))) ?s))
(setq spec (concat spec "S")))
@@ -521,8 +523,7 @@ The expressions can be auto-expanded according to NAME."
(concat
(substring docstring 0 start)
"%" spec
- (substring docstring
- (+ (match-end 2) offset -2))))))))
+ (substring docstring (+ me2 offset -1))))))))
(if (eq ?\n (aref docstring 0))
`(concat (format ,(substring docstring 1) ,@(nreverse varlist))
,rest)
@@ -662,8 +663,8 @@ NAME, BODY and HEADS are parameters to `defhydra'."
(when hydra-keyboard-quit
(define-key keymap hydra-keyboard-quit #'hydra-keyboard-quit)))
(when (memq body-color '(amaranth pink teal))
- (if (cl-some `(lambda (h)
- (memq (hydra--head-color h body) '(blue teal)))
+ (if (cl-some (lambda (h)
+ (memq (hydra--head-color h body) '(blue teal)))
heads)
(progn
(setcdr
@@ -1034,7 +1035,7 @@ DOC defaults to TOGGLE-NAME split and capitalized."
(while (< i l)
(if (equal (aref range i) val)
(throw 'done (1+ i))
- (incf i)))
+ (cl-incf i)))
(error "Val not in range for %S" sym)))
(set sym
(aref range
- [elpa] master 622c798 10/28: README.md: move some stuff to wiki, add more stuff, (continued)
- [elpa] master 622c798 10/28: README.md: move some stuff to wiki, add more stuff, Oleh Krehel, 2015/03/22
- [elpa] master 9f9dcf9 17/28: Bind [switch-frame] to `hydra-keyboard-quit', Oleh Krehel, 2015/03/22
- [elpa] master 543e97b 19/28: Fix switch-frame handling., Oleh Krehel, 2015/03/22
- [elpa] master 97d6987 21/28: Add hydra-rectangle example, Oleh Krehel, 2015/03/22
- [elpa] master bfe65da 15/28: README.md: Fix up typos, Oleh Krehel, 2015/03/22
- [elpa] master d44bf58 22/28: Don't bind `hydra-keyboard-quit' in foreign keymaps, Oleh Krehel, 2015/03/22
- [elpa] master eb181fd 23/28: Call :post for :timeout, Oleh Krehel, 2015/03/22
- [elpa] master 30a073b 25/28: hydra.el (hydra-keyboard-quit): Clean up the message area, Oleh Krehel, 2015/03/22
- [elpa] master 8e4b1fa 24/28: lv.el (lv-message): Use setq-local for window-min-height, Oleh Krehel, 2015/03/22
- [elpa] master 498d78b 26/28: Set pink/amaranth override recursively, Oleh Krehel, 2015/03/22
- [elpa] master 7783f89 27/28: Minor fixes,
Oleh Krehel <=
- [elpa] master a071b60 09/28: README.md: update, Oleh Krehel, 2015/03/22
- [elpa] master 5aa7896 28/28: Merge commit '7783f89cdbb3e3ba57f232552729715148e0b9a1' from hydra, Oleh Krehel, 2015/03/22