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

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

Re: highlighting for perl acting strange


From: Stefan Monnier
Subject: Re: highlighting for perl acting strange
Date: Wed, 07 Sep 2005 15:55:46 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> emacs-22.0.50 -q --no-site-file NEW_FILE

> M-x perl-mode
> M-x global-font-lock-mode

> add these two lines of perl code to the file edited

> s|/mnts1|/proj1/|g; 
> s|/mnts2|/proj2/|g; 

> Now just add and remove a space at the beginning of each line in
> various combinations. The highlighting for the lines changes back and
> forth between two colors. ( At least for me )

I've installed the patch below which should fix this problem.


        Stefan


--- perl-mode.el        01 sep 2005 10:04:40 -0400      1.60
+++ perl-mode.el        07 sep 2005 15:53:01 -0400      
@@ -267,12 +267,12 @@
     ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
     ;; regexp and funny quotes
     ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7)))
-    ("[?:.,;=!~({[ \t\n]\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)"
+    ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> 
\n\t]\\)"
      ;; Nasty cases:
      ;; /foo/m  $a->m  $#m $m @m %m
      ;; \s (appears often in regexps).
      ;; -s file
-     (2 (if (assoc (char-after (match-beginning 2))
+     (3 (if (assoc (char-after (match-beginning 3))
                   perl-quote-like-pairs)
            '(15) '(7))))
     ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)")




reply via email to

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