branch: elpa/adoc-mode
commit ecc252f47489b4be3f2d59ad77e6607a267da6de
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Fix font-lock keyword construction for lexical binding correctness
    
    In adoc-kw-inline-macro, three lines used plain quote '(...) instead
    of backquote `(...) around forms containing ,textprops, so the comma
    splice was never evaluated. Change ' to ` so textprops is properly
    substituted.
    
    In adoc-kw-delimited-block, the plist had a duplicate face key
    (face text-face face adoc-verbatim-face ...) where the second face
    was dead code. Remove the duplicate entry.
---
 CHANGELOG.md | 2 ++
 adoc-mode.el | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d4f839d0d..5165c15af5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,8 @@
 - [#49](https://github.com/bbatsov/adoc-mode/issues/49): Prevent Flyspell from 
generating overlays for links and alike.
 - Fix `outline-level` calculation for headings with extra whitespace after `=`.
 - Fix forced line break (`+`) highlighting inside reserved regions.
+- Fix backquote/comma usage in `adoc-kw-inline-macro` so `textprops` is 
properly substituted.
+- Fix duplicate `face` key in `adoc-kw-delimited-block` plist.
 
 ## 0.7.0 (2023-03-09)
 
diff --git a/adoc-mode.el b/adoc-mode.el
index b3c40e425c..b5ab2ea05b 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1765,7 +1765,7 @@ Concerning TYPE, LEVEL and SUB-TYPE see `adoc-re-llisti'."
    '(0 '(face nil font-lock-multiline t) t)
    '(1 '(face adoc-meta-hide-face adoc-reserved block-del) t)
    (if (not inhibit-text-reserved)
-       `(2 '(face ,text-face face adoc-verbatim-face adoc-reserved t) t t)
+       `(2 '(face ,text-face adoc-reserved t) t t)
      `(2 ,text-face t t))
    '(3 '(face adoc-meta-hide-face adoc-reserved block-del) t)))
 
@@ -1838,7 +1838,7 @@ TEXTPROPS is an additional plist with textproperties."
    `(lambda (end) (adoc-kwf-std end ,(adoc-re-inline-macro cmd-name nil 
unconstrained attribute-list-constraints) '(1 2 4 5) '(0)))
    `(0 '(face nil . ,textprops) t)
    `(1 '(face ,(or cmd-face adoc-command-face) adoc-reserved t 
adoc-flyspell-ignore t) t) ; cmd-name
-   '(2 '(face adoc-meta-face adoc-reserved t . ,textprops) t)                  
 ; :
+   `(2 '(face adoc-meta-face adoc-reserved t . ,textprops) t)                  
 ; :
    `(3 (list 'face
              ,(cond
                ((not target-faces) adoc-meta-face)                      ; 
target
@@ -1849,9 +1849,9 @@ TEXTPROPS is an additional plist with textproperties."
                (t target-faces))
              'adoc-flyspell-ignore t)
        ,(if target-meta-p t 'append))
-   '(4 '(face adoc-meta-face adoc-reserved t . ,textprops) t) ; [
+   `(4 '(face adoc-meta-face adoc-reserved t . ,textprops) t) ; [
    `(5 '(face adoc-meta-face adoc-attribute-list ,(or attribute-list t) . 
,textprops) t)
-   '(6 '(face adoc-meta-face adoc-reserved t . ,textprops) t))) ; ]
+   `(6 '(face adoc-meta-face adoc-reserved t . ,textprops) t))) ; ]
 
 ;; largely copied from adoc-kw-inline-macro
 ;; TODO: output text should be affected by quotes & co, e.g. bold, emph, ...

Reply via email to