bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perl-mode in Emacs buggy?


From: Don Woods
Subject: Re: perl-mode in Emacs buggy?
Date: 29 Nov 2000 17:47:56 -0500

fsavigny@onlinehome.de (Florian v. Savigny) writes:
> do you know Emacs' perl-mode? I am puzzled about its indentation
> and parentheses matching (seemingly the same problem):
...
>           if ($zeile =~ /^Subject:(.*?$)/) {

As you say in your second post, emacs is treating $) as a special
variable, instead of treating the $ as part of the regex.  I know
I've seen it documented somewhere that emacs uses a fairly simple
rule for interpreting $ characters in perl-mode; in most places
it just "escapes" the next character.  ("$/" must be an exception.)

The best way to fix your problem, I think, is just to move the $
outside of the parentheses:

            if ($zeile =~ /^Subject:(.*?)$/) {

That should have the same effect in perl, since the $ end marker
wasn't contributing anything to the value of $1 after the match.

        -- Don.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]