unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Problems with outline-minor-mode
Date: Mon, 19 Jul 2004 10:17:02 -0600	[thread overview]
Message-ID: <40FBF3FE.8030903@yahoo.com> (raw)
In-Reply-To: mailman.316.1090156719.1960.bug-gnu-emacs@gnu.org

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

       reply	other threads:[~2004-07-19 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.316.1090156719.1960.bug-gnu-emacs@gnu.org>
2004-07-19 16:17 ` Kevin Rodgers [this message]
2004-07-19 16:30   ` Problems with outline-minor-mode Laurence Finston
2004-07-18 13:15 Laurence Finston

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=40FBF3FE.8030903@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).