From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: identifying meta-key bound functions from last-command-char? Date: Tue, 26 Feb 2008 21:10:56 -0500 Message-ID: References: <2cd46e7f0802251630h2cc2ae5di1d77ed3b87611416@mail.gmail.com> <2cd46e7f0802252228y62419e9aua1c5c629e023dd6d@mail.gmail.com> <2cd46e7f0802261457k5a8f291duf3c6641a29f0aa70@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204078275 9705 80.91.229.12 (27 Feb 2008 02:11:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2008 02:11:15 +0000 (UTC) Cc: Miles Bader , emacs-devel To: "Ken Manheimer" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 03:11:41 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUBlk-0000K5-En for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 03:11:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUBlE-0001ZV-Bu for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2008 21:11:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUBlA-0001Yb-3W for emacs-devel@gnu.org; Tue, 26 Feb 2008 21:11:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUBl7-0001Y1-MJ for emacs-devel@gnu.org; Tue, 26 Feb 2008 21:11:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUBl7-0001Xw-Bd for emacs-devel@gnu.org; Tue, 26 Feb 2008 21:11:01 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUBl3-0005UG-Nn; Tue, 26 Feb 2008 21:10:57 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAEZVxEdMCpz5Wmdsb2JhbACQXgEgnUF/ X-IronPort-AV: E=Sophos;i="4.25,410,1199682000"; d="scan'208";a="15100089" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 26 Feb 2008 21:10:57 -0500 Original-Received: from pastel.home ([76.10.156.249]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id HEL05057; Tue, 26 Feb 2008 21:10:57 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A4A7C7FA7; Tue, 26 Feb 2008 21:10:56 -0500 (EST) In-Reply-To: <2cd46e7f0802261457k5a8f291duf3c6641a29f0aa70@mail.gmail.com> (Ken Manheimer's message of "Tue, 26 Feb 2008 17:57:25 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90561 Archived-At: > as i see it, the purpose is not too obscure or unusual: deliberately > identifying a key binding for user-entered keys from within a handler > that's intervening in the command loop, eg, on pre-command-hook, > overlay modification-hooks, or something like that. last-command-char > / last-command-event is the only data structure i found for getting > the input, and the only details about using that are very brief, in > 21.4, _Information from the Command Loop_. So maybe you'd rather use (key-binding (this-command-keys-vector)) so it also works for commands bound to multi-key sequences. Stefan