]> code.delx.au - gnu-emacs/blobdiff - lisp/image.el
Documentation string of diary-modify-entry-list-string-function improved.
[gnu-emacs] / lisp / image.el
index ad8fcafe8dea29d28bbb2ec252933ad8ec942ad9..b45b23db6117c4dcd63e47bebd35cfde3f5579fc 100644 (file)
@@ -1,6 +1,7 @@
 ;;; image.el --- image API
 
-;; Copyright (C) 1998, 99, 2000, 01, 04 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
+;;   2004, 2005 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: multimedia
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -48,20 +49,6 @@ IMAGE-TYPE must be a pair (PREDICATE . TYPE).  PREDICATE is called
 with one argument, a string containing the image data.  If PREDICATE returns
 a non-nil value, TYPE is the image's type.")
 
-;;;###autoload
-(defvar image-library-alist nil
-  "Alist of image types vs external libraries needed to display them.
-
-Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
-representing a supported image type, and the rest are strings giving
-alternate filenames for the corresponding external libraries.
-
-Emacs tries to load the libraries in the order they appear on the
-list; if none is loaded, the running session of Emacs won't
-support the image type.  Types 'pbm and 'xbm don't need to be
-listed; they're always supported.")
-;;;###autoload (put 'image-library-alist 'risky-local-variable t)
-
 (defun image-jpeg-p (data)
   "Value is non-nil if DATA, a string, consists of JFIF image data.
 We accept the tag Exif because that is the same format."
@@ -122,7 +109,7 @@ be determined."
 
 ;;;###autoload
 (defun image-type-available-p (type)
-  "Value is non-nil if image type TYPE is available.
+  "Return non-nil if image type TYPE is available.
 Image types are symbols like `xbm' or `jpeg'."
   (and (fboundp 'init-image-library)
        (init-image-library type image-library-alist)))
@@ -227,7 +214,17 @@ height of the image; integer values are taken as pixel values."
                                      image) rear-nonsticky (display)))))
 
 
+;;;###autoload
 (defun insert-sliced-image (image &optional string area rows cols)
+  "Insert IMAGE into current buffer at point.
+IMAGE is displayed by inserting STRING into the current buffer
+with a `display' property whose value is the image.  STRING is
+defaulted if you omit it.
+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."
   (unless string (setq string " "))
   (unless (eq (car-safe image) 'image)
     (error "Not an image: %s" image))
@@ -254,7 +251,7 @@ height of the image; integer values are taken as pixel values."
          (setq x (+ x dx))))
       (setq x 0.0
            y (+ y dy))
-      (insert (propertize "\n" 'line-height 0)))))
+      (insert (propertize "\n" 'line-height t)))))