emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display word wrapping


From: Kim F. Storm
Subject: Re: display word wrapping
Date: 04 Jun 2004 10:07:10 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Juanma Barranquero <address@hidden> writes:

> OK, there goes the complete patch (minus docs, which I'll write when the
> issue is ready to commit) implementing all your proposed changes.
> 
> It works really well.  The only thing that I would add is calling
> `init-image-libraries' from startup, just after loading .emacs.el.  The
> reason is that, without this, image-types contains on startup just xbm
> and pbm, because the other libraries haven't been yet loaded (unless the
> user calls init-image-libraries explicitly on his .emacs.el), even if
> image-library-alist is correctly set up and the DLLs are available.

You can do that, but in practice, image-types is only used by
image-type-available-p which will do init-image-libraries when needed.

So in fact, image-type-available-p could be implemented like this:

(defun image-type-available-p (type)
  (prog1
     (memq type (init-image-libraries image-library-alist))
     (setq image-library-alist nil)))

supposing that init-image-libraries just returns the current image-types
if image-library-alist is nil (and the updated list otherwise).

And then we could discard the image-types variable alltogether --
except that it is still probably good for debugging/error reporting
purposes.

> Last question (for now). As init-image-libraries needs to return
> something, I've done it return Vimage_types instead of Qnil, so the
> caller can see at once whether the list of supported image types has
> changed. If OK'ed, I'll add this tiny bit of info to the function's
> docstring.

Do you mean that it returns nil if no changes were made to image-types?
I think that it should just return image-types in all cases.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]