comparison lisp/thumbs.el @ 68409:7ca2eae4cee2

(thumbs-do-thumbs-insertion): Suppress message when there are no more images to display. (thumbs-mark, thumbs-unmark): Revert change so that they move to the next image.
author Nick Roberts <nickrob@snap.net.nz>
date Thu, 26 Jan 2006 23:03:17 +0000
parents 3bff02a6d438
children 6511ba48ed7a
comparison
equal deleted inserted replaced
68408:22a28dacd64a 68409:7ca2eae4cee2
378 (thumbs-insert-thumb img 378 (thumbs-insert-thumb img
379 (member img thumbs-marked-list)) 379 (member img thumbs-marked-list))
380 (when (= 0 (mod (setq i (1+ i)) thumbs-per-line)) 380 (when (= 0 (mod (setq i (1+ i)) thumbs-per-line))
381 (newline))) 381 (newline)))
382 (unless (bobp) (newline)) 382 (unless (bobp) (newline))
383 (if diff (message "Type + to display more images.")))) 383 (if (> diff 0) (message "Type + to display more images."))))
384 384
385 (defun thumbs-show-thumbs-list (list &optional dir same-window) 385 (defun thumbs-show-thumbs-list (list &optional dir same-window)
386 (unless (and (display-images-p) 386 (unless (and (display-images-p)
387 (image-type-available-p 'jpeg)) 387 (image-type-available-p 'jpeg))
388 (error "Required image type is not supported in this Emacs session")) 388 (error "Required image type is not supported in this Emacs session"))
621 (unless elt 621 (unless elt
622 (error "No image here")) 622 (error "No image here"))
623 (push elt thumbs-marked-list) 623 (push elt thumbs-marked-list)
624 (let ((inhibit-read-only t)) 624 (let ((inhibit-read-only t))
625 (delete-char 1) 625 (delete-char 1)
626 (save-excursion 626 (thumbs-insert-thumb elt t)))
627 (thumbs-insert-thumb elt t))))
628 (when (eolp) (forward-char))) 627 (when (eolp) (forward-char)))
629 628
630 (defun thumbs-unmark () 629 (defun thumbs-unmark ()
631 "Unmark the image at point." 630 "Unmark the image at point."
632 (interactive) 631 (interactive)
634 (unless elt 633 (unless elt
635 (error "No image here")) 634 (error "No image here"))
636 (setq thumbs-marked-list (delete elt thumbs-marked-list)) 635 (setq thumbs-marked-list (delete elt thumbs-marked-list))
637 (let ((inhibit-read-only t)) 636 (let ((inhibit-read-only t))
638 (delete-char 1) 637 (delete-char 1)
639 (save-excursion 638 (thumbs-insert-thumb elt nil)))
640 (thumbs-insert-thumb elt nil))))
641 (when (eolp) (forward-char))) 639 (when (eolp) (forward-char)))
642
643 640
644 ;; cleaning of old temp files 641 ;; cleaning of old temp files
645 (mapc 'delete-file 642 (mapc 'delete-file
646 (directory-files (thumbs-temp-dir) t thumbs-temp-prefix)) 643 (directory-files (thumbs-temp-dir) t thumbs-temp-prefix))
647 644