Ulrich Mueller | 15 Jul 01:29 2012
Picon

ProofGeneral 4.1 byte-compilation fails if image-load-path is not defined

Forwarding downstream bug: <https://bugs.gentoo.org/426646>

Byte-compilation of ProofGeneral fails if Emacs was configured with
option --without-x, because image-load-path is not defined in this
case:

   emacs --batch --no-site-file -q -eval '(setq load-path (append (mapcar (lambda (d) (concat
"/tmp/portage/app-emacs/proofgeneral-4.1/work/ProofGeneral-4.1/" (symbol-name d))) (quote
(acl2 ccc coq hol98 isar lego pgshell phox generic lib ))) load-path))' -eval '(progn (require (quote
bytecomp)) (require (quote mouse)) (require (quote tool-bar)) (require (quote fontset)) (setq
byte-compile-warnings (remove (quote cl-functions) (remove (quote noruntime)
byte-compile-warning-types))) (setq byte-compile-error-on-warn t))' -f batch-byte-compile generic/proof-toolbar.el

   In toplevel form:
   generic/proof-toolbar.el:106:21:Error: assignment to free variable `image-load-path'
   make[1]: *** [generic/proof-toolbar.elc] Error 1
   make[1]: Leaving directory `/tmp/portage/app-emacs/proofgeneral-4.1/work/ProofGeneral-4.1'
   make: *** [compile] Error 2

Below I include a patch that should fix the problem.

Ulrich

--- ProofGeneral-orig/generic/proof-toolbar.el
+++ ProofGeneral/generic/proof-toolbar.el
 <at>  <at>  -103,7 +103,8  <at>  <at> 
   (when (proof-toolbar-available-p)
     (unless proof-toolbar-map
       (setq proof-toolbar-map (make-sparse-keymap))
-      (add-to-list 'image-load-path proof-images-directory) ; rude?
+      (if (boundp 'image-load-path)
+	  (add-to-list 'image-load-path proof-images-directory)) ; rude?
       (mapc 'proof-toolbar-make-icon (proof-ass toolbar-entries))
       (proof-toolbar-make-toolbar-items proof-toolbar-map
 					(proof-ass toolbar-entries)))

Gmane