GNU bug report logs - #8640
24.0.50; no pbm support on cygwin

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Mon, 9 May 2011 01:48:02 UTC

Severity: normal

Found in version 24.0.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 8640 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 8640 <at> debbugs.gnu.org
Subject: Re: bug#8640: 24.0.50; no pbm support on cygwin
Date: Mon, 9 May 2011 12:54:49 +0200
> pbm image is not available in Emacs trunk built on cygwin at least
> after May 6: (image-type-available-p 'pbm) => nil
> Whereas png, jpeg, gif, xpm, etc. are all ok.

xbm is not available either. And of course is not cygwin-specific.

> I guess this is due
> to the recent changes in image.c.

Yes.

> Any hint?

More than a hint. I moved the library cache variable to w32 code,
turned CACHE_IMAGE_TYPE into a noop on non-Windows, and removed the
check on init-image-library. But I overlook the fact that the
predefined image types rely on being marked in the library cache as
available. That's because `image-type-available-p' always goes through
`init-image-library'.

Now, the fix is simple (the patch below fixes the problem), but we
should think whether it is cleaner to restore the library-cache to a
non-Windows specific code, or mark the only two predefined image types
in any other way, as the code below does. It's a bit ad-hoc, but
having the image types in the library cache, when they are not, in
fact, loaded from a library, is also a bit ugly.

Opinions and comments anyone?

    Juanma



=== modified file 'src/image.c'
--- src/image.c	2011-05-06 06:30:56 +0000
+++ src/image.c	2011-05-09 10:53:21 +0000
@@ -8602,6 +8602,11 @@
 of `dynamic-library-alist', which see).  */)
   (Lisp_Object type, Lisp_Object libraries)
 {
+
+  /* Types pbm and xbm are predefined and always available.  */
+  if (EQ (type, Qpbm) || EQ (type, Qxbm))
+    return Qt;
+
 #ifdef HAVE_NTGUI
   /* Don't try to reload the library.  */
   Lisp_Object tested = Fassq (type, Vlibrary_cache);




This bug report was last modified 14 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.