Respect the current input method for target chars

* avy.el (avy-goto-char):
(avy-goto-char-in-line):
(avy-goto-char-2):
(avy-goto-word-1):
(avy-goto-subword-1):
(avy-goto-char-timer): Update.

Fixes #76
This commit is contained in:
Oleh Krehel 2015-07-07 17:11:47 +02:00
parent eb28aeb40e
commit 36e4d145c8

16
avy.el
View File

@ -700,7 +700,7 @@ STYLE determines the leading char overlay style."
(defun avy-goto-char (char &optional arg) (defun avy-goto-char (char &optional arg)
"Jump to the currently visible CHAR. "Jump to the currently visible CHAR.
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: ") (interactive (list (read-char "char: " t)
current-prefix-arg)) current-prefix-arg))
(avy--with-avy-keys avy-goto-char (avy--with-avy-keys avy-goto-char
(avy--generic-jump (avy--generic-jump
@ -713,7 +713,7 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
;;;###autoload ;;;###autoload
(defun avy-goto-char-in-line (char) (defun avy-goto-char-in-line (char)
"Jump to the currently visible CHAR in the current line." "Jump to the currently visible CHAR in the current line."
(interactive (list (read-char "char: "))) (interactive (list (read-char "char: " t)))
(let ((avy-all-windows nil)) (let ((avy-all-windows nil))
(avy--with-avy-keys avy-goto-char (avy--with-avy-keys avy-goto-char
(avy--goto (avy--goto
@ -728,8 +728,8 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
(defun avy-goto-char-2 (char1 char2 &optional arg) (defun avy-goto-char-2 (char1 char2 &optional arg)
"Jump to the currently visible CHAR1 followed by CHAR2. "Jump to the currently visible CHAR1 followed by CHAR2.
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 1: ") (interactive (list (read-char "char 1: " t)
(read-char "char 2: ") (read-char "char 2: " t)
current-prefix-arg)) current-prefix-arg))
(avy--with-avy-keys avy-goto-char-2 (avy--with-avy-keys avy-goto-char-2
(avy--generic-jump (avy--generic-jump
@ -762,7 +762,7 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
(defun avy-goto-word-1 (char &optional arg) (defun avy-goto-word-1 (char &optional arg)
"Jump to the currently visible CHAR at a word start. "Jump to the currently visible CHAR at a word start.
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: ") (interactive (list (read-char "char: " t)
current-prefix-arg)) current-prefix-arg))
(avy--with-avy-keys avy-goto-word-1 (avy--with-avy-keys avy-goto-word-1
(let* ((str (string char)) (let* ((str (string char))
@ -812,7 +812,7 @@ should return true."
"Jump to the currently visible CHAR at a subword start. "Jump to the currently visible CHAR at a subword start.
The window scope is determined by `avy-all-windows' (ARG negates it). The window scope is determined by `avy-all-windows' (ARG negates it).
The case of CHAR is ignored." The case of CHAR is ignored."
(interactive (list (read-char "char: ") (interactive (list (read-char "char: " t)
current-prefix-arg)) current-prefix-arg))
(avy--with-avy-keys avy-goto-subword-1 (avy--with-avy-keys avy-goto-subword-1
(let ((char (downcase char))) (let ((char (downcase char)))
@ -934,8 +934,8 @@ ARG lines can be used."
"Read one or two consecutive chars and jump to the first one. "Read one or two consecutive chars and jump to the first one.
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 "P") (interactive "P")
(let ((c1 (read-char "char 1: ")) (let ((c1 (read-char "char 1: " t))
(c2 (read-char "char 2: " nil avy-timeout-seconds))) (c2 (read-char "char 2: " t avy-timeout-seconds)))
(avy--with-avy-keys avy-goto-char-timer (avy--with-avy-keys avy-goto-char-timer
(avy--generic-jump (avy--generic-jump
(regexp-quote (regexp-quote