unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Cperl-mode does not highlight function names properly
@ 2005-02-25 21:07 Jérôme Marant
  0 siblings, 0 replies; 11+ messages in thread
From: Jérôme Marant @ 2005-02-25 21:07 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (powerpc-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-02-06 on voltaire, modified by Debian
configured using `configure '--build=powerpc-linux' '--host=powerpc-linux' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--with-x=yes' '--with-x-toolkit=athena' 'CFLAGS=-DDEBIAN -g -O2' 'build_alias=powerpc-linux' 'host_alias=powerpc-linux''
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR@euro
  locale-coding-system: iso-latin-9
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Hi,

Cperl-mode does not highlight properly function names that contain
Perl keywords.

Here is a test case.

------------

#!/usr/bin/perl

sub test_read_file ()
  {

  }

sub func ()
  {

  }

------------

You will notice that 'read' in test_read_file is highlighted as
a keyword whereas 'func' is hightlighted as a function name.

I could reproduce the problem with current CVS trunk as well.

Cheers,

Recent input:
<down> SPC <down> SPC <down> SPC q SPC SPC q <help-echo> 
C-x C-f A . p l <backspace> <backspace> <backspace> 
<backspace> a . p l <return> M-x c p e r <tab> <return> 
# ! / u s r / b i n / p e r l <return> <return> s u 
b SPC t e s t _ r e a d _ f i l e SPC ( ) <return> 
[ <backspace> { <return> <return> } <return> <return> 
s u b SPC t e s t SPC ( ) <return> { <return> <return> 
} <help-echo> <down-mouse-1> <M-mouse-1> <C-down-m
ouse-3>

Recent messages:
Suppressing duplicates...done
Generating summary...done
No more unread newsgroups
(iconify-frame (#<frame emacs21@amboise 0x1cb79a0\ >))
(make-frame-visible (#<frame emacs21@amboise 0x1cb79a0\ >))
(New file)
Loading perl-mode...done
Loading cperl-mode...done

Loading emacsbug...done

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

* Re: Cperl-mode does not highlight function names properly
       [not found] <mailman.1704.1109366592.32256.bug-gnu-emacs@gnu.org>
@ 2005-02-26  2:38 ` Stefan Monnier
  2005-02-26  8:21   ` Jérôme Marant
  2005-02-28 20:09 ` Radomir Hejl
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-02-26  2:38 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> Cperl-mode does not highlight properly function names that contain
> Perl keywords.

For what it's worth the perl-mode (in Emacs-CVS at least) seems to highlight
them correctly.


        Stefan

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

* Re: Cperl-mode does not highlight function names properly
  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-27  0:33     ` Richard Stallman
  0 siblings, 2 replies; 11+ messages in thread
From: Jérôme Marant @ 2005-02-26  8:21 UTC (permalink / raw)
  Cc: Stefan Monnier

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Cperl-mode does not highlight properly function names that contain
>> Perl keywords.
>
> For what it's worth the perl-mode (in Emacs-CVS at least) seems to highlight
> them correctly.

But it does not turn cperl-mode to highlight them properly :-)
Also, it seems that cperl-mode on XEmacs (with a lower version
of Cperl-mode) does not have such a problem.

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

Cheers,

-- 
Jérôme Marant

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

* Re: Cperl-mode does not highlight function names properly
  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
  2005-02-27  0:33     ` Richard Stallman
  1 sibling, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2005-02-26 16:54 UTC (permalink / raw)
  Cc: bug-gnu-emacs

>>> Cperl-mode does not highlight properly function names that contain
>>> Perl keywords.
>> 
>> For what it's worth the perl-mode (in Emacs-CVS at least) seems to highlight
>> them correctly.

> But it does not turn cperl-mode to highlight them properly :-)
> Also, it seems that cperl-mode on XEmacs (with a lower version
> of Cperl-mode) does not have such a problem.

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


        Stefan

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

* Re: Cperl-mode does not highlight function names properly
  2005-02-26 16:54     ` Stefan Monnier
@ 2005-02-26 17:01       ` Jérôme Marant
  2005-02-27 16:10       ` Mark Plaksin
  1 sibling, 0 replies; 11+ messages in thread
From: Jérôme Marant @ 2005-02-26 17:01 UTC (permalink / raw)
  Cc: bug-gnu-emacs

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.

I know it and I've used it until Richard told be it was obsolete.
I know it doesn't have such problems, at least for highlighting. I'll forward
bug reports then.

Should the I contact the cperl-mode maintainer directly about the current
bug? Does he read the emacs lists?

Cheers,

-- 
Jérôme Marant

http://marant.org

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

* Re: Cperl-mode does not highlight function names properly
  2005-02-26  8:21   ` Jérôme Marant
  2005-02-26 16:54     ` Stefan Monnier
@ 2005-02-27  0:33     ` Richard Stallman
  2005-02-27  8:40       ` Jérôme Marant
  1 sibling, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2005-02-27  0:33 UTC (permalink / raw)
  Cc: bug-gnu-emacs, monnier

    Speaking of perl-mode, Richard told me that this mode is obsolete
    and shall be deprecated.

I hoped that CPerl mode would always be better than Perl mode, but
that turned out not to be the case (not yet).  And the author of CPerl
mode lost interested in maintaining it.  So unless someone else takes
it over and fixes the problems, we cannot consider Perl mode obsolete.

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

* Re: Cperl-mode does not highlight function names properly
  2005-02-27  0:33     ` Richard Stallman
