summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorketanaka <lego.sw@gmail.com>2017-04-11 21:09:29 +0900
committerOleh Krehel <ohwoeowho@gmail.com>2017-04-11 15:08:36 +0200
commitf2bedeeb5804a4863bb53aca6f77195f7d530c38 (patch)
tree6f51814dcfc0814a403ac9799c9316475b0386c9
parent105efc84827cb764cac1e1e3a793abf106837021 (diff)
Allow "C-h" to delete for avy-goto-char-timer
Fixes #193
-rw-r--r--avy.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/avy.el b/avy.el
index af4fe80..9c53ef4 100644
--- a/avy.el
+++ b/avy.el
@@ -1625,10 +1625,10 @@ saves the line(s) as if killed, but does not kill it(them)."
(defun avy--read-candidates ()
"Read as many chars as possible and return their occurences.
At least one char must be read, and then repeatedly one next char
-may be read if it is entered before `avy-timeout-seconds'. `DEL'
-deletes the last char entered, and `RET' exits with the currently
-read string immediately instead of waiting for another char for
-`avy-timeout-seconds'.
+may be read if it is entered before `avy-timeout-seconds'. `C-h'
+or `DEL' deletes the last char entered, and `RET' exits with the
+currently read string immediately instead of waiting for another
+char for `avy-timeout-seconds'.
The format of the result is the same as that of `avy--regex-candidates'.
This function obeys `avy-all-windows' setting."
(let ((str "") char break overlays regex)
@@ -1651,8 +1651,8 @@ This function obeys `avy-all-windows' setting."
;; Handle RET
((= char 13)
(setq break t))
- ;; Handle DEL
- ((= char 127)
+ ;; Handle C-h, DEL
+ ((memq char '(8 127))
(let ((l (length str)))
(when (>= l 1)
(setq str (substring str 0 (1- l))))))