From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Heinz Tuechler Newsgroups: gmane.emacs.help Subject: Re: How to set outline-level in the first line? Date: Fri, 11 May 2007 01:38:53 +0100 Message-ID: <3.0.6.32.20070511013853.00b2eea0@pop.gmx.net> References: <3.0.6.32.20070506124012.00b35e18@pop.gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1178840402 13778 80.91.229.12 (10 May 2007 23:40:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 May 2007 23:40:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 11 01:40:01 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 1HmIEq-0004OB-Fw for geh-help-gnu-emacs@m.gmane.org; Fri, 11 May 2007 01:40:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HmIMA-0000vS-NE for geh-help-gnu-emacs@m.gmane.org; Thu, 10 May 2007 19:47:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HmILw-0000sZ-Qe for help-gnu-emacs@gnu.org; Thu, 10 May 2007 19:47:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HmILu-0000pb-AR for help-gnu-emacs@gnu.org; Thu, 10 May 2007 19:47:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HmILu-0000pX-3o for help-gnu-emacs@gnu.org; Thu, 10 May 2007 19:47:18 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HmIEX-0007uh-54 for help-gnu-emacs@gnu.org; Thu, 10 May 2007 19:39:41 -0400 Original-Received: (qmail invoked by alias); 10 May 2007 23:39:39 -0000 Original-Received: from d83-181-40-203.cust.tele2.at (HELO fsa) [83.181.40.203] by mail.gmx.net (mp049) with SMTP; 11 May 2007 01:39:39 +0200 X-Authenticated: #933343 X-Provags-ID: V01U2FsdGVkX1/jpaQDlvbjHSWi1ueFFeIv69ds46uQH3dJvu710u nVHcGcztwNS+yi X-Sender: 933343@pop.gmx.net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) In-Reply-To: <3.0.6.32.20070506124012.00b35e18@pop.gmx.net> X-Y-GMX-Trusted: 0 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:43866 Archived-At: 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 >