emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/thumbs.el
Date: Fri, 10 Jun 2005 10:59:59 -0400

Index: emacs/lisp/thumbs.el
diff -c emacs/lisp/thumbs.el:1.15 emacs/lisp/thumbs.el:1.16
*** emacs/lisp/thumbs.el:1.15   Thu Jun  9 01:39:40 2005
--- emacs/lisp/thumbs.el        Fri Jun 10 14:59:59 2005
***************
*** 172,188 ****
                             (1+ thumbs-gensym-counter))))))
          (make-symbol (format "%s%d" pfix num))))))
  
  (defun thumbs-temp-file ()
    "Return a unique temporary filename for an image."
    (format "%s%s-%s.jpg"
!           (expand-file-name thumbs-temp-dir)
            thumbs-temp-prefix
            (thumbs-gensym "T")))
  
  (defun thumbs-thumbsdir ()
    "Return the current thumbnails directory (from `thumbs-thumbsdir').
  Create the thumbnails directory if it does not exist."
!   (let ((thumbs-thumbsdir (expand-file-name thumbs-thumbsdir)))
      (unless (file-directory-p thumbs-thumbsdir)
        (make-directory thumbs-thumbsdir)
        (message "Creating thumbnails directory"))
--- 172,192 ----
                             (1+ thumbs-gensym-counter))))))
          (make-symbol (format "%s%d" pfix num))))))
  
+ (defsubst thumbs-temp-dir ()
+   (file-name-as-directory (expand-file-name thumbs-temp-dir)))
+ 
  (defun thumbs-temp-file ()
    "Return a unique temporary filename for an image."
    (format "%s%s-%s.jpg"
!           (thumbs-temp-dir)
            thumbs-temp-prefix
            (thumbs-gensym "T")))
  
  (defun thumbs-thumbsdir ()
    "Return the current thumbnails directory (from `thumbs-thumbsdir').
  Create the thumbnails directory if it does not exist."
!   (let ((thumbs-thumbsdir (file-name-as-directory
!                            (expand-file-name thumbs-thumbsdir))))
      (unless (file-directory-p thumbs-thumbsdir)
        (make-directory thumbs-thumbsdir)
        (message "Creating thumbnails directory"))
***************
*** 267,273 ****
    (condition-case nil
      (apply 'delete-file
           (directory-files
!           thumbs-temp-dir t
            thumbs-temp-prefix))
      (error nil))
    (let ((buffer-read-only nil)
--- 271,277 ----
    (condition-case nil
      (apply 'delete-file
           (directory-files
!           (thumbs-temp-dir) t
            thumbs-temp-prefix))
      (error nil))
    (let ((buffer-read-only nil)
***************
*** 306,312 ****
    "Return a thumbnail name for the image IMG."
    (convert-standard-filename
     (let ((filename (expand-file-name img)))
!      (format "%s/%08x-%s.jpg"
               (thumbs-thumbsdir)
               (sxhash filename)
               (subst-char-in-string
--- 310,316 ----
    "Return a thumbnail name for the image IMG."
    (convert-standard-filename
     (let ((filename (expand-file-name img)))
!      (format "%s%08x-%s.jpg"
               (thumbs-thumbsdir)
               (sxhash filename)
               (subst-char-in-string
***************
*** 637,643 ****
    ;; cleaning of old temp file
    (mapc 'delete-file
        (directory-files
!        thumbs-temp-dir
         t
         thumbs-temp-prefix))
    (let ((buffer-read-only nil)
--- 641,647 ----
    ;; cleaning of old temp file
    (mapc 'delete-file
        (directory-files
!        (thumbs-temp-dir)
         t
         thumbs-temp-prefix))
    (let ((buffer-read-only nil)




reply via email to

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