From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Font-Locking for Allout Mode Date: Thu, 08 Mar 2007 17:06:40 +0100 Message-ID: <87zm6nu3cf.fsf@escher.local.home> References: <87mz2o3jib.fsf@baldur.tsdh.de> <877itrn86x.fsf@baldur.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173370047 15129 80.91.229.12 (8 Mar 2007 16:07:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2007 16:07:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 08 17:07:17 2007 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 1HPL96-00087S-LQ for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Mar 2007 17:07:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPL9K-0006Q1-2H for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Mar 2007 11:07:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HPL96-0006Pp-47 for help-gnu-emacs@gnu.org; Thu, 08 Mar 2007 11:07:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HPL95-0006Pc-LA for help-gnu-emacs@gnu.org; Thu, 08 Mar 2007 11:07:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPL95-0006PZ-Hp for help-gnu-emacs@gnu.org; Thu, 08 Mar 2007 11:07:11 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HPL8r-0001So-5H for help-gnu-emacs@gnu.org; Thu, 08 Mar 2007 11:06:57 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HPL8m-0007o2-Fq for help-gnu-emacs@gnu.org; Thu, 08 Mar 2007 17:06:52 +0100 Original-Received: from i577bcf4d.versanet.de ([87.123.207.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2007 17:06:52 +0100 Original-Received: from Stephen.Berman by i577bcf4d.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2007 17:06:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: i577bcf4d.versanet.de User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:41799 Archived-At: On Thu, 08 Mar 2007 15:03:50 +0100 Tassilo Horn wrote: > My local variable section looks like > > ,----[ ~/.emacs ] > | ;;Local variables: > | ;;allout-layout: 0 > | ;;End: > `---- > > If I add ";;mode: allout" the allout-layout won't be applied -- nothing > is collapsed/narrowed. And fontification of the headings isn't applied, > too. > >> If allout-mode isn't specified as a file local variable, then calling >> font-lock-fontify-buffer makes the fontification show up. > > Has no effect here. The fontification is still emacs lisp, but the > special allout headings are still fontified as normal comments. You cannot see the fontified allout headings in emacs lisp mode because the emacs lisp comment fontification overrides it. If you use allout with a text-mode file, then you'll see the fontification. I don't know if it's possible to see it in emacs lisp mode; perhaps by modifying font-locking of lisp comments to exclude lines beginning with `;;;_'. >> I don't know if this indicates a bug in that code. > > I don't get you here. Does that mean that you use a different code > snippet for allout fontification? If yes, could you post your working > snippet? I use the same code you do (I had also found it on emacswiki and modified it as you did). What I meant is that I don't know why it's necessary to add the file local variable for allout-mode (or alternatively, invoke font-lock-fontify-buffer) to see the fontification using that code, so maybe the code isn't quite right. > And could you test my snippet with your emacs? BTW, what version do you > use? It's 22.0.95 here, maybe it's a version specific thing... I'm using CVS Emacs 22.0.93.1 (i686-pc-linux-gnu, GTK+ Version 2.10.6) of 2007-02-08. BTW, when I add ";;mode: allout" to an the Local Variables section of an Emacs lisp file with an allout-layout specification, I still get the expected hiding, so it puzzles me that you don't. Did you eval (allout-init t) before visiting the file? Steve Berman