unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5064: 23.1.50; perl mode coloring gone if subroutine name is one letter long
@ 2009-11-28  1:41 ` jidanni
  2009-11-28 19:41   ` Stefan Monnier
  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
  0 siblings, 2 replies; 3+ messages in thread
From: jidanni @ 2009-11-28  1:41 UTC (permalink / raw)
  To: emacs-pretest-bug

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;
}





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#5064: 23.1.50; perl mode coloring gone if subroutine name is one letter long
  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
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2009-11-28 19:41 UTC (permalink / raw)
  To: jidanni; +Cc: 5064

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#5064: marked as done (23.1.50; perl mode coloring gone if subroutine name is one letter long)
  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
@ 2009-11-28 20:40   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2009-11-28 20:40 UTC (permalink / raw)
  To: jidanni, 558428

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

Your message dated Sun, 29 Nov 2009 04:23:07 +0800
with message-id <873a3ytn4k.fsf_-_@jidanni.org>
and subject line Bug#558428: mention that perl can't deal with certain one letter subroutines
has caused the Emacs bug report #5064,
regarding 23.1.50; perl mode coloring gone if subroutine name is one letter long
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
5064: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5064
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 2427 bytes --]

From: jidanni@jidanni.org
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; perl mode coloring gone if subroutine name is one letter long
Date: Sat, 28 Nov 2009 09:41:40 +0800
Message-ID: <87ocmn8lyj.fsf@jidanni.org>

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;
}


[-- Attachment #3: Type: message/rfc822, Size: 3314 bytes --]

From: jidanni@jidanni.org
To: submit@bugs.debian.org
Subject: Bug#558428: mention that perl can't deal with certain one letter subroutines
Date: Sun, 29 Nov 2009 04:23:07 +0800
Message-ID: <873a3ytn4k.fsf_-_@jidanni.org>

X-debbugs-cc: 5064-close@emacsbugs.donarmstrong.com, monnier@iro.umontreal.ca
Package: perl-doc
Version: 5.10.1-8
Severity: wishlist
File: /usr/share/man/man1/perlsub.1.gz
Tags: upstream

Dear Perl guys: On the perlsub man page, please mention near:

       Subroutines whose names are in all upper case are reserved to the
       Perl core, as are modules whose names are in all lower case.

that sub m {...}
won't work too.

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-28 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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

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).