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

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

Re: How to set outline-level in the first line?


From: Heinz Tuechler
Subject: Re: How to set outline-level in the first line?
Date: Fri, 11 May 2007 01:38:53 +0100

Dear All,

some days ago I sent the message below to the list. Until now, I did not
receive any answer.
I assume, this means, it is not possible to set outline-level as local
variable in the first line (except by eval:).
Could one of you experts confirm this opinion? I would be happy about some
yes/no answer.

Thanks,
Heinz

At 12:40 06.05.2007 +0100, Heinz Tuechler wrote:
>Dear All,
>
>To adapt outline-minor-mode to the comment form I use in R, I tried to
>adjust the outline-regexp and the outline-level.
>
>The outline-level should be:
>(setq outline-level (defun outline-level ()
>  "adjust outline-level to R-comments"  
>                     (interactive)
>                     (cond ((looking-at "#\\{5\\} ") 1)
>                           ((looking-at "#### ") 2)
>                           ((looking-at "### ") 3)
>                           ((looking-at "## ") 4)  
>                           (t 1000))))
>
>I tried to do this in the first line by something like 
>outline-level: (defun outline-level () (interactive) (cond ((looking-at
>"##### ") 1)((looking-at "#### ") 2)((looking-at "### ") 3)((looking-at "##
>") 4)  (t 1000)))
>but I did not find the right way.
>
>Only if I use eval: (setq outline-level ... it does what I want.
>
>So finally my first line looks as follows:
>-*- mode: text; mode:outline-minor; outline-regexp:"#\\{2,5\\} "; eval:
>(setq outline-level (defun outline-level () (interactive) (cond
>((looking-at "##### ") 1)((looking-at "#### ") 2)((looking-at "### ")
>3)((looking-at "## ") 4)  (t 1000)))) -*-
>
>What I would like to know is, how to set the outline-level without "eval:"?
>
>version information:
>GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600) of 2004-03-10 on NYAUMO
>
>Thanks,
>Heinz
>
>
>
>
>_______________________________________________
>help-gnu-emacs mailing list
>address@hidden
>http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>





reply via email to

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