unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stephen Berman <Stephen.Berman@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Font-Locking for Allout Mode
Date: Thu, 08 Mar 2007 17:06:40 +0100	[thread overview]
Message-ID: <87zm6nu3cf.fsf@escher.local.home> (raw)
In-Reply-To: 877itrn86x.fsf@baldur.tsdh.de

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	other threads:[~2007-03-08 16:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 20:07 Font-Locking for Allout Mode Tassilo Horn
2007-03-08 13:23 ` Stephen Berman
     [not found] ` <mailman.654.1173360249.7795.help-gnu-emacs@gnu.org>
2007-03-08 14:03   ` Tassilo Horn
2007-03-08 16:06     ` Stephen Berman [this message]
     [not found]     ` <mailman.663.1173370034.7795.help-gnu-emacs@gnu.org>
2007-03-08 16:42       ` Tassilo Horn
2007-03-08 22:38         ` Peter Dyballa
2007-03-08 22:45         ` Stephen Berman
     [not found]         ` <mailman.686.1173393546.7795.help-gnu-emacs@gnu.org>
2007-03-08 22:49           ` Tassilo Horn
     [not found]         ` <mailman.687.1173393945.7795.help-gnu-emacs@gnu.org>
2007-03-08 23:18           ` Tassilo Horn
2007-03-09 11:28             ` Stephen Berman
     [not found]             ` <mailman.704.1173439750.7795.help-gnu-emacs@gnu.org>
2007-03-09 14:27               ` Tassilo Horn
2007-03-09 16:50                 ` Stephen Berman
2007-03-11 15:07                   ` Stephen Berman
2007-03-09 20:36               ` Stefan Monnier
2007-03-09 21:44                 ` Tassilo Horn
2007-03-09 23:34                 ` Stephen Berman
2007-03-09 23:47                   ` Stephen Berman
2007-03-11 15:07                   ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zm6nu3cf.fsf@escher.local.home \
    --to=stephen.berman@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).