all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: jidanni@jidanni.org
Cc: 5064@emacsbugs.donarmstrong.com
Subject: bug#5064: 23.1.50; perl mode coloring gone if subroutine name is one letter long
Date: Sat, 28 Nov 2009 14:41:03 -0500	[thread overview]
Message-ID: <jwvhbse799w.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <87ocmn8lyj.fsf@jidanni.org> (jidanni@jidanni.org's message of "Sat, 28 Nov 2009 09:41:40 +0800")

> Gentlemen, consider the following perl subroutines.
> Notice how the latter has all its coloring gone, just because it starts
> with one letter. (perl-mode)^X^E

> sub max {
>     my $max = shift(@_);
>     foreach $foo (@_) {
>         $max = $foo if $max < $foo;
>     }
>     return $max;
> }
> sub m {
>     my $max = shift(@_);
>     foreach $foo (@_) {
>         $max = $foo if $max < $foo;
>     }
>     return $max;
> }

Actually, the problem is not really that it's only one letter, but that
it's the "keyword" m, used for matching (as in "m/regexp/").  Of course
the same can happen with other keywords like "s", "tr", "y", "q", "qx",
and various others.

I'm not sure if such a function definition is valid.  Does Perl accept
it and can you actually call this function?


        Stefan





  reply	other threads:[~2009-11-28 19:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <873a3ytn4k.fsf_-_@jidanni.org>
2009-11-28  1:41 ` bug#5064: 23.1.50; perl mode coloring gone if subroutine name is one letter long jidanni
2009-11-28 19:41   ` Stefan Monnier [this message]
2009-11-28 20:40   ` bug#5064: marked as done (23.1.50; perl mode coloring gone if subroutine name is one letter long) Emacs bug Tracking System

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvhbse799w.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=5064@emacsbugs.donarmstrong.com \
    --cc=jidanni@jidanni.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.