From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: A simple implementation of context-sensitive keys Date: Thu, 11 Sep 2008 10:48:32 +0200 Message-ID: <87bpyvjcf3.fsf@thinkpad.tsdh.de> References: <87y72079mg.fsf@thinkpad.tsdh.de> <87ljy012g7.fsf@catnip.gol.com> <87k5djjft7.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 1221123062 26299 80.91.229.12 (11 Sep 2008 08:51:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2008 08:51:02 +0000 (UTC) Cc: Sean O'Rourke , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 11 10:51:54 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 1Kdhu5-0000MJ-1n for ged-emacs-devel@m.gmane.org; Thu, 11 Sep 2008 10:51:53 +0200 Original-Received: from localhost ([127.0.0.1]:52651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdht4-0006Og-Ph for ged-emacs-devel@m.gmane.org; Thu, 11 Sep 2008 04:50:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kdht0-0006OW-2x for emacs-devel@gnu.org; Thu, 11 Sep 2008 04:50:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kdhsy-0006O8-II for emacs-devel@gnu.org; Thu, 11 Sep 2008 04:50:45 -0400 Original-Received: from [199.232.76.173] (port=36946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdhsy-0006O5-Bc for emacs-devel@gnu.org; Thu, 11 Sep 2008 04:50:44 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:24268) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kdhss-0001pH-H7; Thu, 11 Sep 2008 04:50:38 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id C664578004AF; Thu, 11 Sep 2008 10:50:37 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27789-03; Thu, 11 Sep 2008 10:50:35 +0200 (CEST) X-CHKRCPT: Envelopesender vrfy tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (dhcp188.uni-koblenz.de [141.26.71.188]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 38A3F78004A9; Thu, 11 Sep 2008 10:50:35 +0200 (CEST) Mail-Copies-To: never Mail-Followup-To: Miles Bader , "Sean O'Rourke" , emacs-devel@gnu.org In-Reply-To: (Miles Bader's message of "Thu, 11 Sep 2008 17:17:00 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de 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:103803 Archived-At: Miles Bader writes: Hi Miles, >> Hey, nice feature. I didn't know it till now. But how to I [re]set >> this property in a good fashion? Currently I think hooking into >> after-change-function would be TRTD. > > after-change-functions is a very blunt hammer, and overuse of it is > not good. I've thought that. > I suspect the right thing depends what you're actually trying to do at > the application level. In that sense, I'm not sure your attempt to > define a single do-everything function like `define-context-keymap' is > actually a very good idea; I agree, so... > in many cases it would seem simpler and more efficient to simply add > keymap properties in an application-dependent manner. ... I asked you for a good way to use the font-locking mechanics to add those properties. Currently I don't see how I can add only a keymap property with `font-lock-add-keywords'. Bye, Tassilo