unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heinz Tuechler <tuechler@gmx.at>
To: help-gnu-emacs@gnu.org
Subject: Re: How to set outline-level in the first line?
Date: Fri, 11 May 2007 01:38:53 +0100	[thread overview]
Message-ID: <3.0.6.32.20070511013853.00b2eea0@pop.gmx.net> (raw)
In-Reply-To: <3.0.6.32.20070506124012.00b35e18@pop.gmx.net>

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
>help-gnu-emacs@gnu.org
>http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>

  reply	other threads:[~2007-05-11  0:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-06 11:40 How to set outline-level in the first line? Heinz Tuechler
2007-05-11  0:38 ` Heinz Tuechler [this message]
     [not found] <mailman.505.1178840842.32220.help-gnu-emacs@gnu.org>
2007-05-11  5:08 ` Stefan Monnier
2007-05-11  9:18   ` Heinz Tuechler
2007-05-20 13:07   ` Johan Bockgård
2007-06-09 23:58     ` Stefan Monnier

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=3.0.6.32.20070511013853.00b2eea0@pop.gmx.net \
    --to=tuechler@gmx.at \
    --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).