diff options
| author | Mathias Dahl | 2006-05-24 16:58:21 +0000 |
|---|---|---|
| committer | Mathias Dahl | 2006-05-24 16:58:21 +0000 |
| commit | d2edd3060e01c303945ec0b0f7c432bef3a0e078 (patch) | |
| tree | fad944c4637d382221f6dff6194ac6ff32156e7e | |
| parent | 944f2d7f33df43409f62a08a060567422d5a7c66 (diff) | |
| download | emacs-d2edd3060e01c303945ec0b0f7c432bef3a0e078.tar.gz emacs-d2edd3060e01c303945ec0b0f7c432bef3a0e078.zip | |
Added new parameter to `tumme-display-thumbs' to be used from `tumme-next-line-and-display' and similar commands.
| -rw-r--r-- | lisp/tumme.el | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/lisp/tumme.el b/lisp/tumme.el index 8f6e43e9cd6..7f407369095 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el | |||
| @@ -547,7 +547,7 @@ before warning the user." | |||
| 547 | :group 'tumme) | 547 | :group 'tumme) |
| 548 | 548 | ||
| 549 | (defun tumme-dir () | 549 | (defun tumme-dir () |
| 550 | "Return the current thumbnails directory (from `tumme-dir'). | 550 | "Return the current thumbnails directory (from variable `tumme-dir'). |
| 551 | Create the thumbnails directory if it does not exist." | 551 | Create the thumbnails directory if it does not exist." |
| 552 | (let ((tumme-dir (file-name-as-directory | 552 | (let ((tumme-dir (file-name-as-directory |
| 553 | (expand-file-name tumme-dir)))) | 553 | (expand-file-name tumme-dir)))) |
| @@ -701,7 +701,7 @@ Otherwise, delete overlays." | |||
| 701 | (interactive) | 701 | (interactive) |
| 702 | (dired-next-line 1) | 702 | (dired-next-line 1) |
| 703 | (tumme-display-thumbs | 703 | (tumme-display-thumbs |
| 704 | t (or tumme-append-when-browsing nil)) | 704 | t (or tumme-append-when-browsing nil) t) |
| 705 | (if tumme-dired-disp-props | 705 | (if tumme-dired-disp-props |
| 706 | (tumme-dired-display-properties))) | 706 | (tumme-dired-display-properties))) |
| 707 | 707 | ||
| @@ -710,7 +710,7 @@ Otherwise, delete overlays." | |||
| 710 | (interactive) | 710 | (interactive) |
| 711 | (dired-previous-line 1) | 711 | (dired-previous-line 1) |
| 712 | (tumme-display-thumbs | 712 | (tumme-display-thumbs |
| 713 | t (or tumme-append-when-browsing nil)) | 713 | t (or tumme-append-when-browsing nil) t) |
| 714 | (if tumme-dired-disp-props | 714 | (if tumme-dired-disp-props |
| 715 | (tumme-dired-display-properties))) | 715 | (tumme-dired-display-properties))) |
| 716 | 716 | ||
| @@ -729,7 +729,7 @@ Otherwise, delete overlays." | |||
| 729 | (interactive) | 729 | (interactive) |
| 730 | (dired-mark 1) | 730 | (dired-mark 1) |
| 731 | (tumme-display-thumbs | 731 | (tumme-display-thumbs |
| 732 | t (or tumme-append-when-browsing nil)) | 732 | t (or tumme-append-when-browsing nil) t) |
| 733 | (if tumme-dired-disp-props | 733 | (if tumme-dired-disp-props |
| 734 | (tumme-dired-display-properties))) | 734 | (tumme-dired-display-properties))) |
| 735 | 735 | ||
| @@ -818,7 +818,7 @@ Restore any changes to the window configuration made by calling | |||
| 818 | (message "No saved window configuration"))) | 818 | (message "No saved window configuration"))) |
| 819 | 819 | ||
| 820 | ;;;###autoload | 820 | ;;;###autoload |
| 821 | (defun tumme-display-thumbs (&optional arg append) | 821 | (defun tumme-display-thumbs (&optional arg append do-not-pop) |
| 822 | "Display thumbnails of all marked files, in `tumme-thumbnail-buffer'. | 822 | "Display thumbnails of all marked files, in `tumme-thumbnail-buffer'. |
| 823 | If a thumbnail image does not exist for a file, it is created on the | 823 | If a thumbnail image does not exist for a file, it is created on the |
| 824 | fly. With prefix argument ARG, display only thumbnail for file at | 824 | fly. With prefix argument ARG, display only thumbnail for file at |
| @@ -830,7 +830,14 @@ you have the dired buffer in the left window and the | |||
| 830 | `tumme-thumbnail-buffer' buffer in the right window. | 830 | `tumme-thumbnail-buffer' buffer in the right window. |
| 831 | 831 | ||
| 832 | With optional argument APPEND, append thumbnail to thumbnail buffer | 832 | With optional argument APPEND, append thumbnail to thumbnail buffer |
| 833 | instead of erasing it first." | 833 | instead of erasing it first. |
| 834 | |||
| 835 | Option argument DO-NOT-POP controls if `pop-to-buffer' should be | ||
| 836 | used or not. If non-nil, use `display-buffer' instead of | ||
| 837 | `pop-to-buffer'. This is used from functions like | ||
| 838 | `tumme-next-line-and-display' and | ||
| 839 | `tumme-previous-line-and-display' where we do not want the | ||
| 840 | thumbnail buffer to be selected." | ||
| 834 | (interactive "P") | 841 | (interactive "P") |
| 835 | (let ((buf (tumme-create-thumbnail-buffer)) | 842 | (let ((buf (tumme-create-thumbnail-buffer)) |
| 836 | curr-file thumb-name files count dired-buf beg) | 843 | curr-file thumb-name files count dired-buf beg) |
| @@ -862,7 +869,9 @@ instead of erasing it first." | |||
| 862 | nil) | 869 | nil) |
| 863 | (t | 870 | (t |
| 864 | (tumme-line-up-dynamic)))) | 871 | (tumme-line-up-dynamic)))) |
| 865 | (pop-to-buffer tumme-thumbnail-buffer))) | 872 | (if do-not-pop |
| 873 | (display-buffer tumme-thumbnail-buffer) | ||
| 874 | (pop-to-buffer tumme-thumbnail-buffer)))) | ||
| 866 | 875 | ||
| 867 | (defun tumme-show-all-from-dir (dir) | 876 | (defun tumme-show-all-from-dir (dir) |
| 868 | "Make a preview buffer for all images in DIR and display it. | 877 | "Make a preview buffer for all images in DIR and display it. |
| @@ -1658,13 +1667,13 @@ Ask user for number of images to show and the delay in between." | |||
| 1658 | (defun tumme-display-thumbs-append () | 1667 | (defun tumme-display-thumbs-append () |
| 1659 | "Append thumbnails to `tumme-thumbnail-buffer'." | 1668 | "Append thumbnails to `tumme-thumbnail-buffer'." |
| 1660 | (interactive) | 1669 | (interactive) |
| 1661 | (tumme-display-thumbs nil t)) | 1670 | (tumme-display-thumbs nil t t)) |
| 1662 | 1671 | ||
| 1663 | ;;;###autoload | 1672 | ;;;###autoload |
| 1664 | (defun tumme-display-thumb () | 1673 | (defun tumme-display-thumb () |
| 1665 | "Shorthard for `tumme-display-thumbs' with prefix argument." | 1674 | "Shorthard for `tumme-display-thumbs' with prefix argument." |
| 1666 | (interactive) | 1675 | (interactive) |
| 1667 | (tumme-display-thumbs t)) | 1676 | (tumme-display-thumbs t nil t)) |
| 1668 | 1677 | ||
| 1669 | (defun tumme-line-up () | 1678 | (defun tumme-line-up () |
| 1670 | "Line up thumbnails according to `tumme-thumbs-per-row'. | 1679 | "Line up thumbnails according to `tumme-thumbs-per-row'. |