[patch] make-theme.jl

The compiler warnings for make-theme.jl appear to have been caused by
the compiler becoming confused as to which version of the funcion
'make-image to call.  'make-image is defined in images.c, which is
opened in make-theme.  There is then an inner define call in make-theme that re-defines
make-image to check the image cache in case the image has already been
used, and if not call the original 'make-image from images.c using
gaol.  Apparenetly, having the multiply defined 'make-images was causing
problems, so re-naming the re-defined make-image and calling that name
instead where the compilation warning occurs fixes the problem, with no
noticable side-effects from the theme maker...


Matthew Love

diff --git a/lisp/sawfish/wm/theming/make-theme.jl b/lisp/sawfish/wm/theming/make-theme.jl
index fc8acbe..87b846e 100644
--- a/lisp/sawfish/wm/theming/make-theme.jl
+++ b/lisp/sawfish/wm/theming/make-theme.jl
@@ -35,10 +35,9 @@
   (define (make-frames patterns-alist frame-alist)
     (let ((image-cache '()))
-      (define (make-image file)
+      (define (make-image-possibly-from-cache file)
 	(or (cdr (assoc file image-cache))
-	    (let
-		((img (gaol-eval `(make-image ',file))))
+	    (let ((img (gaol-eval `(make-image ',file))))
 	      (setq image-cache (cons (cons file img) image-cache))
@@ -50,7 +49,7 @@
 			   (setq value (get-color value)))
 			  ((and (consp value) (stringp (car value)))
-			       ((img (make-image (car value))))
+			       ((img (make-image-possibly-from-cache (car value))))
 			     (when img
 			       (mapc (lambda (attr)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]