From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: the second most recent key Date: Thu, 26 Oct 2006 09:38:20 -0600 Organization: IHS Message-ID: References: <8A921A5AACA1A64F936C730FC1F817214691CF@zw67246c.societe.mma.fr> <200610251541.35643.help-gnu-emacs@vsbe.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161877236 14143 80.91.229.2 (26 Oct 2006 15:40:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2006 15:40:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 17:40:34 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gd7L9-0000XU-Hq for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Oct 2006 17:40:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gd7L8-0002wM-Vn for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Oct 2006 11:40:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gd7Kr-0002vZ-3b for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:40:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gd7Ko-0002v1-1o for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:40:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gd7Kn-0002uy-Sw for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:39:57 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gd7Kn-0008Ok-ND for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:39:58 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gd7KG-0000LS-4a for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 17:39:24 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Oct 2006 17:39:24 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Oct 2006 17:39:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 16 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) In-Reply-To: <200610251541.35643.help-gnu-emacs@vsbe.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38300 Archived-At: vb wrote: > Is there a way to know what was the key pressed immediately before the last > key pressed. > > Say there is a macro assigned to a certain key, and the function of this > certain key depends on the key pressed immediately before the function was > invoked. > > Is there a way to know what key that was? (let* ((recent-keys (recent-keys)) (keys-length (length recent-keys))) ; should be 100 (aref recent-keys (- keys-length (length (this-command-keys)) 1))) -- Kevin