[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with outline-minor-mode
From: |
Laurence Finston |
Subject: |
Re: Problems with outline-minor-mode |
Date: |
Mon, 19 Jul 2004 18:30:46 +0200 (MEST) |
Thanks. I'll give it a try.
Laurence
On Mon, 19 Jul 2004, Kevin Rodgers wrote:
> 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'."
> (save-excursion
> (looking-at outline-regexp)
> (car (read-from-string (count-matches "\\$"
> (match-beginning 0) (match-end 0))))))
>
> (set (make-local-variable 'outline-level)
> 'lfinsto1-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
>
>
>
> _______________________________________________
> Bug-gnu-emacs mailing list
> Bug-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
>