diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2017-07-25 11:38:28 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2017-07-25 11:40:25 +0900 |
commit | 35954cb92b8cd4ad093756d171688343bab02c2e (patch) | |
tree | f38fd0afd1752e8968f64964b63578daa3146f8d /lisp/register.el | |
parent | 32daa3cb54523006c88717cbeac87964cd687a1b (diff) | |
download | emacs-35954cb92b8cd4ad093756d171688343bab02c2e.tar.gz |
register-read-with-preview: Quit if user input C-g or ESC
* lisp/register.el (register-read-with-preview):
Quit if user input C-g or ESC (bug#27634).
* doc/emacs/regs.texi (Registers): Update manual.
* test/lisp/register-tests.el (register-test-bug27634): Add test.
Diffstat (limited to 'lisp/register.el')
-rw-r--r-- | lisp/register.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/register.el b/lisp/register.el index 7cc3ccd870c..e395963f56a 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -164,6 +164,10 @@ display such a window regardless." help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) + (when (or (eq ?\C-g last-input-event) + (eq 'escape last-input-event) + (eq ?\C-\[ last-input-event)) + (keyboard-quit)) (if (characterp last-input-event) last-input-event (error "Non-character input-event"))) (and (timerp timer) (cancel-timer timer)) |