From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: sokobania.01@gmail.com Newsgroups: gmane.emacs.help Subject: Re: How to prevent ESC from closing frames Date: Fri, 29 Aug 2014 02:09:19 -0700 (PDT) Message-ID: <23c61674-1a93-4386-9184-55835542e2db@googlegroups.com> References: <1faefe17-1e70-4732-80a4-b6035e4dcfee@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409326763 8141 80.91.229.3 (29 Aug 2014 15:39:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Aug 2014 15:39:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 29 17:39:17 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XNOGf-0002CQ-OV for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Aug 2014 17:39:13 +0200 Original-Received: from localhost ([::1]:42643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNOGf-00039H-3p for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Aug 2014 11:39:13 -0400 X-Received: by 10.182.29.65 with SMTP id i1mr4910927obh.30.1409303359510; Fri, 29 Aug 2014 02:09:19 -0700 (PDT) X-Received: by 10.140.32.227 with SMTP id h90mr1843qgh.26.1409303359480; Fri, 29 Aug 2014 02:09:19 -0700 (PDT) Original-Path: usenet.stanford.edu!uq10no6654408igb.0!news-out.google.com!q8ni2qal.1!nntp.google.com!m5no4072635qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.39.33.67; posting-account=6AmU8QoAAABkSb2sbJisGlnlR_egh2hP Original-NNTP-Posting-Host: 213.39.33.67 User-Agent: G2/1.0 Injection-Date: Fri, 29 Aug 2014 09:09:19 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:207226 X-Mailman-Approved-At: Fri, 29 Aug 2014 11:38:55 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99515 Archived-At: Le vendredi 29 ao=FBt 2014 05:47:04 UTC+2, Yuri Khan a =E9crit : > On Thu, Aug 28, 2014 at 2:13 PM, abdo.haji.ali wrote: > ESC ESC ESC (translated from ) runs the > command keyboard-escape-quit, which is an interactive compiled Lisp > function in `simple.el'. >=20 > It is bound to M-ESC ESC. >=20 > (keyboard-escape-quit) >=20 > 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)= .** >=20 > 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. Well, the code of keyboard-escape-quit tests the variable buffer-quit-funct= ion. So something like the following could work...=20 (while at least keeping some of keyboard-escape-quit functionalities): (setq-default buffer-quit-function #'(lambda () (message "Are you trying to quit?"))) Or you might rebind ESC-ESC-ESC like this: (define-key global-map "\e\e\e" #'(lambda () (interactive) (message "Are you trying to quit?")))