From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "spamfilteraccount@gmail.com" Newsgroups: gmane.emacs.help Subject: Re: State-machine based syntax highlighting Date: 7 Dec 2006 10:35:58 -0800 Organization: http://groups.google.com Message-ID: <1165516558.657188.21610@j44g2000cwa.googlegroups.com> References: <1165472049.496117.320630@79g2000cws.googlegroups.com> <1165488825.132862.189340@79g2000cws.googlegroups.com> <1165492567.864982.59980@79g2000cws.googlegroups.com> <1165495364.560960.271250@f1g2000cwa.googlegroups.com> <1165501630.172348.157180@j72g2000cwa.googlegroups.com> <1165502373.932709.15860@79g2000cws.googlegroups.com> <1165510932.276718.251220@73g2000cwn.googlegroups.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1165516826 812 80.91.229.10 (7 Dec 2006 18:40:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Dec 2006 18:40:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 07 19:40:24 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GsOAR-0007Gd-B3 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Dec 2006 19:40:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsOAQ-0005fP-Uq for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Dec 2006 13:40:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!j44g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 81.182.19.195 Original-X-Trace: posting.google.com 1165516564 18065 127.0.0.1 (7 Dec 2006 18:36:04 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 7 Dec 2006 18:36:04 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.01 (Windows NT 5.0; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j44g2000cwa.googlegroups.com; posting-host=81.182.19.195; posting-account=b98TkQ0AAAD7PsllN8gfWGRoPOPWdnv4 Original-Xref: shelby.stanford.edu gnu.emacs.help:143729 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39331 Archived-At: Stefan Monnier wrote: > > Actually, font-locking *is* implemented in C. The elisp part usually takes > a negligible amount of time. The problem start appearing when the > functionality of the C code is not sufficient and you start trying to parse > the code in elisp, which is slow. Good to know. I thought font-lock was implemented in elisp and didn't bother to check. BTW, I checked the situation in the enemy camp and seems they also have problems with performance: - The colors are wrong when scrolling bottom to top. Vim doesn't read the whole file to parse the text. It starts parsing wherever you are viewing the file. That saves a lot of time, but sometimes the colors are wrong. A simple fix is hitting CTRL-L. Or scroll back a bit and then forward again. For a real fix, see |:syn-sync|. Some syntax files have a way to make it look further back, see the help for the specific syntax file. For example, |tex.vim| for the TeX syntax. ... Displaying text in color takes a lot of effort. If you find the displaying too slow, you might want to disable syntax highlighting for a moment: :syntax clear When editing another file (or the same one) the colors will come back. http://vimdoc.sourceforge.net/htmldoc/usr_06.html