[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a6db8a3 08/78: Rename avy--with-avy-keys to avy-with
From: |
Oleh Krehel |
Subject: |
[elpa] master a6db8a3 08/78: Rename avy--with-avy-keys to avy-with |
Date: |
Sat, 23 Jan 2016 13:59:38 +0000 |
branch: master
commit a6db8a35062576b0fcbb4a4fd238b999de19fba5
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Rename avy--with-avy-keys to avy-with
* avy.el (avy-with): Macro renamed from `avy--with-avy-keys'.
(avy--with-avy-keys): Add obsolete alias.
---
avy.el | 43 +++++++++++++++++++++++--------------------
1 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/avy.el b/avy.el
index 2470d1b..24234c0 100644
--- a/avy.el
+++ b/avy.el
@@ -431,8 +431,9 @@ multiple DISPLAY-FN invokations."
(unless (memq major-mode avy-ignored-modes)
,@body)))))
-(defmacro avy--with-avy-keys (command &rest body)
- "Set `avy-keys' according to COMMAND and execute BODY."
+(defmacro avy-with (command &rest body)
+ "Set `avy-keys' according to COMMAND and execute BODY.
+Set `avy-style' according to COMMMAND as well."
(declare (indent 1)
(debug (form body)))
`(let ((avy-keys (or (cdr (assq ',command avy-keys-alist))
@@ -470,11 +471,6 @@ multiple DISPLAY-FN invokations."
(kill-region pt (point))
(message "Killed: %s" (current-kill 0)))
-(define-obsolete-function-alias
- 'avy--goto 'identity "0.3.0"
- "Don't use this function any more.
-`avy--process' will do the jump all by itself.")
-
(defun avy--process (candidates overlay-fn)
"Select one of CANDIDATES using `avy-read'.
Use OVERLAY-FN to visualize the decision overlay."
@@ -779,7 +775,7 @@ STYLE determines the leading char overlay style."
The window scope is determined by `avy-all-windows' (ARG negates it)."
(interactive (list (read-char "char: " t)
current-prefix-arg))
- (avy--with-avy-keys avy-goto-char
+ (avy-with avy-goto-char
(avy--generic-jump
(if (= 13 char)
"\n"
@@ -792,7 +788,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
"Jump to the currently visible CHAR in the current line."
(interactive (list (read-char "char: " t)))
(let ((avy-all-windows nil))
- (avy--with-avy-keys avy-goto-char
+ (avy-with avy-goto-char
(avy--process
(save-restriction
(narrow-to-region (line-beginning-position)
@@ -807,7 +803,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(interactive (list (read-char "char 1: " t)
(read-char "char 2: " t)
current-prefix-arg))
- (avy--with-avy-keys avy-goto-char-2
+ (avy-with avy-goto-char-2
(avy--generic-jump
(regexp-quote (string char1 char2))
arg
@@ -817,7 +813,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(defun avy-isearch ()
"Jump to one of the current isearch candidates."
(interactive)
- (avy--with-avy-keys avy-isearch
+ (avy-with avy-isearch
(let ((avy-background nil))
(avy--process
(avy--regex-candidates isearch-string)
@@ -829,7 +825,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
"Jump to a word start.
The window scope is determined by `avy-all-windows' (ARG negates it)."
(interactive "P")
- (avy--with-avy-keys avy-goto-word-0
+ (avy-with avy-goto-word-0
(avy--generic-jump "\\b\\sw" arg avy-style)))
;;;###autoload
@@ -838,7 +834,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
The window scope is determined by `avy-all-windows' (ARG negates it)."
(interactive (list (read-char "char: " t)
current-prefix-arg))
- (avy--with-avy-keys avy-goto-word-1
+ (avy-with avy-goto-word-1
(let* ((str (string char))
(regex (cond ((string= str ".")
"\\.")
@@ -863,7 +859,7 @@ When PREDICATE is non-nil it's a function of zero
parameters that
should return true."
(interactive "P")
(require 'subword)
- (avy--with-avy-keys avy-goto-subword-0
+ (avy-with avy-goto-subword-0
(let ((case-fold-search nil)
candidates)
(avy-dowindows arg
@@ -887,7 +883,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it).
The case of CHAR is ignored."
(interactive (list (read-char "char: " t)
current-prefix-arg))
- (avy--with-avy-keys avy-goto-subword-1
+ (avy-with avy-goto-subword-1
(let ((char (downcase char)))
(avy-goto-subword-0
arg (lambda () (eq (downcase (char-after)) char))))))
@@ -928,7 +924,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
"Jump to a line start in current buffer.
The window scope is determined by `avy-all-windows' (ARG negates it)."
(interactive "P")
- (avy--with-avy-keys avy-goto-line
+ (avy-with avy-goto-line
(let ((avy-handler-function
(lambda (char)
(if (or (< char ?0)
@@ -949,7 +945,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
"Copy a selected line above the current line.
ARG lines can be used."
(interactive "p")
- (avy--with-avy-keys avy-copy-line
+ (avy-with avy-copy-line
(let ((start (avy--line)))
(move-beginning-of-line nil)
(save-excursion
@@ -967,7 +963,7 @@ ARG lines can be used."
"Move a selected line above the current line.
ARG lines can be used."
(interactive "p")
- (avy--with-avy-keys avy-move-line
+ (avy-with avy-move-line
(let ((start (avy--line)))
(move-beginning-of-line nil)
(save-excursion
@@ -981,7 +977,7 @@ ARG lines can be used."
(defun avy-copy-region ()
"Select two lines and copy the text between them here."
(interactive)
- (avy--with-avy-keys avy-copy-region
+ (avy-with avy-copy-region
(let ((beg (avy--line))
(end (avy--line))
(pad (if (bolp) "" "\n")))
@@ -1011,7 +1007,7 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(interactive "P")
(let ((c1 (read-char "char 1: " t))
(c2 (read-char "char 2: " t avy-timeout-seconds)))
- (avy--with-avy-keys avy-goto-char-timer
+ (avy-with avy-goto-char-timer
(avy--generic-jump
(regexp-quote
(if c2
@@ -1020,6 +1016,13 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
arg
avy-style))))
+(define-obsolete-function-alias
+ 'avy--goto 'identity "0.3.0"
+ "Don't use this function any more.
+`avy--process' will do the jump all by itself.")
+
+(define-obsolete-function-alias 'avy--with-avy-keys 'avy-with "0.3.0")
+
(provide 'avy)
;;; avy.el ends here
- [elpa] master 7928d11 05/78: Remove the old obsolete aliases, (continued)
- [elpa] master 7928d11 05/78: Remove the old obsolete aliases, Oleh Krehel, 2016/01/23
- [elpa] master 0cac589 04/78: Allow non-printing keys in avy-keys, Oleh Krehel, 2016/01/23
- [elpa] master 36e4d14 03/78: Respect the current input method for target chars, Oleh Krehel, 2016/01/23
- [elpa] master 465d5f2 07/78: Improve docstrings, Oleh Krehel, 2016/01/23
- [elpa] master 26123a7 10/78: avy.el (avy-goto-line): Fixup goto-line clause, Oleh Krehel, 2016/01/23
- [elpa] master 492ac49 11/78: avy.el (avy-pop-mark): Add, Oleh Krehel, 2016/01/23
- [elpa] master 3b9a60a 09/78: avy.el (avy-dispatch-alist): Upgrade to defcustom, Oleh Krehel, 2016/01/23
- [elpa] master d22493c 12/78: Autload avy-goto-word-or-subword-1, Oleh Krehel, 2016/01/23
- [elpa] master 1d1e4b6 06/78: Allow to switch action midway from goto to kill/mark/copy, Oleh Krehel, 2016/01/23
- [elpa] master 30067dd 14/78: avy.el (avy-action-goto): Don't push mark when region is active, Oleh Krehel, 2016/01/23
- [elpa] master a6db8a3 08/78: Rename avy--with-avy-keys to avy-with,
Oleh Krehel <=
- [elpa] master 1e578a1 15/78: Considers letter case only if given Upcase letter, Oleh Krehel, 2016/01/23
- [elpa] master e8cebf1 13/78: Make arg optional in avy-goto-subword-1, Oleh Krehel, 2016/01/23
- [elpa] master 36b296c 20/78: avy.el (subword-backward-regexp): Fix declaration, Oleh Krehel, 2016/01/23
- [elpa] master dbd2d20 17/78: avy.el (avy-pop-mark): Handle multiple frames, Oleh Krehel, 2016/01/23
- [elpa] master a86bdee6 16/78: avy.el (avy-pop-mark): use own history for points and windows, Oleh Krehel, 2016/01/23
- [elpa] master ed120ea 19/78: avy.el (avy-goto-line): Allow numeric prefix arg, Oleh Krehel, 2016/01/23
- [elpa] master 53d457c 18/78: Add misc punctuation to subword commands, Oleh Krehel, 2016/01/23
- [elpa] master 2c74d01 21/78: avy.el (avy--generic-jump): Add beg and end optional args, Oleh Krehel, 2016/01/23
- [elpa] master 009c0bc 22/78: avy.el (avy--line): Work for visual-line-mode, Oleh Krehel, 2016/01/23
- [elpa] master 53decea 24/78: avy.el (avy--line): Don't error on end of buffer, Oleh Krehel, 2016/01/23