[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] Re: [AUCTeX-diffs] Changes to auctex/toolbar-x.el
From: |
David Kastrup |
Subject: |
[AUCTeX-devel] Re: [AUCTeX-diffs] Changes to auctex/toolbar-x.el |
Date: |
Thu, 20 Oct 2005 21:27:53 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Reiner Steib <address@hidden> writes:
> +(defun toolbarx-find-image (name)
> + "Return an image object from image on NAME, a string.
> +In Emacs, return a image descriptor from NAME and in XEmacs,
> +return a glyph.
>
> +Usually it should NAME does not contain a directory or an
> +extension. If the extension is omitted, `xpm', `xbm' and `pbm'
> +are tried. If the directory is omitted, `toolbarx-image-path' is
> +searched."
> + ;; `find-image' in Emacs 21 looks in `load-path' and `data-directory'. In
> + ;; Emacs 22, we have `image-load-path' which includes `load-path' and
> + ;; `data-directory'.
> + ;;
> + ;; If there's some API in XEmacs to find the images, we should use it
> + ;; instead of locate-library.
> + (or (when (fboundp 'find-image)
> + (let ((load-path toolbarx-image-path))
> + ;; We promised to consider toolbarx-image-path.
> + (find-image `((:type xpm :file ,(concat name ".xpm"))
> + (:type xbm :file ,(concat name ".xbm"))
> + (:type pbm :file ,(concat name ".pbm"))))))
> + ;; The following is for XEmacs and "name" _with_ extension. I doubt
> + ;; that the latter is useful, but the doc string says so.
find-image is an autoloaded Lisp function in `image'.
(find-image SPECS)
Find an image, choosing one of a list of image specifications.
And just _how_ is this autoloaded Lisp function going to be found when
load-path gets pointed elsewhere?
Reiner, please don't replace one hack with an even more ugly and
dangerous one. I propose that toolbarx-find-image just uses its old
method (but let us remove data-directory from toolbarx-image-path).
Only when that fails, does it call find-image.
That is reasonably clean and efficient, and it only depends on
find-image working.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- [AUCTeX-devel] Re: [AUCTeX-diffs] Changes to auctex/toolbar-x.el,
David Kastrup <=