[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 3d2ab81750 041/199: new style font lock for xref
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 3d2ab81750 041/199: new style font lock for xref inline macro |
Date: |
Sun, 3 Sep 2023 06:59:32 -0400 (EDT) |
branch: elpa/adoc-mode
commit 3d2ab8175015ba0926c1f37141e0bc7d05db8bfd
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
new style font lock for xref inline macro
---
adoc-mode-test.el | 9 +++++++++
adoc-mode.el | 13 +++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index fcd84290cb..e94641a626 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -161,6 +161,15 @@
" ipsum\n" 'no-face
))
+(ert-deftest adoctest-test-references ()
+ (adoctest-faces "references"
+ "lorem " 'no-face "xref" markup-command-face ":" markup-meta-face
+ "foo" markup-reference-face "[]" markup-meta-face "\n" nil
+ "lorem " 'no-face "xref" markup-command-face ":" markup-meta-face
+ "foo" markup-internal-reference-face "[" markup-meta-face
+ "bla bli bla blu" markup-reference-face "]" markup-meta-face "\n" nil
+ ))
+
(ert-deftest adoctest-test-images ()
(adoctest-faces "images"
;; block macros
diff --git a/adoc-mode.el b/adoc-mode.el
index 00baff0489..bc9bd785f9 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1049,9 +1049,9 @@ When LITERAL-P is non-nil, the contained text is literal
text."
`(1 '(face ,(or cmd-face markup-command-face) adoc-reserved t) t)
'(2 '(face markup-meta-face adoc-reserved t) t) ; :
`(3 ,(cond ((not target-faces) markup-meta-face)
- ((listp target-faces) '(if (string= (match-string 5) "")
- (car target-faces)
- (cadr target-faces)))
+ ((listp target-faces) `(if (string= (match-string 5) "")
+ ,(car target-faces)
+ ,(cadr target-faces)))
(t target-faces))
,(if target-meta-p t 'append))
'(4 '(face markup-meta-face adoc-reserved t) t) ; [
@@ -1481,9 +1481,10 @@ When LITERAL-P is non-nil, the contained text is literal
text."
;; Macros using default syntax, but having special highlighting in adoc-mode
(adoc-kw-inline-macro "anchor" nil markup-anchor-face t '("xreflabel"))
- (adoc-kw-inline-macro "image" markup-complex-replacement-face
markup-internal-reference-face t '("alt"))
- ;; (adoc-kw-inline-macro "xref" nil markup-internal-reference-face t
- ;; '(("alt") (("" . )))
+ (adoc-kw-inline-macro "image" markup-complex-replacement-face
markup-internal-reference-face t
+ '("alt"))
+ (adoc-kw-inline-macro "xref" nil '(markup-reference-face
markup-internal-reference-face) t
+ '(("caption") (("caption" . markup-reference-face))))
;; (list "\\b\\(xref:\\)\\([^
\t\n]*?\\)\\(\\[\\)\\(.*?\\)\\(,.*?\\)?\\(\\]\\)"
;; '(1 adoc-hide-delimiter) '(2 adoc-delimiter) '(3
adoc-hide-delimiter) '(4 adoc-reference) '(5 adoc-delimiter nil t) '(6
adoc-hide-delimiter))
- [nongnu] elpa/adoc-mode ead05da007 014/199: split up the current big test into smaller ones, (continued)
- [nongnu] elpa/adoc-mode ead05da007 014/199: split up the current big test into smaller ones, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode f519baf304 022/199: addef *.elc files to .gitignore, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 886497d6a6 023/199: added a few medium complex tests for (un)constrained quotes, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b65c7fcb92 026/199: block title now fits into the new concept, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 0f7619cfce 027/199: enheanced inline-subst-boundaries test, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b8e8574afa 038/199: introduced adoc-attribute-face-alist, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode e03d63e0b3 039/199: extened anchors unittest and fixed revealed bug, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6ccb9d6de5 009/199: intermediate checkin - to be removed, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode ce247928ec 021/199: added test for byte-compile-file without errors, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 105519ce37 033/199: changed image fontification without tests, added tests for attribute lists, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3d2ab81750 041/199: new style font lock for xref inline macro,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 9c404a4e2d 042/199: test2, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2756c62d86 043/199: revert test2, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode d4a57c5c03 045/199: cleaned up file comments a bit, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 97602c1577 046/199: fixed important typo, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 7b0009904e 047/199: updated URL and copyright date, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a08c7f26cc 053/199: bugfixes for promote / denote title, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 504d490785 055/199: test: running the test is now more smoothly, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fb170735f8 056/199: bugfixes and new tests for promote/denote/toggle title, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 4e13247892 058/199: test: added test for adjust-title-del, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 73b790fcf2 064/199: Merge branch 'develop', ELPA Syncer, 2023/09/03