help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font-Locking for Allout Mode


From: Stephen Berman
Subject: Re: Font-Locking for Allout Mode
Date: Thu, 08 Mar 2007 17:06:40 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

On Thu, 08 Mar 2007 15:03:50 +0100 Tassilo Horn <tassilo@member.fsf.org> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]