]> code.delx.au - gnu-emacs/blobdiff - lisp/image.el
* cedet/ede/makefile-edit.el (makefile-beginning-of-command)
[gnu-emacs] / lisp / image.el
index 2633ff283100541b847ab4afe8fd924f6e15a8f5..e2f4977ed107c68e45a5d09854845b6eada12430 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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
     ("\\`P[1-6][[:space:]]+\\(?:#.*[[:space:]]+\\)*[0-9]+[[:space:]]+[0-9]+" . pbm)
     ("\\`GIF8[79]a" . gif)
     ("\\`\x89PNG\r\n\x1a\n" . png)
-    ("\\`[\t\n\r ]*#define \\([a-z0-9]+\\)_width [0-9]+\n\
-#define \\1_height [0-9]+\n\
-static char \\1_bits" . xbm)
+    ("\\`[\t\n\r ]*#define \\([a-z0-9_]+\\)_width [0-9]+\n\
+#define \\1_height [0-9]+\n\\(\
+#define \\1_x_hot [0-9]+\n\
+#define \\1_y_hot [0-9]+\n\\)?\
+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]*<"
@@ -96,18 +98,17 @@ AUTODETECT can be
  - 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)
@@ -121,11 +122,11 @@ in \"`data-directory'/images\".
 
 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
@@ -453,7 +454,7 @@ AREA is where to display the image.  AREA nil or omitted means
 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))