Mercurial > emacs
changeset 111325:9aff83bb4de1
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Handle __DATA__ and __END__.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 02 Nov 2010 22:30:12 -0400 |
parents | ab83881bb97a |
children | 0b85687890f8 |
files | lisp/ChangeLog lisp/progmodes/perl-mode.el |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Nov 03 01:06:33 2010 +0000 +++ b/lisp/ChangeLog Tue Nov 02 22:30:12 2010 -0400 @@ -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
--- a/lisp/progmodes/perl-mode.el Wed Nov 03 01:06:33 2010 +0000 +++ b/lisp/progmodes/perl-mode.el Tue Nov 02 22:30:12 2010 -0400 @@ -274,6 +274,11 @@ ;; 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