branch: elpa/raku-mode commit af61f783777fb9ba2e51f834c76a128b67009b09 Author: Hinrik Örn Sigurðsson <hinrik....@gmail.com> Commit: Hinrik Örn Sigurðsson <hinrik....@gmail.com>
Never look at more than 4k when detecting Perl 6 --- perl6-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl6-mode.el b/perl6-mode.el index 3b9ab84812..9dfe46732c 100644 --- a/perl6-mode.el +++ b/perl6-mode.el @@ -77,14 +77,14 @@ (while keep-going (cond ((eq (point) (point-max)) (setq keep-going nil)) - ((looking-at "^ *\\(?:#.*\\)?$") + ((re-search-forward "^ *\\(?:#.*\\)?$" 4096 'noerror) nil) - ((looking-at perl6-magic-pattern) + ((re-search-forward perl6-magic-pattern 4096 'noerror) (setq keep-going nil found-perl6 t)) (t (setq keep-going nil))) - (beginning-of-line 2)) + (search-forward "\n" 4096 'noerror)) found-perl6)))) ;;;###autoload