From 7551e2199a7eb05a4968fdd6f4d599d42ad520ab Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Fri, 6 Nov 1998 15:50:03 +0000 Subject: (Failed) Attempt to recognize XEmacs with broken jpeg support --- generic/proof-splash.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/generic/proof-splash.el b/generic/proof-splash.el index 80b03432..d628ed2a 100644 --- a/generic/proof-splash.el +++ b/generic/proof-splash.el @@ -22,10 +22,16 @@ Different formats are chosen from according to what can be displayed. Unless NOJPEG is set, try jpeg first. Then try gif. Gif filename depends on colour depth of display." + (let ((jpg (vector 'jpeg :file + (concat proof-images-directory name ".jpg")))) (cond - ((and window-system (featurep 'jpeg) (not nojpeg)) - (vector 'jpeg :file - (concat proof-images-directory name ".jpg"))) + ((and window-system (featurep 'jpeg) (not nojpeg) + ;; Actually, jpeg can fail even if it is compiled in. + ;; FIXME: this test doesn't work, though: still gives + ;; t when visiting the file displays failure message. + ;; What's the correct test? + (valid-instantiator-p jpg 'image)) + jpg) ((and window-system (featurep 'gif)) (vector 'gif :file (concat proof-images-directory @@ -37,7 +43,7 @@ Gif filename depends on colour depth of display." ;; Low colour gif for poor displays ".8bit.gif"))))) (t - (concat "[ image " name " ]")))) + (concat "[ image " name " ]"))))) (defcustom proof-splash-inhibit nil -- cgit v1.2.3