From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: cperl-mode and fontlock Date: Fri, 25 Sep 2009 10:08:50 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1253875317 13947 80.91.229.12 (25 Sep 2009 10:41:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2009 10:41:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 12:41:50 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mr8FG-0002L3-G5 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Sep 2009 12:41:47 +0200 Original-Received: from localhost ([127.0.0.1]:50672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mr8FF-0002db-IJ for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Sep 2009 06:41:45 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!newsfeed.esat.net!feeder.news.heanet.ie!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-X-Trace: news.eternal-september.org U2FsdGVkX19DCYi9nLrpDpdiVy+urzuWLBh/lHrzZuMBFng7uyYl3klpYsW+qw1fc2cFl2WInUfz0QZzJnui9dsVHw4KnQJH6cug7TCPzb/7jfHKibNGDNFLJqwwKixWiG12uHILXNM= Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Fri, 25 Sep 2009 10:08:50 +0000 (UTC) User-Agent: slrn/0.9.8.1pl1 (Linux) X-Auth-Sender: U2FsdGVkX1+u0FFlZgw5SuTMBx9eR0bP Cancel-Lock: sha1:33F8j62IuLODLqNKy6h5J+C1LyI= Original-Xref: news.stanford.edu gnu.emacs.help:173345 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:68464 Archived-At: On 2009-09-17, Harry Putnam wrote: > As I enter code... syn-hilite appears to be working just as expected > but as time wears on and some of the code scrolls off the screen, > Eventually when viewed later syn-hilite has disappeared in all but a > few items. > > Just scrolling code off visible area and back doesn't appear to do it > ... I'm not sure exactly what does. > > If I return to edit some already entered code that has lost its > syn-hilite, the hilite returns the instant I make any > modification. But then later I see its left again. > > Calling M-x `font-lock-fontify-buffer' does not seem to re-instate the > syntax highlight where it has already gone away either. ^^^^^ What is this "where"? Region of buffers, or buffers as a whole? Just 2 pieces of how I view similar problems: a) cperl-mode distributed with RMS Emacs is completely borken. See "my" versions; b) I think I have seen things similar to what you describe - about 5-7 years ago. IIRC, font-locking code is designed (?) to make things as hard to debug as possible. Everything is run inside try/catch blocks, and all error messages are thrown away. However, some problems accumulate; when too many are accumulated, font-locking stops working in the buffer - until you do something like M-x normal-mode, which would reset font-locking state. So the net result was that bugs in cperl-mode would be invisible until they damage font-lock internal state enough to stop it from working. (But this was long time ago, and THESE bugs are long gone...) Hope this helps, Ilya