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))))
(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
(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))))
(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
(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)
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 ?.)