[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/raku-mode a01e71cde7 081/253: Avoid highlighting numbers a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/raku-mode a01e71cde7 081/253: Avoid highlighting numbers and type constraints in strings/comments |
Date: |
Sat, 29 Jan 2022 08:28:44 -0500 (EST) |
branch: elpa/raku-mode
commit a01e71cde720e2e2575a37e0f126cfeb5d732e10
Author: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Commit: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Avoid highlighting numbers and type constraints in strings/comments
---
perl6-font-lock.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/perl6-font-lock.el b/perl6-font-lock.el
index 7b801951c3..8c0c446517 100644
--- a/perl6-font-lock.el
+++ b/perl6-font-lock.el
@@ -435,8 +435,13 @@ GROUPS is allowed to reference optional match groups."
(let ((group-num (car group))
(group-face (cdr group)))
(when (match-string group-num)
- (put-text-property (match-beginning group-num) (match-end group-num)
- 'face group-face)))))
+ (let* ((state (save-excursion
+ (syntax-ppss (match-beginning group-num))))
+ (in-string (nth 3 state))
+ (in-comment (nth 4 state)))
+ (unless (or in-string in-comment)
+ (put-text-property (match-beginning group-num) (match-end
group-num)
+ 'face group-face)))))))
(defun perl6-match-property (property context limit)
(when (symbolp context)
- [nongnu] elpa/raku-mode 3cf62b8383 002/253: Only check if .t/.pl/.pm files contain Perl 6 code, (continued)
- [nongnu] elpa/raku-mode 3cf62b8383 002/253: Only check if .t/.pl/.pm files contain Perl 6 code, ELPA Syncer, 2022/01/29
- [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 <=
- [nongnu] elpa/raku-mode b7f95283e2 115/253: Remove redundant reduce operator highlighting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode d33d36e085 165/253: add test for nqp, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 1872efb95a 107/253: Highlight hyper operators, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 1fb8435db1 028/253: Highlight variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode a82a14ceb2 019/253: Better doc string for perl6-magic-matcher, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 023eb3227b 007/253: Nullify case-fold-search for the entire function body, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 488f3386fe 020/253: Small README fix, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 09663a722d 048/253: Follow http://keepachangelog.com/, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 8fd6683e06 041/253: defvar -> defconst, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode c0978dcf65 054/253: Suggest (package-refresh-contents) since this package is new, ELPA Syncer, 2022/01/29