[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/raku-mode 6f3c29a29c 004/253: Add back the filename constr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/raku-mode 6f3c29a29c 004/253: Add back the filename constraint |
Date: |
Sat, 29 Jan 2022 08:28:34 -0500 (EST) |
branch: elpa/raku-mode
commit 6f3c29a29c6442c9e0e97d5acb560152adfefe87
Author: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Commit: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Add back the filename constraint
I accidentally removed it in 6fa383e.
---
perl6-mode.el | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/perl6-mode.el b/perl6-mode.el
index 7ff958a322..8385001aee 100644
--- a/perl6-mode.el
+++ b/perl6-mode.el
@@ -67,19 +67,21 @@
(defun perl6-magic-matcher ()
"Return non-nil if the current buffer is probably a Perl 6 file."
- (let ((case-fold-search nil)
- (keep-going t)
- (found-perl6 nil))
- (while keep-going
- (cond ((looking-at "^ *\\(?:#.*\\)?$")
- nil)
- ((looking-at perl6-magic-pattern)
- (setq keep-going nil
- found-perl6 t))
- (t
- (setq keep-going nil)))
- (beginning-of-line 2))
- found-perl6))
+ (and (and (stringp buffer-file-name)
+ (string-match "\\.\\(?:t\\|p[lm]\\)\\'" buffer-file-name))
+ (let ((case-fold-search nil)
+ (keep-going t)
+ (found-perl6 nil))
+ (while keep-going
+ (cond ((looking-at "^ *\\(?:#.*\\)?$")
+ nil)
+ ((looking-at perl6-magic-pattern)
+ (setq keep-going nil
+ found-perl6 t))
+ (t
+ (setq keep-going nil)))
+ (beginning-of-line 2))
+ found-perl6)))
;;;###autoload
(add-to-list 'magic-mode-alist '(perl6-magic-matcher . perl6-mode))
- [nongnu] elpa/raku-mode cdc3a0de70 086/253: Highlight contexualizers, (continued)
- [nongnu] elpa/raku-mode cdc3a0de70 086/253: Highlight contexualizers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode b1b5cfde21 105/253: Add some comments to perl6-syntax-propertize, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 69666bfb10 084/253: Don't highlight digits in identifiers as numbers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 8f230b887f 152/253: remove user option per syohex's comment, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e7370bed3a 144/253: Fix bug overly eager highlighting of sub/macro/etc, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 298b6bb51c 156/253: add a test file for aiding regex development, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 85ff9ecd0e 205/253: Library rename from perl6-mode to raku-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode f0b6adcb74 239/253: Add hanging hash assignment to smie test file, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 3f33ca3db8 243/253: Merge pull request #48 from RomanHargrave/fix-smie-hanging-indent, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode ef229addc0 250/253: Update CHANGELOG.md, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 6f3c29a29c 004/253: Add back the filename constraint,
ELPA Syncer <=
- [nongnu] elpa/raku-mode 7141debae2 101/253: Highlight ':' twigil, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 33e699c109 087/253: More conservative reduce-operator highlighting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode a2cc73f0d8 130/253: Improve matching of '«' and '<' strings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 86c5f989e2 129/253: Remove redundant code, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode c2105da136 131/253: Better code formatting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e7a19cf759 176/253: Changing back to my repo, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 47cda8e430 163/253: add optional leading bang for private method names, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode bc61245db1 192/253: Better region handling, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 6fc7de3a02 180/253: recognize a "state" variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 977b14a7c1 253/253: Fix flycheck Raku reference, ELPA Syncer, 2022/01/29