unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
Subject: valid_image_p doesn't load image libraries
Date: Thu, 26 May 2005 13:22:50 +0200	[thread overview]
Message-ID: <f7ccd24b05052604227c94ce7a@mail.gmail.com> (raw)

On image dynamic-loading environments (AKA Windows), when the first
function to try to use an image type is a C primitive and not Lisp
code (for example, image-size), the corresponding image library is not
loaded.

The reason is that these functions call valid_image_p(), which in turn
calls lookup_image_type(), which does:

  if (NILP (Finit_image_library (symbol, Qnil)))
     return 0;

Now, init-image-library's second argument nil does not mean "use the
default library alist" (the variable `image-library-alist'), but "use
a null library alist", so the above call will always return nil unless
the library corresponding to the given image type is already loaded.

Now, assuming that lookup_image_type is the right place to load the
library, there's two possible answers:

  - passing `image-library-alist' to the call in lookup_image_type()
  - changing the spec of init-image-library so second arg nil means
"load from the default library alist".

Both of them require `image-library-alist', which is currently defined
on image.el, to be moved to C code.

Objections? Suggestions? Comments?

-- 
                    /L/e/k/t/u

                 reply	other threads:[~2005-05-26 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=f7ccd24b05052604227c94ce7a@mail.gmail.com \
    --to=lekktu@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).