From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: jit-lock simplification? Date: Wed, 13 Sep 2006 15:31:21 +0200 Message-ID: <85u03bj3km.fsf@lola.goethe.zz> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158154315 8261 80.91.229.2 (13 Sep 2006 13:31:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Sep 2006 13:31:55 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 13 15:31:53 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNUq4-0004uI-5h for ged-emacs-devel@m.gmane.org; Wed, 13 Sep 2006 15:31:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNUq3-0008MG-LJ for ged-emacs-devel@m.gmane.org; Wed, 13 Sep 2006 09:31:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNUpp-0008K6-Mr for emacs-devel@gnu.org; Wed, 13 Sep 2006 09:31:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNUpn-0008IT-RW for emacs-devel@gnu.org; Wed, 13 Sep 2006 09:31:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNUpn-0008I6-Gu for emacs-devel@gnu.org; Wed, 13 Sep 2006 09:31:23 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNUrW-0001Mz-Db for emacs-devel@gnu.org; Wed, 13 Sep 2006 09:33:10 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GNUpl-0006D2-SV; Wed, 13 Sep 2006 09:31:22 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 6E8C41C40B5C; Wed, 13 Sep 2006 15:31:21 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Wed\, 13 Sep 2006 09\:03\:31 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59768 Archived-At: Stefan Monnier writes: >> I was debugging a timer problem, and noticed some very odd lambda >> forms in the timer-list. It turns out to be the lambda generated by >> the jit-lock code below. > >> Wouldn't it work just as well with the following patch? > > I see no reason why it shouldn't work as well. > I just find it less elegant ;-) Disagree. If `run-with-timer' has the possibility of passing values, that should be preferred over `lexical-let'. Whether one wants to use a named or an anonymous lambda function is, in contrast, more a matter of taste. If this were Scheme, using a closure would more or less be natural, but in Emacs Lisp, this is just ugly. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum