emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/image.el
Date: Sun, 18 Sep 2005 10:04:49 -0400

Index: emacs/lisp/image.el
diff -c emacs/lisp/image.el:1.49 emacs/lisp/image.el:1.50
*** emacs/lisp/image.el:1.49    Thu Sep 15 14:00:09 2005
--- emacs/lisp/image.el Sun Sep 18 14:04:46 2005
***************
*** 51,61 ****
  
  (defvar 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 in.
! If an element is a variable symbol, the value of that variable is
! used as a list of directories to search.")
  
  (defun image-jpeg-p (data)
    "Value is non-nil if DATA, a string, consists of JFIF image data.
--- 51,63 ----
  
  (defvar 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.")
  
  (defun image-jpeg-p (data)
    "Value is non-nil if DATA, a string, consists of JFIF image data.
***************
*** 278,294 ****
        (setq overlays (cdr overlays)))))
  
  (defun image-search-load-path (file path)
!   (let (found pathname)
      (while (and (not found) (consp path))
        (cond
!        ((stringp (car path))
        (setq found
              (file-readable-p
!              (setq pathname (expand-file-name file (car path))))))
!        ((and (symbolp (car path)) (boundp (car path)))
!       (if (setq pathname (image-search-load-path
!                           file (symbol-value (car path))))
!           (setq found t))))
        (setq path (cdr path)))
      (if found pathname)))
  
--- 280,303 ----
        (setq overlays (cdr overlays)))))
  
  (defun image-search-load-path (file path)
!   (let (element found pathname)
      (while (and (not found) (consp path))
+       (setq element (car path))
        (cond
!        ((stringp element)
        (setq found
              (file-readable-p
!              (setq pathname (expand-file-name file element)))))
!        ((and (symbolp element) (boundp element))
!       (setq element (symbol-value element))
!       (cond
!        ((stringp element)
!         (setq found
!               (file-readable-p
!                (setq pathname (expand-file-name file element)))))
!        ((consp element)
!         (if (setq pathname (image-search-load-path file element))
!             (setq found t))))))
        (setq path (cdr path)))
      (if found pathname)))
  




reply via email to

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