From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Why js2-mode in Emacs 23.2? Date: Sun, 9 Aug 2009 20:46:39 -0400 Message-ID: <98AB9911-447B-45CA-811C-AB0659D897EE@merrillpress.com> References: <7b501d5c0908091634ndfba631vd9db6502db301097@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249865222 1516 80.91.229.12 (10 Aug 2009 00:47:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2009 00:47:02 +0000 (UTC) Cc: Emacs-Devel devel To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 10 02:46:55 2009 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 1MaJ2L-0007OU-0U for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2009 02:46:53 +0200 Original-Received: from localhost ([127.0.0.1]:52740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaJ2K-0000mE-AC for ged-emacs-devel@m.gmane.org; Sun, 09 Aug 2009 20:46:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaJ2F-0000lx-7X for emacs-devel@gnu.org; Sun, 09 Aug 2009 20:46:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaJ2A-0000kS-H0 for emacs-devel@gnu.org; Sun, 09 Aug 2009 20:46:46 -0400 Original-Received: from [199.232.76.173] (port=53302 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaJ2A-0000kP-8N for emacs-devel@gnu.org; Sun, 09 Aug 2009 20:46:42 -0400 Original-Received: from vpn.merrillpress.com ([64.61.107.78]:51839) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MaJ29-0007bL-LE for emacs-devel@gnu.org; Sun, 09 Aug 2009 20:46:41 -0400 Original-Received: from cpe-67-246-181-235.buffalo.res.rr.com ([67.246.181.235] helo=[192.168.1.103]) by mars.merrillpress.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1MaJ28-00038E-HL; Sun, 09 Aug 2009 20:46:40 -0400 In-Reply-To: X-Mailer: Apple Mail (2.936) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:113909 Archived-At: On Aug 9, 2009, at 8:17 PM, Lennart Borgman wrote: > Could not JIT-lock do a second pass? >> Is there another way to solve the problem? Can mumamo tell espresso >> to >> ignore certain parts of the buffer? > > Well, it does, but espresso kind of ignores that ... ;-) > > Just telling it where to scan will however not help since > espresso-mode will be called every time a user enters a chunk with > espresso-mode. A second pass when? The problem is that functions that have nothing to do with fontification operate improperly unless correct text properties are attached to certain bits of the buffer. Consider the regular expression /}/. syntactic-keywords are used to mark the whole expression as a string. If forward-sexp encounters that expression before the expression is marked as a string, then it'll interpret the '}' incorrectly. When the user actually enters a '}', we fontify it correctly. However, when we first start up, we need to fonyify the whole buffer so that we don't trip over one of these regular expressions if we look at it before jit-lock gets around to it. Can espresso just perform the regexp-marking scan 1) on only the region given to it by mumamo, and 2) only once, with some kind of indication given by mumamo of whether we're seen this particular chunk before? >> As for define-derived-mode: nope, espresso-mode doesn't use that. > > It is a minor change but will help keeping it upto date later. So just use define-derived-mode to inherit from fundamental-mode?