[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/raku-mode 0cf896d274 228/253: Uncomment pod lines starting
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/raku-mode 0cf896d274 228/253: Uncomment pod lines starting with whitespace. |
Date: |
Sat, 29 Jan 2022 08:29:01 -0500 (EST) |
branch: elpa/raku-mode
commit 0cf896d274f6222b5344e54cc9549b670a4811ae
Author: Tim Van den Langenbergh <tmt_vdl@gmx.com>
Commit: Tim Van den Langenbergh <tmt_vdl@gmx.com>
Uncomment pod lines starting with whitespace.
Unless they start with a pod tag.
---
raku-font-lock.el | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/raku-font-lock.el b/raku-font-lock.el
index 880fb30701..6a5e95d0ef 100644
--- a/raku-font-lock.el
+++ b/raku-font-lock.el
@@ -384,6 +384,23 @@ opening delimiter."
'syntax-table (string-to-syntax "<"))
(remove-text-properties code-beg code-end '(syntax-multiline nil)))))
+(defun raku-syntax-propertize-pod-inline-code (limit)
+ "Add syntax properties to inline code blocks in POD."
+ (while (and
+ (re-search-forward "^\s*\n\s+[^\s]" limit t))
+ (backward-char)
+ (unless (looking-at
"=\(begin\|end\|head\|for\|para\|item\|defn\|comment\)")
+ (let ((code-beg (1- (point))))
+ (re-search-forward "^[^\s]" limit t)
+ (when (looking-back "^[^\s]" code-beg)
+ (forward-line -1)
+ (end-of-line))
+ (put-text-property (1- code-beg) code-beg
+ 'syntax-table (string-to-syntax ">"))
+ (put-text-property (point) (1+ (point))
+ 'syntax-table (string-to-syntax "<"))
+ (remove-text-properties code-beg (point) '(syntax-multiline nil))))))
+
(defun raku-syntax-propertize-pod (limit)
"Add syntax properties to POD."
(let ((pod-beg (- (point) (length "=begin pod")))
@@ -396,7 +413,9 @@ opening delimiter."
(put-text-property pod-beg pod-end
'syntax-multiline t)
(goto-char pod-beg)
- (raku-syntax-propertize-pod-code-blocks pod-end))))
+ (raku-syntax-propertize-pod-code-blocks pod-end)
+ (goto-char pod-beg)
+ (raku-syntax-propertize-pod-inline-code pod-end))))
(defun raku-syntax-propertize-angles (open-angles)
"Add syntax properties to angle-bracketed quotes (e.g. <foo> and «bar»).
- [nongnu] elpa/raku-mode 4ee9045eeb 252/253: Bump version to have an update without pkg-info, (continued)
- [nongnu] elpa/raku-mode 4ee9045eeb 252/253: Bump version to have an update without pkg-info, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode d8811251af 244/253: Update changelog for v0.2.0, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 5b47a0b1a2 066/253: Deal with [-'] preceded by a non-ASII identifier character, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode bf7900b286 137/253: Merge pull request #4 from Altai-man/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 07b596cab6 151/253: one more tweak to catch all forms of subs, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode fe2d579dfb 132/253: Indentation fix, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode c353cb2b74 208/253: Add perl6 defalias, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 0aae9be202 213/253: Update the default path for the shebang line per @Altai-man's suggestion., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 460b477ba2 237/253: format README for keybindings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode fff97f7fb0 226/253: Raku variable names have precedence over operators, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 0cf896d274 228/253: Uncomment pod lines starting with whitespace.,
ELPA Syncer <=
- [nongnu] elpa/raku-mode f9016c1d99 233/253: Fix qe comparator highlighting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 095b8666e3 248/253: Bump version for PR #59, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 7496ad3a03 245/253: Merge pull request #49 from matiaslina/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 73c35c089b 241/253: Remove an unnecessary (progn) that I missed., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode eaac071f17 251/253: Correct PR merge date, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 03ade8f04d 071/253: Highlight all other kinds of numbers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 9963ed20da 051/253: Use consistent Markdown headings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e22ed63495 072/253: Indentation change, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 95382a81fb 057/253: Merge pull request #1 from andreoss/indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode cdc3a0de70 086/253: Highlight contexualizers, ELPA Syncer, 2022/01/29