]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/gnugo/gnugo-imgen.el
* packages/gnugo: Add `cl-lib' as dependency; require it and use its names.
[gnu-emacs-elpa] / packages / gnugo / gnugo-imgen.el
index a698583b1666b0e46bc1fecba19b7c8c7a491c20..9e023c3c64df2cd74698f375cad8fbcd99de59db 100644 (file)
@@ -83,7 +83,7 @@ a square position on the board.  A value less than 8 is taken as 8.")
 This uses the TOP and BOTTOM components as returned by
 `window-inside-absolute-pixel-edges' and subtracts twice
 the `frame-char-height' (to leave space for the grid)."
-  (destructuring-bind (L top R bot)
+  (cl-destructuring-bind (L top R bot)
       (window-inside-absolute-pixel-edges)
     (ignore L R)
     (/ (float (- bot top (* 2 (frame-char-height))))
@@ -98,11 +98,11 @@ the `frame-char-height' (to leave space for the grid)."
 (defun gnugo-imgen-create-xpms-1 (square style)
   (let* ((kws (mapcar 'cdr gnugo-imgen-palette))
          (roles (mapcar 'symbol-name kws))
-         (palette (loop
+         (palette (cl-loop
                    for px in (mapcar 'car gnugo-imgen-palette)
                    for role in roles
                    collect (cons px (format "s %s" role))))
-         (resolved (loop
+         (resolved (cl-loop
                     with parms = (copy-sequence style)
                     for role in roles
                     for kw in kws
@@ -136,7 +136,7 @@ the `frame-char-height' (to leave space for the grid)."
                       (dolist (coord ls)
                         (apply 'xpm-put-points px coord))))
       ;; background
-      (loop for place from 1 to 9
+      (cl-loop for place from 1 to 9
             for parts
             in (cl-flet*
                    ((vline (x y1 y2)  (list (list x (cons y1 y2))))
@@ -158,7 +158,7 @@ the `frame-char-height' (to leave space for the grid)."
       (cl-flet
           ((circ (radius)
                  (xpm-m2z-circle half half radius)))
-        (loop with stone = (circ (truncate half))
+        (cl-loop with stone = (circ (truncate half))
               with minim = (circ (/ square 9))
               for n below 4
               do (aset foreground n
@@ -194,7 +194,7 @@ the `frame-char-height' (to leave space for the grid)."
            (xpm-m2z-ellipse half half 4 4.5)
            ?. t)
           (ok 5 'hoshi 'xpm-finish))
-        (loop
+        (cl-loop
          for place from 1 to 9
          for decor in (let ((friends (cons half-m1 half-p1)))
                         (nine-from-four (list friends       0)
@@ -206,7 +206,7 @@ the `frame-char-height' (to leave space for the grid)."
          do (cl-flet
                 ((decorate (px)
                            (mput-points px decor)))
-              (loop for n below 4
+              (cl-loop for n below 4
                     for type in '(bmoku bpmoku wmoku wpmoku)
                     do (with-current-buffer (aref foreground n)
                          (decorate ?.)