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: function-key-map Date: Wed, 10 Oct 2007 10:31:30 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192026754 30190 80.91.229.12 (10 Oct 2007 14:32:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 14:32:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 16:32:33 2007 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 1IfcbO-0006gE-Od for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 16:31:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfcbI-00061o-Pk for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 10:31:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfcbE-00061Z-Vc for emacs-devel@gnu.org; Wed, 10 Oct 2007 10:31:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfcbB-00061N-KR for emacs-devel@gnu.org; Wed, 10 Oct 2007 10:31:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfcbB-00061K-Fa for emacs-devel@gnu.org; Wed, 10 Oct 2007 10:31:45 -0400 Original-Received: from tomts36.bellnexxia.net ([209.226.175.93] helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ifcb6-0004eu-Oe; Wed, 10 Oct 2007 10:31:40 -0400 Original-Received: from pastel.home ([70.55.141.81]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071010143131.VPJY7990.tomts36-srv.bellnexxia.net@pastel.home>; Wed, 10 Oct 2007 10:31:31 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 30D227F8E; Wed, 10 Oct 2007 10:31:30 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Wed\, 10 Oct 2007 09\:00\:58 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Solaris 8 (1) 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:80516 Archived-At: > Now that the original purpose of `function-key-map' is done > by `input-decode-map', what purposes should `function-key-map' > be used for? Is it still useful? Yes, it's still very useful. See for example how term/xterm.el uses both. Or term/x-win.el. I.e. it's useful to give optional remapping corresponding to alternative key-names. I think it'd even be worthwhile to extend the functionality of function-key-map in the following ways: - make it possible to specify a "set of keys" to remap via e.g. a predicate. - apply function-key-map repeatedly (i.e. apply it to its output). This way we could try and move all the ad-hoc C code in read-key-sequence which: - drops down-mouse-N events if they're not bound - remaps triple-mouse-N to double-mouse-N if not bound - remaps double-mouse-N to mouse-N if not bound - remaps shift- to if not bound - a few more along the same lines we could also add - remap all modifier combinations of mouse-4 to wheel-up (with the same modifiers), and similarly for wheel-down, wheel-left and wheel-right. This would significantly help clean up the horrendously long read_key_sequence function. Stefan