[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/tuareg a06468c 09/10: Repair handling of ocamldoc section
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/tuareg a06468c 09/10: Repair handling of ocamldoc section headers like {2:text} |
Date: |
Fri, 30 Jul 2021 16:57:28 -0400 (EDT) |
branch: elpa/tuareg
commit a06468cbbc2b26b6c36637da9c728a7da2e0d1f4
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Mattias EngdegÄrd <mattiase@acm.org>
Repair handling of ocamldoc section headers like {2:text}
---
tuareg.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/tuareg.el b/tuareg.el
index 088c91c..e7baa3b 100644
--- a/tuareg.el
+++ b/tuareg.el
@@ -764,12 +764,13 @@ delimiting the region of interest. "
(let ((case-fold-search nil))
(funcall
(tuareg--syntax-rules
- ((rx "[")
+ ((rx (or "[" "{["))
;; Fontify opening bracket.
- (put-text-property start (1+ start) 'face
+ (put-text-property start (point) 'face
'tuareg-font-lock-doc-markup-face)
;; Skip balanced set of brackets.
- (let ((level 1))
+ (let ((start-end (point))
+ (level 1))
(while (and (< (point) end)
(re-search-forward (rx (? "\\") (in "[]"))
end 'noerror)
@@ -785,11 +786,11 @@ delimiting the region of interest. "
(forward-char -1)
nil))
(t t)))))
- (put-text-property (1+ start) (point) 'face
+ (put-text-property start-end (point) 'face
tuareg-font-lock-doc-code-face)
(if (> level 0)
;; Highlight unbalanced opening bracket.
- (put-text-property start (1+ start) 'face
+ (put-text-property start start-end 'face
'tuareg-font-lock-error-face)
;; Fontify closing bracket.
(put-text-property (point) (1+ (point)) 'face
@@ -817,11 +818,11 @@ delimiting the region of interest. "
(goto-char (match-end 0))))
;; Cross-reference.
- ((rx "{!" (? (or "tag" "module" "modtype" "class"
- "classtype" "val" "type"
- "exception" "attribute" "method"
- "section" "const" "recfield")
- ":")
+ ((rx (or "{!" "{{!")
+ (? (or "tag" "module" "modtype" "class" "classtype" "val" "type"
+ "exception" "attribute" "method" "section" "const"
+ "recfield")
+ ":")
(group (* (in "a-zA-Z0-9" "_.'"))))
(put-text-property start (match-beginning group) 'face
'tuareg-font-lock-doc-markup-face)
@@ -847,7 +848,7 @@ delimiting the region of interest. "
(or (or "-" ":" "_" "^"
"b" "i" "e" "C" "L" "R"
"ul" "ol" "%"
- "")
+ "{:")
;; Section header with optional label.
(seq (+ digit)
(? ":"
- [nongnu] elpa/tuareg updated (b59c422 -> 465b61f), ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg 64fada7 01/10: Rewrite `tuareg--error-regexp` in rx, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg b4d09cd 03/10: Remove duplicates from compilation-error-regexp-alist{-alist}, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg 8c8d217 05/10: Simpler matching of ending line and character in compiler message, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg c6c49d4 08/10: Compensate for end-columns in OCaml messages being off by one, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg a06468c 09/10: Repair handling of ocamldoc section headers like {2:text},
ELPA Syncer <=
- [nongnu] elpa/tuareg 465b61f 10/10: Merge commit 'refs/pull/258/head' of github.com:/ocaml/tuareg into elpa/tuareg, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg 00c4cf8 06/10: Match source locations in exception backtraces, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg 0f49e65 02/10: Only fontify known @-tags in doc-markup face, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg aa57258 04/10: Recognise new warning format in compilation output, ELPA Syncer, 2021/07/30
- [nongnu] elpa/tuareg 916c551 07/10: Add ERT test of compilation and backtrace messages, ELPA Syncer, 2021/07/30