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 |
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. |
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) |
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 |
|
|