diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2006-01-30 09:52:49 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2006-01-30 09:52:49 +0000 |
commit | 0868cd7045274b08107a5659421fc617643e3e67 (patch) | |
tree | 897d58e704fb3b6bf31caf1f3f7a21458bee7729 /lisp/thumbs.el | |
parent | 75e49434a5b90f797fe9b0250d426793793fb8e7 (diff) | |
download | emacs-0868cd7045274b08107a5659421fc617643e3e67.tar.gz |
(thumbs-marked-list): Make buffer-local and
permanent-local.
(thumbs-insert-thumb): Make help-echo non-sticky.
(thumbs-file-alist): Use eolp as check for (non)-image.
Diffstat (limited to 'lisp/thumbs.el')
-rw-r--r-- | lisp/thumbs.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 9999dd72812..bcab502b0f4 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -174,6 +174,8 @@ this value can let another user see some of your images." (defvar thumbs-marked-list nil "List of marked files.") +(make-variable-buffer-local 'thumbs-marked-list) +(put 'thumbs-marked-list 'permanent-local t) (defalias 'thumbs-gensym (if (fboundp 'gensym) @@ -334,9 +336,9 @@ smaller according to whether INCREMENT is 1 or -1." ((string-match ".*\\.tiff?\\'" img) 'tiff))) (defun thumbs-file-size (img) - (let ((i (image-size (find-image `((:type ,(thumbs-image-type img) :file ,img))) t))) - (concat (number-to-string (round (car i))) - "x" + (let ((i (image-size + (find-image `((:type ,(thumbs-image-type img) :file ,img))) t))) + (concat (number-to-string (round (car i))) "x" (number-to-string (round (cdr i)))))) ;;;###autoload @@ -366,7 +368,8 @@ If MARKED is non-nil, the image is marked." (thumbs-make-thumb img) 'jpeg thumbs-relief marked) (add-text-properties (1- (point)) (point) `(thumb-image-file ,img - help-echo ,(file-name-nondirectory img)))) + help-echo ,(file-name-nondirectory img) + rear-nonsticky help-echo))) (defun thumbs-do-thumbs-insertion (list) "Insert all thumbnails into thumbs buffer." @@ -488,7 +491,7 @@ Open another window." (let (list) (goto-char (point-min)) (while (not (eobp)) - (unless (= 0 (mod (point) (1+ thumbs-per-line))) + (unless (eolp) (if (thumbs-current-image) (push (cons (point-marker) (thumbs-current-image)) @@ -774,8 +777,7 @@ ACTION and ARG should be a valid convert command." (define-derived-mode thumbs-mode fundamental-mode "thumbs" "Preview images in a thumbnails buffer" - (setq buffer-read-only t) - (set (make-local-variable 'thumbs-marked-list) nil)) + (setq buffer-read-only t)) (defvar thumbs-view-image-mode-map (let ((map (make-sparse-keymap))) |