From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sean O'Rourke Newsgroups: gmane.emacs.devel Subject: Re: A simple implementation of context-sensitive keys Date: Wed, 10 Sep 2008 07:14:21 -0700 Message-ID: References: <87y72079mg.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221056335 21081 80.91.229.12 (10 Sep 2008 14:18:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2008 14:18:55 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 10 16:19:47 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 1KdQUL-0008Pi-A3 for ged-emacs-devel@m.gmane.org; Wed, 10 Sep 2008 16:16:09 +0200 Original-Received: from localhost ([127.0.0.1]:50267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdQTK-0006kv-1r for ged-emacs-devel@m.gmane.org; Wed, 10 Sep 2008 10:15:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdQSw-0006YQ-CL for emacs-devel@gnu.org; Wed, 10 Sep 2008 10:14:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdQSt-0006W3-33 for emacs-devel@gnu.org; Wed, 10 Sep 2008 10:14:40 -0400 Original-Received: from [199.232.76.173] (port=43337 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdQSs-0006Vx-HJ for emacs-devel@gnu.org; Wed, 10 Sep 2008 10:14:38 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:40555 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KdQSs-0005cc-14 for emacs-devel@gnu.org; Wed, 10 Sep 2008 10:14:38 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KdQSp-0005Wj-HF for emacs-devel@gnu.org; Wed, 10 Sep 2008 14:14:35 +0000 Original-Received: from cpe-76-174-24-253.socal.res.rr.com ([76.174.24.253]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2008 14:14:35 +0000 Original-Received: from seano by cpe-76-174-24-253.socal.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2008 14:14:35 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 14 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cpe-76-174-24-253.socal.res.rr.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (darwin) Cancel-Lock: sha1:rumIpYoxoOY1hdb0J9LDLqlz3YQ= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:103765 Archived-At: Tassilo Horn writes: > But "good" keys are rare, and so I started writing special > dispatching commands which DTRT dependend on the context > they're used in. TextMate for Mac OS has a similar way of defining key bindings: basically, a major mode labels regions of a buffer's text, and keys can be bound to functions only within regions with certain labels. It's like font-lock for keys (IIRC, TextMate's fontification uses these same labels). I think it's a great idea, and would like to see some general mechanism for doing it included in Emacs. Sean