/[emacs]/emacs/lisp/thumbs.el
ViewVC logotype

Diff of /emacs/lisp/thumbs.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by lute, Mon Jul 4 23:08:58 2005 UTC revision 1.19 by lektu, Tue Aug 2 10:25:26 2005 UTC
# Line 138  this value can let another user see some Line 138  this value can let another user see some
138    :group 'thumbs)    :group 'thumbs)
139    
140  ;; Initialize some variable, for later use.  ;; Initialize some variable, for later use.
141  (defvar thumbs-current-tmp-filename  (defvar thumbs-current-tmp-filename nil
   nil  
142    "Temporary filename of current image.")    "Temporary filename of current image.")
143  (defvar thumbs-current-image-filename  (make-variable-buffer-local 'thumbs-current-tmp-filename)
144    nil  
145    (defvar thumbs-current-image-filename nil
146    "Filename of current image.")    "Filename of current image.")
147  (defvar thumbs-current-image-size  (make-variable-buffer-local 'thumbs-current-image-filename)
148    nil  
149    (defvar thumbs-current-image-size nil
150    "Size of current image.")    "Size of current image.")
151  (defvar thumbs-image-num  
152    nil  (defvar thumbs-image-num nil
153    "Number of current image.")    "Number of current image.")
154  (defvar thumbs-current-dir  (make-variable-buffer-local 'thumbs-image-num)
155    nil  
156    (defvar thumbs-current-dir nil
157    "Current directory.")    "Current directory.")
158  (defvar thumbs-markedL  
159    nil  (defvar thumbs-markedL nil
160    "List of marked files.")    "List of marked files.")
161    
162  (defalias 'thumbs-gensym  (defalias 'thumbs-gensym
# Line 365  If MARKED is non-nil, the image is marke Line 367  If MARKED is non-nil, the image is marke
367                     :conversion ,(if marked 'disabled)                     :conversion ,(if marked 'disabled)
368                     :margin ,thumbs-margin)))                     :margin ,thumbs-margin)))
369      (insert-image i)      (insert-image i)
370      (setq thumbs-current-image-size      (set (make-local-variable 'thumbs-current-image-size)
371            (image-size i t))))           (image-size i t))))
372    
373  (defun thumbs-insert-thumb (img &optional marked)  (defun thumbs-insert-thumb (img &optional marked)
374    "Insert the thumbnail for IMG at point.    "Insert the thumbnail for IMG at point.
# Line 397  If MARKED is non-nil, the image is marke Line 399  If MARKED is non-nil, the image is marke
399      (thumbs-mode)      (thumbs-mode)
400      (thumbs-do-thumbs-insertion L)      (thumbs-do-thumbs-insertion L)
401      (goto-char (point-min))      (goto-char (point-min))
402      (setq thumbs-current-dir default-directory)      (set (make-local-variable 'thumbs-current-dir) default-directory)))
     (make-variable-buffer-local 'thumbs-current-dir)))  
403    
404  ;;;###autoload  ;;;###autoload
405  (defun thumbs-show-all-from-dir (dir &optional reg same-window)  (defun thumbs-show-all-from-dir (dir &optional reg same-window)
# Line 436  and SAME-WINDOW to show thumbs in the sa Line 437  and SAME-WINDOW to show thumbs in the sa
437      (setq thumbs-current-image-filename img      (setq thumbs-current-image-filename img
438            thumbs-current-tmp-filename nil            thumbs-current-tmp-filename nil
439            thumbs-image-num (or num 0))            thumbs-image-num (or num 0))
     (make-variable-buffer-local 'thumbs-current-image-filename)  
     (make-variable-buffer-local 'thumbs-current-tmp-filename)  
     (make-variable-buffer-local 'thumbs-current-image-size)  
     (make-variable-buffer-local 'thumbs-image-num)  
440      (delete-region (point-min)(point-max))      (delete-region (point-min)(point-max))
441      (thumbs-insert-image img (thumbs-image-type img) 0)))      (thumbs-insert-image img (thumbs-image-type img) 0)))
442    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26