unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: LanX <lanx.perl@googlemail.com>
To: help-gnu-emacs@gnu.org
Cc: emacs-perl-intersection@googlegroups.com
Subject: hs-minor-mode multiple regexes for START and END of folding
Date: Sat, 17 Apr 2010 06:37:42 -0700 (PDT)	[thread overview]
Message-ID: <1b5efd8d-7416-4198-ac3d-cb2bbd3d5a9d@k41g2000yqf.googlegroups.com> (raw)

Hi

according to the documentation of "hs-special-modes-alist" I tried to
expand the regexes such that I can fold as well on "{"-Blocks as on
POD in Perl.


-8<------------------------------------------------------------------
Documentation:
*Alist for initializing the hideshow variables for different modes.
Each element has the form
  (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC).
...
START, END and COMMENT-START are regular expressions.  A block is
defined as text surrounded by START and END.
-8<------------------------------------------------------------------

but using an "or regex (i.e. '\\|' )doesn't work

-8<------------------------------------------------------------------
((cperl-mode "{\\|=head1" "}\\|=cut" "#" nil nil)
...
 (js-mode "{" "}" "/[*/]" nil))
-8<------------------------------------------------------------------

Am I missing something or is hs-minor-mode not able to handle this?

Thanks for any help
  Rolf


                 reply	other threads:[~2010-04-17 13:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1b5efd8d-7416-4198-ac3d-cb2bbd3d5a9d@k41g2000yqf.googlegroups.com \
    --to=lanx.perl@googlemail.com \
    --cc=emacs-perl-intersection@googlegroups.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).