From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Restoring Old Key Binding for eval-expression Date: Sat, 04 Jun 2016 12:23:41 +0300 Message-ID: <837fe5wbmq.fsf@gnu.org> References: <4ab84775-2381-44ab-a7fa-c87d0573331a@googlegroups.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1465032235 21622 80.91.229.3 (4 Jun 2016 09:23:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2016 09:23:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 04 11:23:47 2016 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 1b97o2-0007BX-OO for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 11:23:46 +0200 Original-Received: from localhost ([::1]:60077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b97o1-0003dn-TK for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 05:23:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b97nc-0003dI-1V for help-gnu-emacs@gnu.org; Sat, 04 Jun 2016 05:23:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b97nW-0003eN-1f for help-gnu-emacs@gnu.org; Sat, 04 Jun 2016 05:23:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b97nV-0003dL-Ud for help-gnu-emacs@gnu.org; Sat, 04 Jun 2016 05:23:13 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2370 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b97nU-0002bh-63 for help-gnu-emacs@gnu.org; Sat, 04 Jun 2016 05:23:12 -0400 In-reply-to: <4ab84775-2381-44ab-a7fa-c87d0573331a@googlegroups.com> (rwgpost@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:110295 Archived-At: > Date: Sun, 24 Apr 2016 13:06:56 -0700 (PDT) > From: rwgpost@gmail.com > > I am just starting to use a current version of Emacs that has eval-expression bound to M-:. I used to use eval-expression a lot and loved being able to just type Esc Esc to invoke eval-expression. Is there a way to restore this in my .emacs file? I've tried several things, like: > > (global-set-key "\M-ESC" 'eval-expression) > (global-set-key "\M-ESC" 'eval-expression) > (global-set-key "ESC-ESC" 'eval-expression) > > but I can't get any of these to work. M-: is unwieldy as I have to hit the Meta key, the colon, and the shift key all at the same time. > > I really miss Esc Esc, which used to work I guess because the old binding was M-Esc, and Esc-Esc did the same thing. This should get you off the ground: (global-set-key "\e\e" 'eval-expression) (For the future, you can find out answers to many such questions by looking at various key bindings in the Emacs sources.)