unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark Plaksin <happy@mcplaksin.org>
Subject: Re: Cperl-mode does not highlight function names properly
Date: Sun, 27 Feb 2005 11:10:06 -0500	[thread overview]
Message-ID: <m3hdjyyof5.fsf@water.tss.usg.edu> (raw)
In-Reply-To: 87oee7fekf.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> 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)))

  parent reply	other threads:[~2005-02-27 16:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1704.1109366592.32256.bug-gnu-emacs@gnu.org>
2005-02-26  2:38 ` Cperl-mode does not highlight function names properly Stefan Monnier
2005-02-26  8:21   ` Jérôme Marant
2005-02-26 16:54     ` Stefan Monnier
2005-02-26 17:01       ` Jérôme Marant
2005-02-27 16:10       ` Mark Plaksin [this message]
2005-02-27  0:33     ` Richard Stallman
2005-02-27  8:40       ` Jérôme Marant
2005-02-28 20:09 ` Radomir Hejl
2005-02-28 22:28   ` Jérôme Marant
2005-03-02 11:22   ` Richard Stallman
2005-02-25 21:07 Jérôme Marant

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=m3hdjyyof5.fsf@water.tss.usg.edu \
    --to=happy@mcplaksin.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.
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).