[Top][All Lists]

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

Re: Problems with outline-minor-mode

From: Kevin Rodgers
Subject: Re: Problems with outline-minor-mode
Date: Mon, 19 Jul 2004 10:17:02 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Laurence Finston wrote:
> 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.

You could define your own outline-level function:

(defun lfinsto1-outline-level ()
  "Return the number of `$' characters matched at point by `outline-regexp'."
    (looking-at outline-regexp)
    (car (read-from-string (count-matches "\\$"
                                          (match-beginning 0) (match-end 0))))))

(set (make-local-variable 'outline-level)

> 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 would just leave outline-heading-end-regexp to its default value "\n",
or maybe prepend " *\*/" to it.

Kevin Rodgers

reply via email to

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