]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 3 Nov 2010 02:30:12 +0000 (22:30 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 3 Nov 2010 02:30:12 +0000 (22:30 -0400)
Handle __DATA__ and __END__.

lisp/ChangeLog
lisp/progmodes/perl-mode.el

index c5d8bfae7a7533832db2b1d3bf92afa5c94f8fbe..4cb8061e71ee02d62e55f8fd28ec2d9ed3906df9 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/perl-mode.el (perl-syntax-propertize-function):
+       Handle __DATA__ and __END__.
+
 2010-11-02  Noah Friedman  <friedman@splode.com>
 
        * emacs-lisp/bytecomp.el (byte-recompile-file): If bytecomp-arg is
index ae3acc3cda36ec41837ea7fe66ffc95bc8ac4ce5..1bc9a397bc75a07fa81065c301a5c76152b01bf7 100644 (file)
@@ -274,6 +274,11 @@ The expansion is entirely correct because it uses the C preprocessor."
       ;; Be careful not to match "sub { (...) ... }".
       ("\\<sub\\(?:[[:space:]]+[^{}[:punct:][:space:]]+\\)?[[:space:]]*(\\([^)]+\\))"
        (1 "."))
+      ;; Turn __DATA__ trailer into a comment.
+      ("^\\(_\\)_\\(?:DATA\\|END\\)__[ \t]*\\(?:\\(\n\\)#.-\\*-.*perl.*-\\*-\\|\n.*\\)"
+       (1 "< c") (2 "> c")
+       (0 (ignore (put-text-property (match-beginning 0) (match-end 0)
+                                     'syntax-multiline t))))
       ;; Regexp and funny quotes.  Distinguishing a / that starts a regexp
       ;; match from the division operator is ...interesting.
       ;; Basically, / is a regexp match if it's preceded by an infix operator