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

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

Problems with outline-minor-mode


From: Laurence Finston
Subject: Problems with outline-minor-mode
Date: Sun, 18 Jul 2004 15:15:35 +0200 (MEST)

Hello,

The headings below are interpreted correctly in
plain-tex-mode + outline-minor-mode but incorrectly in
c-mode + outline-minor-mode and c++-mode + outline-minor-mode.

Does anyone have an explanation for this?

I've tried this using:

GNU Emacs 21.3.1 (i386-pc-linux-gnu, X toolkit) of 2003-10-31 on raven,
modified by Debian.

and

GNU Emacs 21.2.1 (i586-suse-linux, X toolkit, Xaw3d scroll bars) of 2002-10-16 
on D186


I'd like `/*\s-' to be recognized as a prefix, followed by a variable number of
dollar signs indicating the level of the heading.  However, the whitespace
characters are always counted in determining the heading level, so that
`/* $$ */' and `/*  $ */' are equivalent.

I've also tried to get the regular expression \s-*\*/ to be recognized
as the `outline-heading-end-regexp', but it hasn't worked, so that
`/* $' followed by whitespace and `\n' is a valid heading.
(I haven't tried this with GNU Emacs 21.2.1)

I've written a mode for use with
CWEB, but I've had to derive it from c-mode rather than c++-mode for this
reason.  Strangely enough, the headings work in my cweb-mode using
GNU Emacs 21.2.1.

Are the Emacs developers working on a CWEB-mode?  In Don Knuth's
_Digital Typesetting_ there's a photo caption that says so.  I'd like
to release the mode I've written as part of GNU 3DLDF, but if there's
going to be an official CWEB mode this probably wouldn't be a good idea,
or I'd have to change its name.

Thanks for your help.

Laurence Finston
GNU 3DLDF maintainer
http://www.gnu.org/software/3dldf/LDF.html

****************************************************************

(progn
  (plain-tex-mode)
  (outline-minor-mode t)
  (setq outline-regexp "/[ *$]+")
 )

(progn
  (c-mode)
  (outline-minor-mode t)
  (setq outline-regexp "/[ *$]+")
 )

(progn
 (plain-tex-mode)
 (outline-minor-mode t)
 (setq outline-regexp "/[ *$]+")
)





;; Headings.


/* $ */

/* $$ */

/* $$ */

/* $$$ */

/* $$ */

/* $ */

/* $$ */

/* $$$ */

/* $$$ */

/* $$$$ */

/* $$$ */







reply via email to

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