From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: LanX Newsgroups: gmane.emacs.help Subject: Re: cperl-mode - outline minor mode - subroutines Date: Mon, 19 Apr 2010 09:16:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <547e499c-4ece-4f8a-b4d7-30fca1a17e9c@8g2000yqz.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1273011181 26387 80.91.229.12 (4 May 2010 22:13:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 22:13:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 00:13:00 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9QMM-0004EU-QP for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 00:12:59 +0200 Original-Received: from localhost ([127.0.0.1]:41757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9QML-0007AA-Vq for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 18:12:58 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!q15g2000yqj.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: 188.97.64.190 Original-X-Trace: posting.google.com 1271693767 32442 127.0.0.1 (19 Apr 2010 16:16:07 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 19 Apr 2010 16:16:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q15g2000yqj.googlegroups.com; posting-host=188.97.64.190; posting-account=W9fpQwoAAADZYmkl-8sXk1VPxG3rq-Pd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.18) Gecko/2010021502 Ubuntu/8.10 (intrepid) Firefox/3.0.18,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:177784 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73225 Archived-At: > I would like to know how to give hints to outline minor mode, so that > the subroutine can be broken down into > sections and subsections. I presume we are talking about cperl-mode? Thats defined in a list of regex in the variable outline-regexp which is derived from cperl-outline-regexp "^\\(\\([ ]*package\\(\\([ \n]\\|#[^\n]*\n\\)+\\([a-zA-Z_0-9:']+\\)\ \)?\\)\\|[ ]*sub\\(\\([ \n]\\|#[^\n]*\n\\)+\\(::[a-zA-Z_0-9:']+\\|[a- zA-Z_'][a-zA-Z_0-9:']*\\)\\)\\([ \n]*\\(#[^\n]*\n[ \n]*\\)*\\ (([^()]*)\\)\\)?\\([ \n]*\\(#[^\n]*\n[ \n]*\\)*\\(:[^:]\\)\\)?[ \n]* \\(#[^\n]*\n[ \n]*\\)*\\|=head\\([1-4]\\)[ ]+\\([^\n]+\\)$\\)\\|\\`" all of this derived as concat from -------------------- ;;; Details of groups in this are used in `cperl-imenu--create-perl- index' ;;; and `cperl-outline-level'. ;;;; Was: 2=sub|package; now 2=package-group, 5=package-name 8=sub- name (+3) (defvar cperl-imenu--function-name-regexp-perl (concat "^\\(" ; 1 = all "\\([ \t]*package" ; 2 = package-group "\\(" ; 3 = package-name-group cperl-white-and-comment-rex ; 4 = pre-package-name "\\([a-zA-Z_0-9:']+\\)\\)?\\)" ; 5 = package-name "\\|" "[ \t]*sub" (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start cperl-maybe-white-and-comment-rex ; 15=pre-block "\\|" "=head\\([1-4]\\)[ \t]+" ; 16=level "\\([^\n]+\\)$" ; 17=text "\\)")) (defvar cperl-outline-regexp (concat cperl-imenu--function-name-regexp-perl "\\|" "\\`")) -------------------------------- HTH please give a note if you are succesful! :) Cheers rolf