branch: externals/avy
commit f34ff764aa89b724d3cdcdf651381432d917431f
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy.el (avy-escape-chars): Add defcustom
Re #249
---
avy.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/avy.el b/avy.el
index 2af14f5f1c..c7e59755e3 100644
--- a/avy.el
+++ b/avy.el
@@ -1,6 +1,6 @@
;;; avy.el --- Jump to arbitrary positions in visible text and select text
quickly. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
;; Author: Oleh Krehel <[email protected]>
;; URL: https://github.com/abo-abo/avy
@@ -255,6 +255,10 @@ character read. The default represents `C-h' and `DEL'.
See
`event-convert-list'."
:type 'list)
+(defcustom avy-escape-chars '(?\e ?\C-g)
+ "List of characters that quit avy during `read-char'."
+ :type 'list)
+
(defvar avy-ring (make-ring 20)
"Hold the window and point history.")
@@ -455,7 +459,7 @@ KEYS is the path from the root of `avy-tree' to LEAF."
(unless (eq avy-style 'words)
(setq avy-action (cdr dispatch)))
(throw 'done 'restart))
- ((memq char '(?\e ?\C-g))
+ ((memq char avy-escape-chars)
;; exit silently
(throw 'done 'abort))
((eq char ??)