all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: 8640@debbugs.gnu.org
Subject: bug#8640: 24.0.50; no pbm support on cygwin
Date: Mon, 9 May 2011 12:54:49 +0200	[thread overview]
Message-ID: <BANLkTimod+zVLV01w+oUmGwoyuy8dcxfTA@mail.gmail.com> (raw)
In-Reply-To: <b4mhb94hchj.fsf@jpl.org>

> 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);





  reply	other threads:[~2011-05-09 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09  1:46 bug#8640: 24.0.50; no pbm support on cygwin Katsumi Yamaoka
2011-05-09 10:54 ` Juanma Barranquero [this message]
2011-05-10  8:44   ` Katsumi Yamaoka
2011-05-10 10:33     ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimod+zVLV01w+oUmGwoyuy8dcxfTA@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=8640@debbugs.gnu.org \
    --cc=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.