emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/iimage.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/iimage.el [lexbind]
Date: Tue, 06 Jul 2004 06:58:24 -0400

Index: emacs/lisp/iimage.el
diff -c emacs/lisp/iimage.el:1.3.2.1 emacs/lisp/iimage.el:1.3.2.2
*** emacs/lisp/iimage.el:1.3.2.1        Tue Jul  6 09:14:14 2004
--- emacs/lisp/iimage.el        Tue Jul  6 10:26:54 2004
***************
*** 25,36 ****
  
  ;;; Commentary:
  
! ;; Iimage is a minor mode that display a images, when image-filename
! ;; exists in buffer.
  ;; http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html
  ;;
  ;; Add to your `~/.emacs':
! ;; (autoload 'iimage-mode "iimage" "SUpport Inline image minor mode." t)
  ;;
  ;; ** Display images in *Info* buffer.
  ;;
--- 25,37 ----
  
  ;;; Commentary:
  
! ;; Iimage is a minor mode that displays images, when image-filename
! ;; exists in the buffer.
  ;; http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html
  ;;
  ;; Add to your `~/.emacs':
! ;; (autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
! ;; (autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." 
t)
  ;;
  ;; ** Display images in *Info* buffer.
  ;;
***************
*** 50,56 ****
  (eval-when-compile
    (require 'image-file))
  
! (defconst iimage-version "1.0")
  (defvar iimage-mode nil)
  (defvar iimage-mode-map nil)
  
--- 51,57 ----
  (eval-when-compile
    (require 'image-file))
  
! (defconst iimage-version "1.1")
  (defvar iimage-mode nil)
  (defvar iimage-mode-map nil)
  
***************
*** 89,94 ****
--- 90,99 ----
       foo.JPG
  ")
  
+ (defvar iimage-mode-image-search-path nil
+ "*List of directories to search for image files for iimage-mode.")
+ 
+ ;;;###autoload
  (defun turn-on-iimage-mode ()
  "Unconditionally turn on iimage mode."
    (interactive)
***************
*** 99,104 ****
--- 104,115 ----
    (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)))
+ 
  (defun iimage-mode-buffer (arg)
  "Display/Undisplay Images.
  With numeric ARG, display the images if and only if ARG is positive."
***************
*** 113,120 ****
        (dolist (pair iimage-mode-image-regex-alist)
        (while (re-search-forward (car pair) nil t)
          (if (and (setq file (match-string (cdr pair)))
!                  (setq file (expand-file-name file default-directory))
!                  (file-exists-p file))
              (if ing
                  (add-text-properties (match-beginning 0) (match-end 0)
                                       (list 'display (create-image file)))
--- 124,132 ----
        (dolist (pair iimage-mode-image-regex-alist)
        (while (re-search-forward (car pair) nil t)
          (if (and (setq file (match-string (cdr pair)))
!                  (setq file (iimage-locate-file file
!                                  (cons default-directory
!                                        iimage-mode-image-search-path))))
              (if ing
                  (add-text-properties (match-beginning 0) (match-end 0)
                                       (list 'display (create-image file)))
***************
*** 122,127 ****
--- 134,140 ----
                                        '(display)))))))
      (set-buffer-modified-p modp)))
  
+ ;;;###autoload
  (define-minor-mode iimage-mode
    "Toggle inline image minor mode."
    nil " iImg" iimage-mode-map




reply via email to

[Prev in Thread] Current Thread [Next in Thread]