;;; image.el --- image API
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: multimedia
static \\(unsigned \\)?char \\1_bits" . xbm)
("\\`\\(?:MM\0\\*\\|II\\*\0\\)" . tiff)
("\\`[\t\n\r ]*%!PS" . postscript)
- ("\\`\xff\xd8" . (image-jpeg-p . jpeg))
+ ("\\`\xff\xd8" . jpeg) ; used to be (image-jpeg-p . jpeg)
(,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
(comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)")))
(concat "\\(?:<\\?xml[ \t\r\n]+[^>]*>\\)?[ \t\r\n]*<"
- maybe auto-detect only if the image type is available
(see `image-type-available-p').")
-(defvar image-load-path nil
+(defcustom image-load-path
+ (list (file-name-as-directory (expand-file-name "images" data-directory))
+ 'data-directory 'load-path)
"List of locations in which to search for image files.
If an element is a string, it defines a directory to search.
If an element is a variable symbol whose value is a string, that
value defines a directory to search.
If an element is a variable symbol whose value is a list, the
-value is used as a list of directories to search.")
-
-(eval-at-startup
- (setq image-load-path
- (list (file-name-as-directory (expand-file-name "images" data-directory))
- 'data-directory 'load-path)))
+value is used as a list of directories to search."
+ :type '(repeat (choice directory variable))
+ :initialize 'custom-initialize-delay)
(defun image-load-path-for-library (library image &optional path no-error)
Then this function returns a list of directories which contains
first the directory in which IMAGE was found, followed by the
-value of `load-path'. If PATH is given, it is used instead of
+value of `load-path'. If PATH is given, it is used instead of
`load-path'.
If NO-ERROR is non-nil and a suitable path can't be found, don't
-signal an error. Instead, return a list of directories as before,
+signal an error. Instead, return a list of directories as before,
except that nil appears in place of the image directory.
Here is an example that uses a common idiom to provide
display it in the text area, a value of `left-margin' means
display it in the left marginal area, a value of `right-margin'
means display it in the right marginal area.
-The image is automatically split into ROW x COLS slices."
+The image is automatically split into ROWS x COLS slices."
(unless string (setq string " "))
(unless (eq (car-safe image) 'image)
(error "Not an image: %s" image))