From 67189e62385af5b1e848d02528055958abbfe659 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 Mar 2010 18:02:53 +0300 Subject: [PATCH] * simple.el (keyboard-escape-quit): Raise deselecting the active region higher than exiting the minibuffer. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html --- lisp/ChangeLog | 6 ++++++ lisp/simple.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bdc40f44a2d..f7b3c7a1c2c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-03-31 Juri Linkov + + * simple.el (keyboard-escape-quit): Raise deselecting the active + region higher than exiting the minibuffer. + http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html + 2010-03-31 Juri Linkov * image.el (image-animated-p): Use `image-metadata' instead of diff --git a/lisp/simple.el b/lisp/simple.el index ea70e6cbd06..b126637904e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5490,12 +5490,12 @@ cancel the use of the current buffer (for special-purpose buffers), or go back to just one window (by deleting all but the selected window)." (interactive) (cond ((eq last-command 'mode-exited) nil) + ((region-active-p) + (deactivate-mark)) ((> (minibuffer-depth) 0) (abort-recursive-edit)) (current-prefix-arg nil) - ((region-active-p) - (deactivate-mark)) ((> (recursion-depth) 0) (exit-recursive-edit)) (buffer-quit-function -- 2.39.5