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

    Fix CI compilation failures across Emacs versions
    
    - Replace cl-loop `being the intervals` with an explicit loop using
      `next-single-property-change` to avoid free variable warnings that
      `cl-loop` generates on Emacs 28/29.
    - Replace `when-let` with `when-let*` (obsolete as of Emacs 31).
    - Set `fail-fast: false` in CI matrix so all versions run independently.
---
 adoc-mode.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/adoc-mode.el b/adoc-mode.el
index b23eaa4386..b3cd7d8e19 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -2050,15 +2050,15 @@ START-SRC and END-SRC delimit the actual source code."
             (insert string))
           (unless (eq major-mode lang-mode) (funcall lang-mode))
           (font-lock-ensure)
-          (with-suppressed-warnings ((lexical interval))
-            (cl-loop for interval being the intervals property 'face
-                     for pos = (car interval)
-                     for next = (cdr interval)
-                     for val = (get-text-property pos 'face)
-                     when val do
-                     (put-text-property
-                      (+ start-src (1- pos)) (1- (+ start-src next)) 'face
-                      val adoc-buffer))))
+          (let ((pos (point-min)))
+            (while (< pos (point-max))
+              (let ((next (next-single-property-change pos 'face nil 
(point-max)))
+                    (val (get-text-property pos 'face)))
+                (when val
+                  (put-text-property
+                   (+ start-src (1- pos)) (1- (+ start-src next)) 'face
+                   val adoc-buffer))
+                (setq pos next)))))
         (set-buffer-modified-p modified)))))
 
 (defconst adoc-code-block-begin-regexp

Reply via email to