[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/raku-mode 21af6e8398 224/253: Add comment-style highlighti
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/raku-mode 21af6e8398 224/253: Add comment-style highlighting to POD. |
Date: |
Sat, 29 Jan 2022 08:29:01 -0500 (EST) |
branch: elpa/raku-mode
commit 21af6e839842a1be67db3141ae23fc3f1cb7961d
Author: Tim Van den Langenbergh <tmt_vdl@gmx.com>
Commit: Tim Van den Langenbergh <tmt_vdl@gmx.com>
Add comment-style highlighting to POD.
Fixes #24.
---
raku-font-lock.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/raku-font-lock.el b/raku-font-lock.el
index 65f17c392b..b39ff7bb4d 100644
--- a/raku-font-lock.el
+++ b/raku-font-lock.el
@@ -372,6 +372,17 @@ opening delimiter."
(put-text-property (1- (point)) (point)
'syntax-table (string-to-syntax ">")))))
+(defun raku-syntax-propertize-pod (limit)
+ "Add syntax properties to POD."
+ (let ((pod-beg (- (point) (length "=begin pod"))))
+ (put-text-property pod-beg (1+ pod-beg)
+ 'syntax-table (string-to-syntax "<"))
+ (if (re-search-forward "=end pod" limit 'noerror)
+ (let ((pod-end (point)))
+ (put-text-property pod-beg pod-end 'syntax-multiline t)
+ (put-text-property (1- pod-end) pod-end
+ 'syntax-table (string-to-syntax ">"))))))
+
(defun raku-syntax-propertize-angles (open-angles)
"Add syntax properties to angle-bracketed quotes (e.g. <foo> and «bar»).
@@ -434,6 +445,9 @@ Takes arguments START and END which delimit the region to
propertize."
;; comments
((rx "#")
(0 (ignore (raku-syntax-propertize-comment end))))
+ ;; pod
+ ((rx "=begin pod")
+ (0 (ignore (raku-syntax-propertize-pod end))))
;; postfix hyper operators
((raku-rx (or identifier "]" ")") (group (or "»" ">>")))
(0 nil))
- [nongnu] elpa/raku-mode c0b40f2ad5 140/253: Correctly highlight custom sub/grammar/etc names that clash with keywords, (continued)
- [nongnu] elpa/raku-mode c0b40f2ad5 140/253: Correctly highlight custom sub/grammar/etc names that clash with keywords, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 89d6145859 149/253: use proper name for a multi sub or method, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode a594f53e09 141/253: Highlight with/orwith/without, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode a0cd586520 170/253: Following this advice http://stackoverflow.com/questions/26108655/error-updating-emacs-packages-failed-to-download-gnu-archive, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 4a018be623 172/253: Adds BagHash to check again, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 992d8af9de 164/253: add test for private methods, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 27b90214e3 211/253: Auto insert skeletons., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 04f458529e 206/253: Rename perl6 -> raku in test files, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode ed816f0ce3 214/253: Add a new item, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 0968a528bb 216/253: Fix wrong slashes., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 21af6e8398 224/253: Add comment-style highlighting to POD.,
ELPA Syncer <=
- [nongnu] elpa/raku-mode 9fa9e3968e 091/253: pcase is more straightforward than let+cond here, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode aa5078f9cc 112/253: Mention test suite in README.md, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 299099e246 102/253: Simplify variable fontification, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 8ecc3daa40 113/253: Expand comment, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 6d4ef1743a 118/253: More robust comment highlighting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 07b36e8506 114/253: Amend comment about magic-mode-alist a bit, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 730155c851 103/253: Apply prefix syntax property to sigils and twigils, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 2b5f69ade1 094/253: Fix highlighting of some non-alphanumberic RSXZ metaops, like C«R<», ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode cf09f024a3 099/253: Support some unicode quote delimiters, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 87fdf3d563 085/253: Highlight numbered match variables ($1, $2, ...), ELPA Syncer, 2022/01/29