@ 2005-02-27  8:40       ` Jérôme Marant
  0 siblings, 0 replies; 11+ messages in thread
From: Jérôme Marant @ 2005-02-27  8:40 UTC (permalink / raw)
  Cc: rms

Richard Stallman <rms@gnu.org> writes:

>     Speaking of perl-mode, Richard told me that this mode is obsolete
>     and shall be deprecated.
>
> I hoped that CPerl mode would always be better than Perl mode, but
> that turned out not to be the case (not yet).  And the author of CPerl
> mode lost interested in maintaining it.  So unless someone else takes
> it over and fixes the problems, we cannot consider Perl mode obsolete.

Thanks for the information!

-- 
Jérôme Marant

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

* Re: Cperl-mode does not highlight function names properly
  2005-02-26 16:54     ` Stefan Monnier
  2005-02-26 17:01       ` Jérôme Marant
@ 2005-02-27 16:10       ` Mark Plaksin
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Plaksin @ 2005-02-27 16:10 UTC (permalink / raw)


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

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

* Re: Cperl-mode does not highlight function names properly
       [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-28 20:09 ` Radomir Hejl
  2005-02-28 22:28   ` Jérôme Marant
  2005-03-02 11:22   ` Richard Stallman
  1 sibling, 2 replies; 11+ messages in thread
From: Radomir Hejl @ 2005-02-28 20:09 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]


"Jérôme Marant" <jerome@marant.org> pí¹e v diskusním pøíspìvku 
news:mailman.1704.1109366592.32256.bug-gnu-emacs@gnu.org...
> This bug report will be sent to the Free Software Foundation,
> not to your local site managers!
> Please write in English, because the Emacs maintainers do not have
> translators to read other languages for them.
>
> Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
> and to the gnu.emacs.bug news group.
>
> In GNU Emacs 21.3.1 (powerpc-unknown-linux-gnu, X toolkit, Xaw3d scroll 
> bars)
> of 2005-02-06 on voltaire, modified by Debian
> configured using `configure '--build=powerpc-linux' '--host=powerpc-linux' 
> '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' 
> '--localstatedir=/var/lib' '--infodir=/usr/share/info' 
> '--mandir=/usr/share/man' '--with-pop=yes' '--with-x=yes' 
> '--with-x-toolkit=athena' 'CFLAGS=-DDEBIAN -g -O2' 
> 'build_alias=powerpc-linux' 'host_alias=powerpc-linux''
> Important settings:
>  value of $LC_ALL: nil
>  value of $LC_COLLATE: nil
>  value of $LC_CTYPE: nil
>  value of $LC_MESSAGES: nil
>  value of $LC_MONETARY: nil
>  value of $LC_NUMERIC: nil
>  value of $LC_TIME: nil
>  value of $LANG: fr_FR@euro
>  locale-coding-system: iso-latin-9
>  default-enable-multibyte-characters: t
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
> Hi,
>
> Cperl-mode does not highlight properly function names that contain
> Perl keywords.
>
> Here is a test case.
>
> ------------
>
> #!/usr/bin/perl
>
> sub test_read_file ()
>  {
>
>  }
>
> sub func ()
>  {
>
>  }
>
> ------------
>
> You will notice that 'read' in test_read_file is highlighted as
> a keyword whereas 'func' is hightlighted as a function name.
>
> I could reproduce the problem with current CVS trunk as well.
>
> Cheers,
>

Hi,
I use GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600). The highlighting
issues were true for 4.23 cperl-mode which was the version I've had
to date. Now I have cperl 5.0 and the mentioned bug (and others) is gone. 
But
this newest cperl version is not included in emacs distribution
(even in 21.4.2).

Radek H. 

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

* Re: Cperl-mode does not highlight function names properly
  2005-02-28 20:09 ` Radomir Hejl
@ 2005-02-28 22:28   ` Jérôme Marant
  2005-03-02 11:22   ` Richard Stallman
  1 sibling, 0 replies; 11+ messages in thread
From: Jérôme Marant @ 2005-02-28 22:28 UTC (permalink / raw)


"Radomir Hejl" <rh62121@yahoo.com> writes:


> Hi,
> I use GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600). The highlighting
> issues were true for 4.23 cperl-mode which was the version I've had
> to date. Now I have cperl 5.0 and the mentioned bug (and others) is gone. 
> But
> this newest cperl version is not included in emacs distribution
> (even in 21.4.2).

I'm surprised. I could reproduce the bug with a recent CVS trunk.
I'll have a closer look.

Thanks.

-- 
Jérôme Marant

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

* Re: Cperl-mode does not highlight function names properly
  2005-02-28 20:09 ` Radomir Hejl
  2005-02-28 22:28   ` Jérôme Marant
@ 2005-03-02 11:22   ` Richard Stallman
  1 sibling, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2005-03-02 11:22 UTC (permalink / raw)
  Cc: gnu-emacs-bug

It would be nice for someone to work on installing the latest cperl
mode.  The author of cperl mode does not seem to want to do it,
but I would be glad if he did.

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

end of thread, other threads:[~2005-03-02 11:22 UTC | newest]

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

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