help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to prevent ESC from closing frames


From: Yuri Khan
Subject: Re: How to prevent ESC from closing frames
Date: Fri, 29 Aug 2014 10:47:04 +0700

On Thu, Aug 28, 2014 at 2:13 PM,  <address@hidden> wrote:
>
> Yes, emacs -Q has the same behaviour
>
> I wasn't very clear though. The frames close when pressing ESC three times in 
> a row.
> It's a habit of mine that is proving to be very inconvenient

You use the term “frame” but actually mean Emacs windows, that’s why
some other replies misunderstand you.


C-h k ESC ESC ESC

```
ESC ESC ESC (translated from <escape> <escape> <escape>) runs the
command keyboard-escape-quit, which is an interactive compiled Lisp
function in `simple.el'.

It is bound to M-ESC ESC.

(keyboard-escape-quit)

Exit the current "mode" (in a generalized sense of the word).
This command can exit an interactive command such as `query-replace',
can clear out a prefix argument or a region,
can get out of the minibuffer or other recursive edit,
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).**
```


I have looked at the source of this function and it does not check any
variables that could be used to control its features. So, no, you
can’t, at least not directly.

What you can do is to instead pick up the habit of pressing C-g to
cancel whatever you are doing, C-M-c to get out of recursive edit, and
the key you usually use to kill buffers for special-purpose buffers
too.

Or you can copy the source of keyboard-escape-quit, rename it to your
own name, delete the alternative that deals with deleting windows, and
bind your version to ESC ESC ESC.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]