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

    Fix CI compilation failures across Emacs versions
    
    - Rename cl-loop variable `int` to `interval` and wrap in
      `with-suppressed-warnings` to fix free variable warning 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.
---
 .github/workflows/test.yml |  1 +
 adoc-mode.el               | 21 +++++++++++----------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b03361a00a..fd52868b9a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,6 +12,7 @@ jobs:
     continue-on-error: ${{matrix.emacs_version == 'snapshot'}}
 
     strategy:
+      fail-fast: false
       matrix:
         # Earliest supported + latest in each stable branch + snapshot.
         emacs_version: ['28.1', '29.1', '30.1', 'snapshot']
diff --git a/adoc-mode.el b/adoc-mode.el
index 25c1de1285..b23eaa4386 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -2050,14 +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)
-          (cl-loop for int being the intervals property 'face
-                   for pos = (car int)
-                   for next = (cdr int)
-                   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)))
+          (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))))
         (set-buffer-modified-p modified)))))
 
 (defconst adoc-code-block-begin-regexp
@@ -3183,7 +3184,7 @@ LOCATION can be a buffer position like `point'
 or an event.  It defaults to \\(point)."
   (interactive "d")
   (adoc-with-point-at-event location
-    (when-let ((link (adoc-image-link-at location)))
+    (when-let* ((link (adoc-image-link-at location)))
       (adoc-create-image-overlay
        (adoc-image-link-uri link)
        (adoc-image-link-begin link)
@@ -3206,7 +3207,7 @@ If FLUSH is non-nil also flush the cache for this image."
   (adoc-with-point-at-event location
     (let ((ov (adoc-image-overlay-at location)))
       (when ov
-        (when-let ((image (and flush (overlay-get ov 'display)))
+        (when-let* ((image (and flush (overlay-get ov 'display)))
                    ((imagep image)))
           (image-flush image))
         (delete-overlay ov)))))

Reply via email to