(defcustom thumbs-thumbsdir-max-size 50000000
"Max size for thumbnails directory.
-When it reach that size (in bytes), a warning is send."
+When it reachs that size (in bytes), a warning is sent."
:type 'string
:group 'thumbs)
;; Initialize some variable, for later use.
(defvar thumbs-temp-file
(concat thumbs-temp-dir thumbs-temp-prefix)
- "Temporary filesname for images.")
+ "Temporary filename for images.")
(defvar thumbs-current-tmp-filename
nil
(defun thumbs-cleanup-thumbsdir ()
"Clean the thumbnails directory.
-If the total size of all files in 'thumbs-thumbsdir' is bigger than
-'thumbs-thumbsdir-max-size', files are deleted until the max size is
+If the total size of all files in `thumbs-thumbsdir' is bigger than
+`thumbs-thumbsdir-max-size', files are deleted until the max size is
reached."
(let* ((filesL
(sort
FILEIN is the input file,
FILEOUT is the output file,
ACTION is the command to send to convert.
-Optional argument are:
+Optional arguments are:
ARG any arguments to the ACTION command,
-OUTPUT-FORMAT is the file format to output, default is jpeg
+OUTPUT-FORMAT is the file format to output (default is jpeg),
ACTION-PREFIX is the symbol to place before the ACTION command
- (default to '-' but can sometime be '+')."
+ (defaults to '-' but can sometimes be '+')."
(let ((command (format "%s %s%s %s \"%s\" \"%s:%s\""
thumbs-conversion-program
(or action-prefix "-")
(round (- n (/ (* d n) 100))))
(defun thumbs-increment-image-size (s)
- "Increment S (a cons of width x heigh)."
+ "Increment S (a cons of width x height)."
(cons
(thumbs-increment-image-size-element (car s)
thumbs-image-resizing-step)
thumbs-image-resizing-step)))
(defun thumbs-decrement-image-size (s)
- "Decrement S (a cons of width x heigh)."
+ "Decrement S (a cons of width x height)."
(cons
(thumbs-decrement-image-size-element (car s)
thumbs-image-resizing-step)
"Insert image IMG at point.
TYPE and RELIEF will be used in constructing the image; see `image'
in the emacs-lisp manual for further documentation.
-if MARKED is non-nil, the image is marked."
+If MARKED is non-nil, the image is marked."
(let ((i `(image :type ,type
:file ,img
:relief ,relief
(defun thumbs-insert-thumb (img &optional marked)
"Insert the thumbnail for IMG at point.
-if MARKED is non-nil, the image is marked"
+If MARKED is non-nil, the image is marked."
(thumbs-insert-image
(thumbs-make-thumb img) 'jpeg thumbs-relief marked)
(put-text-property (1- (point)) (point)
;;;###autoload
(defun thumbs-dired-show-marked ()
- "In Dired, make a thumbs buffer with all marked files."
+ "In dired, make a thumbs buffer with all marked files."
(interactive)
(thumbs-show-thumbs-list (dired-get-marked-files) nil t))
(defun thumbs-find-image-at-point (&optional img otherwin)
"Display image IMG for thumbnail at point.
-use another window it OTHERWIN is t."
+Use another window if OTHERWIN is t."
(interactive)
(let* ((i (or img (thumbs-current-image))))
(thumbs-find-image i (point) otherwin)))
(nreverse list))))
(defun thumbs-delete-images ()
- "Delete the image at point (and it's thumbnail) (or marked files if any)."
+ "Delete the image at point (and its thumbnail) (or marked files if any)."
(interactive)
(let ((files (or thumbs-markedL (list (thumbs-current-image)))))
(if (yes-or-no-p (format "Really delete %d files? " (length files)))
(delq x thumbs-markedL)))))))))
(defun thumbs-rename-images (newfile)
- "Rename the image at point (and it's thumbnail) (or marked files if any)."
+ "Rename the image at point (and its thumbnail) (or marked files if any)."
(interactive "FRename to file or directory: ")
(let ((files (or thumbs-markedL (list (thumbs-current-image))))
failures)
thumbs-current-image-filename i))))
(defun thumbs-next-image ()
- "Show next image."
+ "Show the next image."
(interactive)
(let* ((i (1+ thumbs-image-num))
(list (thumbs-file-alist))
;;;###autoload
(defun thumbs-dired-setroot ()
- "In dired, Call the setroot program on the image at point."
+ "In dired, call the setroot program on the image at point."
(interactive)
(thumbs-call-setroot-command (dired-get-filename)))