]> code.delx.au - gnu-emacs/blobdiff - lisp/iimage.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / iimage.el
index 9b183ebb01d2006ebd8dfcf3d308deb569bb6e67..f662d9f1042cc0d15a162cb6b2c6fe71eacb5ec5 100644 (file)
@@ -1,6 +1,6 @@
 ;;; iimage.el --- Inline image minor mode.
 
-;; Copyright (C) 2004 Free Software Foundation
+;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: KOSEKI Yoshinori <kose@meadowy.org>
 ;; Maintainer: KOSEKI Yoshinori <kose@meadowy.org>
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -20,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:
 
 (eval-when-compile
   (require 'image-file))
 
+(defgroup iimage nil
+  "Support for inline images."
+  :version "22.1"
+  :group 'image)
+
 (defconst iimage-version "1.1")
 (defvar iimage-mode nil)
 (defvar iimage-mode-map nil)
@@ -82,7 +87,7 @@
 Each element looks like (REGEXP . NUM).
 NUM specifies which parenthesized expression in the regexp.
 
-image filename regex exsamples:
+Examples of image filename regexps:
     file://foo.png
     `file://foo.png'
     \\[\\[foo.gif]]
@@ -104,14 +109,10 @@ image filename regex exsamples:
   (interactive)
   (iimage-mode 0))
 
-;; Emacs21.3 or earlier does not heve locate-file.
-(if (fboundp 'locate-file)
-    (defalias 'iimage-locate-file 'locate-file)
-  (defun iimage-locate-file (filename path)
-    (locate-library filename t path)))
+(defalias 'iimage-locate-file 'locate-file)
 
 (defun iimage-mode-buffer (arg)
-"Display/Undisplay Images.
+"Display/undisplay images.
 With numeric ARG, display the images if and only if ARG is positive."
   (interactive)
   (let ((ing (if (numberp arg)
@@ -137,7 +138,7 @@ With numeric ARG, display the images if and only if ARG is positive."
 ;;;###autoload
 (define-minor-mode iimage-mode
   "Toggle inline image minor mode."
-  nil " iImg" iimage-mode-map
+  :group 'iimage :lighter " iImg" :keymap iimage-mode-map
   (run-hooks 'iimage-mode-hook)
   (iimage-mode-buffer iimage-mode))