From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mark Plaksin Newsgroups: gmane.emacs.bugs Subject: Re: Cperl-mode does not highlight function names properly Date: Sun, 27 Feb 2005 11:10:06 -0500 Message-ID: References: <87fyzkgi70.fsf-monnier+emacs@gnu.org> <87r7j3spd4.fsf@marant.org> <87oee7fekf.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1109520838 19906 80.91.229.2 (27 Feb 2005 16:13:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Feb 2005 16:13:58 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 27 17:13:58 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D5R2N-0001sO-QS for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Feb 2005 17:12:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5RKZ-0007da-5i for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Feb 2005 11:31:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D5RJ4-0005Ez-9F for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2005 11:30:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D5RIw-00055E-PL for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2005 11:30:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5RIw-000524-CL for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2005 11:30:02 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1D5R4K-0002li-5n for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2005 11:14:56 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1D5Qzw-0001c2-RN for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2005 17:10:24 +0100 Original-Received: from water.tss.usg.edu ([168.24.82.53]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Feb 2005 17:10:24 +0100 Original-Received: from happy by water.tss.usg.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Feb 2005 17:10:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: water.tss.usg.edu User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:OzPPd2oIB9c+0s8lbxDi6Y86DCU= X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geb-bug-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.bugs:10817 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:10817 Stefan Monnier writes: >> Speaking of perl-mode, Richard told me that this mode is obsolete >> and shall be deprecated. What's his status? (we have a bunch of >> bug reports in the Debian BTS about it). > > Huh? It's the default perl-mode, and it's the one I've been using (and > improving) for the last few years. Try it (in its Emacs-CVS version) and > pass on the bug-reports. How about stealing/modifying the following from cperl-mode so outline-minor-mode works in perl-mode? (defvar cperl-outline-regexp (concat cperl-imenu--function-name-regexp-perl "\\|" "\\`")) (make-local-variable 'outline-regexp) (setq outline-regexp cperl-outline-regexp) (make-local-variable 'outline-level) (setq outline-level 'cperl-outline-level) ;; Suggested by Mark A. Hershberger (defun cperl-outline-level () (looking-at outline-regexp) (cond ((not (match-beginning 1)) 0) ; beginning-of-file ((match-beginning 2) (if (eq (char-after (match-beginning 2)) ?p) 0 ; package 1)) ; sub ((match-beginning 5) (if (eq (char-after (match-beginning 5)) ?1) 1 ; head1 2)) ; head2 (t 3)))