[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/raku-mode 3cf62b8383 002/253: Only check if .t/.pl/.pm fil
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/raku-mode 3cf62b8383 002/253: Only check if .t/.pl/.pm files contain Perl 6 code |
Date: |
Sat, 29 Jan 2022 08:28:34 -0500 (EST) |
branch: elpa/raku-mode
commit 3cf62b8383e3a3d77516c70725ad6d49bbf9d0d9
Author: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Commit: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Only check if .t/.pl/.pm files contain Perl 6 code
Also fixed it to not match "usev6".
---
perl6-mode.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/perl6-mode.el b/perl6-mode.el
index e6c36e8c46..1840e7a451 100644
--- a/perl6-mode.el
+++ b/perl6-mode.el
@@ -58,8 +58,15 @@
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.p[lm]?6\\'" . perl6-mode))
+(defvar perl6--content-pattern
+ "^ *\\(?:use +v6\\|\\(?:\\(?:my\\|our\\)
+\\)?\\(?:module\\|class\\|role\\|grammar\\)\\)")
+
;;;###autoload
-(add-to-list 'magic-mode-alist '("^ *\\(?:use *v6\\|\\(?:\\(?:my\\|our\\)
+\\)?\\(?:module\\|class\\|role\\|grammar\\)\\)" . perl6-mode))
+(add-to-list 'magic-mode-alist '((lambda ()
+ (and
+ (and (stringp buffer-file-name)
+ (string-match
"\\.\\(?:t\\|p[lm]\\)\\'" buffer-file-name))
+ (re-search-forward perl6--content-pattern
4096 t))) . perl6-mode))
(provide 'perl6-mode)
- [nongnu] elpa/raku-mode 43fd562825 227/253: Merge pull request #36 from matiaslina/dont-highlight-operators-in-variables, (continued)
- [nongnu] elpa/raku-mode 43fd562825 227/253: Merge pull request #36 from matiaslina/dont-highlight-operators-in-variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 5f885f4961 177/253: There's no need to install this, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode f6dcbaf9a4 190/253: Add raku exec path to customization group, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 3d43b91d82 209/253: Add syntax highlighting to REPL., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e0639c89a3 230/253: Merge pull request #35 from tmtvl/24-highlight-pod-the-same-as-comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 4ed7c06294 200/253: also detect '.rakutest' extension, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode b6a5535e27 219/253: Merge pull request #29 from tmtvl/auto-insert-skeletons, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 8a6e17f174 234/253: Merge pull request #41 from anquegi/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 6fa383e25f 003/253: More robust magic matching of Perl 6 code, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode ce3ef00b82 026/253: Syntax propertize <quoted words>, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 3cf62b8383 002/253: Only check if .t/.pl/.pm files contain Perl 6 code,
ELPA Syncer <=
- [nongnu] elpa/raku-mode 1b0698744b 015/253: Move Perl 6 detection into perl6-detect.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 2f3b6f5eec 039/253: Remvoe superfluous space, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 1a7cb03101 050/253: Slight change in wording, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 4b8f5150d6 063/253: Break line in two, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 44c6e42d56 044/253: Highlight basic punctuation/match variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode eb32e01386 045/253: Correctly highilight version literal ranges, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode d2dfe7031c 073/253: Don't apply punctuation syntax to all set operators, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e7e04422d0 052/253: Don't bug me with email notifications, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 4ec31b6904 070/253: Highlight number literals with an explicit base, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode a01e71cde7 081/253: Avoid highlighting numbers and type constraints in strings/comments, ELPA Syncer, 2022/01/29