unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* perl-mode indent bug
@ 2006-04-12  3:44 Karl Chen
  2006-04-12  5:11 ` Stefan Monnier
  2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
  0 siblings, 2 replies; 23+ messages in thread
From: Karl Chen @ 2006-04-12  3:44 UTC (permalink / raw)



Perl-mode mis-indents this:
    {
        sub foo {
        }
    }

It always puts the "}" closing a subroutine whose opening "{" is
hanging at column 0, even when it should be matching the opening
line.

The patch below works for me.


2006-04-11  Karl Chen  <quarl@cs.berkeley.edu>

        * progmodes/perl-mode.el (perl-indent-new-calculate): Recalculate
        parse-start in case we are inside a nested function.


--- perl-mode.el	10 Feb 2006 01:00:30 -0700	1.64
+++ perl-mode.el	11 Apr 2006 20:33:04 -0700	
@@ -721,6 +721,7 @@
 	(save-excursion
 	  (forward-char 1)
 	  (forward-sexp -1)
+          (setq parse-start (save-excursion (perl-beginning-of-function)))
 	  (perl-indent-new-calculate 'virtual nil parse-start)))
    (and (and (= (following-char) ?{)
 	     (save-excursion (forward-char) (perl-hanging-paren-p)))


-- 
Karl 2006-04-11 20:39

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

* Re: perl-mode indent bug
  2006-04-12  3:44 perl-mode indent bug Karl Chen
@ 2006-04-12  5:11 ` Stefan Monnier
  2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
  1 sibling, 0 replies; 23+ messages in thread
From: Stefan Monnier @ 2006-04-12  5:11 UTC (permalink / raw)
  Cc: Emacs Developement List

> Perl-mode mis-indents this:
>     {
>         sub foo {
>         }
>     }

> It always puts the "}" closing a subroutine whose opening "{" is
> hanging at column 0, even when it should be matching the opening
> line.

> The patch below works for me.


> 2006-04-11  Karl Chen  <quarl@cs.berkeley.edu>

>         * progmodes/perl-mode.el (perl-indent-new-calculate): Recalculate
>         parse-start in case we are inside a nested function.

Installed, thanks,


        Stefan

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

* cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12  3:44 perl-mode indent bug Karl Chen
  2006-04-12  5:11 ` Stefan Monnier
@ 2006-04-12 12:42 ` Randal L. Schwartz
  2006-04-12 13:18   ` Randal L. Schwartz
                     ` (3 more replies)
  1 sibling, 4 replies; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-12 12:42 UTC (permalink / raw)


>>>>> "Karl" == Karl Chen <quarl@cs.berkeley.edu> writes:

Karl> Perl-mode mis-indents this:

All the cool-cats I know have completely abandoned perl-mode
for cperl-mode long ago.   Is there any way we can just make
that the default instead?  It'd keep me from having to copy
this from .emacs to .emacs for each new work environment:

