emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/raku-mode af61f78377 011/253: Never look at more than 4k w


From: ELPA Syncer
Subject: [nongnu] elpa/raku-mode af61f78377 011/253: Never look at more than 4k when detecting Perl 6
Date: Sat, 29 Jan 2022 08:28:34 -0500 (EST)

branch: elpa/raku-mode
commit af61f783777fb9ba2e51f834c76a128b67009b09
Author: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Commit: Hinrik Örn Sigurðsson <hinrik.sig@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



reply via email to

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