(while (let ((pm (rassoc 'perl-mode auto-mode-alist)))
  (and pm (setcdr pm 'cperl-mode))))
(while (let ((pm (rassoc 'perl-mode interpreter-mode-alist)))
  (and pm (setcdr pm 'cperl-mode))))

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
@ 2006-04-12 13:18   ` Randal L. Schwartz
  2006-04-12 15:16     ` Stuart D. Herring
  2006-04-12 14:44   ` cperl-mode instead of perl-mode? Stefan Monnier
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-12 13:18 UTC (permalink / raw)


>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:

>>>>> "Karl" == Karl Chen <quarl@cs.berkeley.edu> writes:
Karl> Perl-mode mis-indents this:

Randal> All the cool-cats I know have completely abandoned perl-mode
Randal> for cperl-mode long ago.   Is there any way we can just make
Randal> that the default instead?  It'd keep me from having to copy
Randal> this from .emacs to .emacs for each new work environment:

Randal> (while (let ((pm (rassoc 'perl-mode auto-mode-alist)))
Randal>   (and pm (setcdr pm 'cperl-mode))))
Randal> (while (let ((pm (rassoc 'perl-mode interpreter-mode-alist)))
Randal>   (and pm (setcdr pm 'cperl-mode))))

Heh.  Just realized the (and ..) in there is vestigial.  Nothing like posting
code to force you to do a code-review about 20 seconds too late.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode?
  2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
  2006-04-12 13:18   ` Randal L. Schwartz
@ 2006-04-12 14:44   ` Stefan Monnier
  2006-04-13 18:51     ` Ted Zlatanov
  2006-04-12 21:46   ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Richard Stallman
  2006-04-15 11:45   ` Piet van Oostrum
  3 siblings, 1 reply; 23+ messages in thread
From: Stefan Monnier @ 2006-04-12 14:44 UTC (permalink / raw)
  Cc: emacs-devel

Karl> Perl-mode mis-indents this:

> All the cool-cats I know have completely abandoned perl-mode
> for cperl-mode long ago.   Is there any way we can just make
> that the default instead?

The reason why cperl-mode wasn't made the default when it got integrated
(AFAIK) was that it had several misbehaviors w.r.t conventions and that the
original author wasn't interested in fixing them and nobody
else volunteered.

By now, perl-mode has caught up with some of cperl-mode's features and has
even added some of its own, while perl-mode's odd aspects haven't really
ben addressed (tho, at least, you can now use both perl-mode and cperl-mode
in the same Emacs, without one stepping on the other's toes).


        Stefan "the closest there is to a maintainer of `perl-mode'"

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12 13:18   ` Randal L. Schwartz
@ 2006-04-12 15:16     ` Stuart D. Herring
  2006-04-12 15:21       ` Randal L. Schwartz
  0 siblings, 1 reply; 23+ messages in thread
From: Stuart D. Herring @ 2006-04-12 15:16 UTC (permalink / raw)
  Cc: emacs-devel

> Randal> (while (let ((pm (rassoc 'perl-mode interpreter-mode-alist)))
> Randal>   (and pm (setcdr pm 'cperl-mode))))
>
> Heh.  Just realized the (and ..) in there is vestigial.  Nothing like
> posting
> code to force you to do a code-review about 20 seconds too late.

How is that vestigial?  If you've run out of hits, pm will be nil, but
because you're still inside the let, the while can't exit.  So you need to
test pm, use it if it's not nil, and evaluate to nil if it is so the loop
will exit.  So what you have is fine, although I might recommend

(let (pm)
  (while (setq pm (rassoc ...))
    (setcdr pm ...)))

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12 15:16     ` Stuart D. Herring
@ 2006-04-12 15:21       ` Randal L. Schwartz
  0 siblings, 0 replies; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-12 15:21 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Stuart" == Stuart D Herring <herring@lanl.gov> writes:

Randal> (while (let ((pm (rassoc 'perl-mode interpreter-mode-alist)))
Randal> (and pm (setcdr pm 'cperl-mode))))
>> 
>> Heh.  Just realized the (and ..) in there is vestigial.  Nothing like
>> posting
>> code to force you to do a code-review about 20 seconds too late.

Stuart> How is that vestigial?  If you've run out of hits, pm will be nil, but
Stuart> because you're still inside the let, the while can't exit.  So you need to
Stuart> test pm, use it if it's not nil, and evaluate to nil if it is so the loop
Stuart> will exit.  So what you have is fine, although I might recommend

Stuart> (let (pm)
Stuart>   (while (setq pm (rassoc ...))
Stuart>     (setcdr pm ...)))

It's vestigial because my brain has parts that aren't linked
to anything else.

Thanks for explaining what I probably figured out originally. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
  2006-04-12 13:18   ` Randal L. Schwartz
  2006-04-12 14:44   ` cperl-mode instead of perl-mode? Stefan Monnier
@ 2006-04-12 21:46   ` Richard Stallman
  2006-04-12 21:58     ` Randal L. Schwartz
  2006-04-15 11:45   ` Piet van Oostrum
  3 siblings, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2006-04-12 21:46 UTC (permalink / raw)
  Cc: emacs-devel

Cperl mode was the default in Emacs for a while,
but it ran into problems so I switched the default
back to Perl mode.

Currently we have no one to maintain cperl mode in Emacs.
(I asked the author to do it, but he didn't say yes.)

Do you want to do it?

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12 21:46   ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Richard Stallman
@ 2006-04-12 21:58     ` Randal L. Schwartz
  2006-04-13 16:38       ` Richard Stallman
  0 siblings, 1 reply; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-12 21:58 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:

Richard> Cperl mode was the default in Emacs for a while,
Richard> but it ran into problems so I switched the default
Richard> back to Perl mode.

Richard> Currently we have no one to maintain cperl mode in Emacs.
Richard> (I asked the author to do it, but he didn't say yes.)

Richard> Do you want to do it?

Given that it was originally by Ilya, who is known for bizarre but mostly
functional code (the Perl regular expression engine, and the Perl debugger
come to mind immediately), I *should* hesitate any confirmation. :-)

However, I'm perfectly happy to give it a go on a time-permitted basis.  And
forgive my ignorance, but is there a bug queue that I should be scanning for
bugs reported against cperl-mode?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-12 21:58     ` Randal L. Schwartz
@ 2006-04-13 16:38       ` Richard Stallman
  2006-04-13 17:08         ` Randal L. Schwartz
  2006-04-13 17:10         ` cperl-mode instead of perl-mode? Stefan Monnier
  0 siblings, 2 replies; 23+ messages in thread
From: Richard Stallman @ 2006-04-13 16:38 UTC (permalink / raw)
  Cc: emacs-devel

Ilya continues to maintain cperl-mode on his own,
but is not interested in merging the changes into Emacs.
If you can arrange to merge his most important changes
(studying them, not just copying them), after the release,
that would be very useful.

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

* Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
  2006-04-13 16:38       ` Richard Stallman
@ 2006-04-13 17:08         ` Randal L. Schwartz
  2006-04-13 17:10         ` cperl-mode instead of perl-mode? Stefan Monnier
  1 sibling, 0 replies; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-13 17:08 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:

Richard> Ilya continues to maintain cperl-mode on his own,
Richard> but is not interested in merging the changes into Emacs.
Richard> If you can arrange to merge his most important changes
Richard> (studying them, not just copying them), after the release,
Richard> that would be very useful.

That's definitely a manageable task...  I'll start tracking and comparing his
version shortly.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode?
  2006-04-13 16:38       ` Richard Stallman
  2006-04-13 17:08         ` Randal L. Schwartz
@ 2006-04-13 17:10         ` Stefan Monnier
  2006-04-14 16:15           ` Richard Stallman
  1 sibling, 1 reply; 23+ messages in thread
From: Stefan Monnier @ 2006-04-13 17:10 UTC (permalink / raw)
  Cc: emacs-devel, Randal L. Schwartz

> Ilya continues to maintain cperl-mode on his own,
> but is not interested in merging the changes into Emacs.
> If you can arrange to merge his most important changes
> (studying them, not just copying them), after the release,
> that would be very useful.

Until now, I've been merging his updates every once in a while into Emacs's
own version.
See the ILYA "vendor-branch" in the CVS repository.
As can be seen in "cperl-version", I've currently updated the code only upto
version 5.0, even though I have imported upto version 5.10 on the
vendor branch.


        Stefan

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

* Re: cperl-mode instead of perl-mode?
  2006-04-12 14:44   ` cperl-mode instead of perl-mode? Stefan Monnier
@ 2006-04-13 18:51     ` Ted Zlatanov
  2006-04-14 16:15       ` Richard Stallman
  0 siblings, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2006-04-13 18:51 UTC (permalink / raw)


On 12 Apr 2006, monnier@iro.umontreal.ca wrote:

> Karl> Perl-mode mis-indents this:
>
>> All the cool-cats I know have completely abandoned perl-mode
>> for cperl-mode long ago.   Is there any way we can just make
>> that the default instead?
>
> The reason why cperl-mode wasn't made the default when it got
> integrated (AFAIK) was that it had several misbehaviors w.r.t
> conventions and that the original author wasn't interested in fixing
> them and nobody else volunteered.
>
> By now, perl-mode has caught up with some of cperl-mode's features
> and has even added some of its own, while perl-mode's odd aspects
> haven't really ben addressed (tho, at least, you can now use both
> perl-mode and cperl-mode in the same Emacs, without one stepping on
> the other's toes).

I have to say, I don't know any Perl programmers that use perl-mode.
This is not to say perl-mode is not good, just that cperl-mode by now
is very popular.

Can we put together a list of features for perl-mode vs. cperl-mode?
It will let users decide better, and it will tell us whether one or
the other needs to catch up.

Ted

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

* Re: cperl-mode instead of perl-mode?
  2006-04-13 17:10         ` cperl-mode instead of perl-mode? Stefan Monnier
@ 2006-04-14 16:15           ` Richard Stallman
  2006-04-14 20:35             ` Stefan Monnier
  0 siblings, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2006-04-14 16:15 UTC (permalink / raw)
  Cc: emacs-devel, merlyn

    As can be seen in "cperl-version", I've currently updated the code only upto
    version 5.0, even though I have imported upto version 5.10 on the
    vendor branch.

Thank you--I didn't know this was being done.

So, how well does our current Cperl mode work?
Should it be the default?

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

* Re: cperl-mode instead of perl-mode?
  2006-04-13 18:51     ` Ted Zlatanov
@ 2006-04-14 16:15       ` Richard Stallman
  2006-04-18 14:56         ` Ted Zlatanov
  0 siblings, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2006-04-14 16:15 UTC (permalink / raw)
  Cc: emacs-devel

    Can we put together a list of features for perl-mode vs. cperl-mode?
    It will let users decide better, and it will tell us whether one or
    the other needs to catch up.

The issue was not really about comparative features, but rather about
comparative painful bugs.  Perl mode does not handle all the
indentation right, and the main advantage of CPerl mode was that it
does (or did) a better job.  That is why we installed CPerl mode and
made it the default.  But it turned out that CPerl mode had some other
painful bugs, and nobody fixed them.

If those bugs have been fixed, and the fixes have been installed,
maybe CPerl mode should be the default again.

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

* Re: cperl-mode instead of perl-mode?
  2006-04-14 16:15           ` Richard Stallman
@ 2006-04-14 20:35             ` Stefan Monnier
  2006-04-15  0:27               ` Randal L. Schwartz
  2006-04-15 17:32               ` Richard Stallman
  0 siblings, 2 replies; 23+ messages in thread
From: Stefan Monnier @ 2006-04-14 20:35 UTC (permalink / raw)
  Cc: emacs-devel, merlyn

>     As can be seen in "cperl-version", I've currently updated the code
>     only upto version 5.0, even though I have imported upto version 5.10
>     on the vendor branch.

> Thank you--I didn't know this was being done.

> So, how well does our current Cperl mode work?
> Should it be the default?

As the "maintainer" of both perl-mode and (until a few days ago) cperl-mode,
I'll vote to keep perl-mode as the default, because cperl-mode's code is ugly.

I haven't used cperl-mode much, tho, but my impression was that it provides
more specialized support for Perl hackers, while Emacs users who use
a variety of languages may prefer perl-mode which is more standard.


        Stefan

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

* Re: cperl-mode instead of perl-mode?
  2006-04-14 20:35             ` Stefan Monnier
@ 2006-04-15  0:27               ` Randal L. Schwartz
  2006-04-15  1:37                 ` Stefan Monnier
  2006-04-15 17:32               ` Richard Stallman
  1 sibling, 1 reply; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-15  0:27 UTC (permalink / raw)


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

Stefan> As the "maintainer" of both perl-mode and (until a few days ago)
Stefan> cperl-mode, I'll vote to keep perl-mode as the default, because
Stefan> cperl-mode's code is ugly.

The code is probably ugly because it actually works on 95% of Perl code out
there, instead of perl-mode which requires a lot more of "you code for
perl-mode, instead of perl-mode helping you".

It's very *rare* that I need to change what I would have typed to have
cperl-mode properly lex it and indent and color it.  perl-mode almost always
gets my typical code wrong.  Perl code resists naive lexing.  cperl-mode is
maintained by the same guy who did a lot of Perl regular expression engine,
and understands parsing complex things.

Stefan> I haven't used cperl-mode much, tho, but my impression was that it
Stefan> provides more specialized support for Perl hackers, while Emacs users
Stefan> who use a variety of languages may prefer perl-mode which is more
Stefan> standard.

Well, there's my datapoint.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode?
  2006-04-15  0:27               ` Randal L. Schwartz
@ 2006-04-15  1:37                 ` Stefan Monnier
  2006-04-16  2:09                   ` Richard Stallman
  0 siblings, 1 reply; 23+ messages in thread
From: Stefan Monnier @ 2006-04-15  1:37 UTC (permalink / raw)
  Cc: emacs-devel

> The code is probably ugly because it actually works on 95% of Perl code out
> there, instead of perl-mode which requires a lot more of "you code for
> perl-mode, instead of perl-mode helping you".

Could be, but note that current perl-mode is quite a bit better in
this respect.  Maybe still not as good as cperl-mode, but not nearly as far
as it used to be (and in some cases, better).


        Stefan

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

* Re: cperl-mode instead of perl-mode?
  2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
                     ` (2 preceding siblings ...)
  2006-04-12 21:46   ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Richard Stallman
@ 2006-04-15 11:45   ` Piet van Oostrum
  2006-04-15 13:36     ` Randal L. Schwartz
  3 siblings, 1 reply; 23+ messages in thread
From: Piet van Oostrum @ 2006-04-15 11:45 UTC (permalink / raw)


>>>>> merlyn@stonehenge.com (Randal L. Schwartz) (RLS) wrote:

>RLS> All the cool-cats I know have completely abandoned perl-mode
>RLS> for cperl-mode long ago.   Is there any way we can just make
>RLS> that the default instead?  It'd keep me from having to copy
>RLS> this from .emacs to .emacs for each new work environment:

>RLS> (while (let ((pm (rassoc 'perl-mode auto-mode-alist)))
>RLS>   (and pm (setcdr pm 'cperl-mode))))
>RLS> (while (let ((pm (rassoc 'perl-mode interpreter-mode-alist)))
>RLS>   (and pm (setcdr pm 'cperl-mode))))

Cperl-mode itself suggests (defalias 'perl-mode 'cperl-mode) which is much
easier. Still necessary to take it with you, but I suppose you want to take
more things from your .emacs with you.

-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org

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

* Re: cperl-mode instead of perl-mode?
  2006-04-15 11:45   ` Piet van Oostrum
@ 2006-04-15 13:36     ` Randal L. Schwartz
  0 siblings, 0 replies; 23+ messages in thread
From: Randal L. Schwartz @ 2006-04-15 13:36 UTC (permalink / raw)


>>>>> "Piet" == Piet van Oostrum <piet@cs.uu.nl> writes:

Piet> Cperl-mode itself suggests (defalias 'perl-mode 'cperl-mode) which is much
Piet> easier.

Yeah, I've seen that, but that'd break any file that was marked -*- perl -*-
because the indenting is slightly different and the "phony" items you have
to sprinkle for perl-mode's mismatched balances would actually confuse
cperl-mode.

So, you have to have both.  Simply calling cperl-mode "perl-mode" is no good.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: cperl-mode instead of perl-mode?
  2006-04-14 20:35             ` Stefan Monnier
  2006-04-15  0:27               ` Randal L. Schwartz
@ 2006-04-15 17:32               ` Richard Stallman
  1 sibling, 0 replies; 23+ messages in thread
From: Richard Stallman @ 2006-04-15 17:32 UTC (permalink / raw)
  Cc: emacs-devel, merlyn

    As the "maintainer" of both perl-mode and (until a few days ago) cperl-mode,
    I'll vote to keep perl-mode as the default, because cperl-mode's code is ugly.

I don't think that's the way to make the decision.  I think it's a matter
of how well each mode works.  If CPerl mode works better, and if it has
no painful surprises, then let's make it the default.

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

* Re: cperl-mode instead of perl-mode?
  2006-04-15  1:37                 ` Stefan Monnier
@ 2006-04-16  2:09                   ` Richard Stallman
  0 siblings, 0 replies; 23+ messages in thread
From: Richard Stallman @ 2006-04-16  2:09 UTC (permalink / raw)
  Cc: emacs-devel, merlyn

Randal, have you tried a recent Perl mode?
If not, could you try it and see how well it works?

In general, if Perl mode requires people put special things
into their code to make it parse right, and CPerl mode does not,
this suggests CPerl mode should be the default, and Perl mode should
be maintained specifically for those files that are written for it.

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

* Re: cperl-mode instead of perl-mode?
  2006-04-14 16:15       ` Richard Stallman
@ 2006-04-18 14:56         ` Ted Zlatanov
  0 siblings, 0 replies; 23+ messages in thread
From: Ted Zlatanov @ 2006-04-18 14:56 UTC (permalink / raw)


On 14 Apr 2006, rms@gnu.org wrote:

> That is why we installed CPerl mode and made it the default.  But it
> turned out that CPerl mode had some other painful bugs, and nobody
> fixed them.
>
> If those bugs have been fixed, and the fixes have been installed,
> maybe CPerl mode should be the default again.

OK, I'm willing to test the bugs and see if any are still present (and
even try to fix some, if I can).  Does anyone have a list of them or a
pointer to a summary discussion?

Ted

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

end of thread, other threads:[~2006-04-18 14:56 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-12  3:44 perl-mode indent bug Karl Chen
2006-04-12  5:11 ` Stefan Monnier
2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
2006-04-12 13:18   ` Randal L. Schwartz
2006-04-12 15:16     ` Stuart D. Herring
2006-04-12 15:21       ` Randal L. Schwartz
2006-04-12 14:44   ` cperl-mode instead of perl-mode? Stefan Monnier
2006-04-13 18:51     ` Ted Zlatanov
2006-04-14 16:15       ` Richard Stallman
2006-04-18 14:56         ` Ted Zlatanov
2006-04-12 21:46   ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Richard Stallman
2006-04-12 21:58     ` Randal L. Schwartz
2006-04-13 16:38       ` Richard Stallman
2006-04-13 17:08         ` Randal L. Schwartz
2006-04-13 17:10         ` cperl-mode instead of perl-mode? Stefan Monnier
2006-04-14 16:15           ` Richard Stallman
2006-04-14 20:35             ` Stefan Monnier
2006-04-15  0:27               ` Randal L. Schwartz
2006-04-15  1:37                 ` Stefan Monnier
2006-04-16  2:09                   ` Richard Stallman
2006-04-15 17:32               ` Richard Stallman
2006-04-15 11:45   ` Piet van Oostrum
2006-04-15 13:36     ` Randal L. Schwartz

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