diff options
| author | Juanma Barranquero | 2005-05-30 09:45:11 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-05-30 09:45:11 +0000 |
| commit | 0df06447d496ba82bd595c1d272a8c9dcfb417b9 (patch) | |
| tree | 9d92450fb3f18d2dae62294e6b30d02ea2762564 /lisp | |
| parent | cfcd5c914a4b35939c62255e67e5a033aa7aa7e5 (diff) | |
| download | emacs-0df06447d496ba82bd595c1d272a8c9dcfb417b9.tar.gz emacs-0df06447d496ba82bd595c1d272a8c9dcfb417b9.zip | |
(thumbs-thumbname): The resulting thubname includes a hash value to improve its
uniqueness, and has a ".jpg" extension. Also, it is now a valid filename on all
systems.
(thumbs-make-thumb): Use `let', not `let*'.
(thumbs-show-thumbs-list): Check for JPEG availability.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/thumbs.el | 26 |
2 files changed, 27 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7104c21885..fee028e52eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-05-30 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * thumbs.el (thumbs-thumbname): The resulting thubname now | ||
| 4 | includes a hash value to improve its uniqueness, and has a ".jpg" | ||
| 5 | extension. Also, it is now a valid filename on all systems. | ||
| 6 | (thumbs-make-thumb): Use `let', not `let*'. | ||
| 7 | (thumbs-show-thumbs-list): Check for JPEG availability. | ||
| 8 | |||
| 1 | 2005-05-30 Richard M. Stallman <rms@gnu.org> | 9 | 2005-05-30 Richard M. Stallman <rms@gnu.org> |
| 2 | 10 | ||
| 3 | * filesets.el (filesets-menu-ensure-use-cached): | 11 | * filesets.el (filesets-menu-ensure-use-cached): |
| @@ -14,7 +22,7 @@ | |||
| 14 | 22 | ||
| 15 | * progmodes/gdb-ui.el (gdb-toggle-breakpoint): | 23 | * progmodes/gdb-ui.el (gdb-toggle-breakpoint): |
| 16 | Make regexp more robust. | 24 | Make regexp more robust. |
| 17 | (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): | 25 | (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): |
| 18 | Force regeneration of disassembly. | 26 | Force regeneration of disassembly. |
| 19 | 27 | ||
| 20 | 2005-05-29 Jay Belanger <belanger@truman.edu> | 28 | 2005-05-29 Jay Belanger <belanger@truman.edu> |
| @@ -79,7 +87,7 @@ | |||
| 79 | 2005-05-29 Manuel Serrano <Manuel.Serrano@sophia.inria.fr> | 87 | 2005-05-29 Manuel Serrano <Manuel.Serrano@sophia.inria.fr> |
| 80 | 88 | ||
| 81 | * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. | 89 | * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. |
| 82 | (flyspell-default-delayed-commands): add backward-delete-char-untabify. | 90 | (flyspell-default-delayed-commands): Add backward-delete-char-untabify. |
| 83 | (flyspell-abbrev-p): Default to nil. | 91 | (flyspell-abbrev-p): Default to nil. |
| 84 | (flyspell-use-global-abbrev-table-p): Doc fix. | 92 | (flyspell-use-global-abbrev-table-p): Doc fix. |
| 85 | (flyspell-large-region): Allow nil as value. | 93 | (flyspell-large-region): Allow nil as value. |
| @@ -130,7 +138,7 @@ | |||
| 130 | 138 | ||
| 131 | 2005-05-28 Karl Berry <karl@gnu.org> | 139 | 2005-05-28 Karl Berry <karl@gnu.org> |
| 132 | 140 | ||
| 133 | * textmodes/tex-mode.el: now that tex-send-command calls | 141 | * textmodes/tex-mode.el: Now that tex-send-command calls |
| 134 | shell-quote-argument (2005-03-31 change), remove all calls to | 142 | shell-quote-argument (2005-03-31 change), remove all calls to |
| 135 | shell-quote-argument; they all end up invoking tex-send-command. | 143 | shell-quote-argument; they all end up invoking tex-send-command. |
| 136 | The double quoting loses on filenames with non-safe characters, | 144 | The double quoting loses on filenames with non-safe characters, |
| @@ -172,7 +180,7 @@ | |||
| 172 | Toggle display of floating point registers. | 180 | Toggle display of floating point registers. |
| 173 | (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers. | 181 | (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers. |
| 174 | 182 | ||
| 175 | * progmodes/gud.el (gud-goto-info): Use info. Don't use require. | 183 | * progmodes/gud.el (gud-goto-info): Use info. Don't use require. |
| 176 | (toggle-gud-tooltip-dereference): | 184 | (toggle-gud-tooltip-dereference): |
| 177 | Rename from gud-toggle-tooltip-dereference. | 185 | Rename from gud-toggle-tooltip-dereference. |
| 178 | 186 | ||
diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 1657c4b01a9..03491873c9d 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el | |||
| @@ -302,18 +302,21 @@ Or, alternatively, a SIZE may be specified." | |||
| 302 | 302 | ||
| 303 | (defun thumbs-thumbname (img) | 303 | (defun thumbs-thumbname (img) |
| 304 | "Return a thumbnail name for the image IMG." | 304 | "Return a thumbnail name for the image IMG." |
| 305 | (concat thumbs-thumbsdir "/" | 305 | (convert-standard-filename |
| 306 | (subst-char-in-string | 306 | (let ((filename (expand-file-name img))) |
| 307 | ?\ ?\_ | 307 | (format "%s/%08x-%s.jpg" |
| 308 | (apply | 308 | thumbs-thumbsdir |
| 309 | 'concat | 309 | (sxhash filename) |
| 310 | (split-string | 310 | (subst-char-in-string |
| 311 | (expand-file-name img) "/"))))) | 311 | ?\s ?\_ |
| 312 | (apply | ||
| 313 | 'concat | ||
| 314 | (split-string filename "/"))))))) | ||
| 312 | 315 | ||
| 313 | (defun thumbs-make-thumb (img) | 316 | (defun thumbs-make-thumb (img) |
| 314 | "Create the thumbnail for IMG." | 317 | "Create the thumbnail for IMG." |
| 315 | (let* ((fn (expand-file-name img)) | 318 | (let ((fn (expand-file-name img)) |
| 316 | (tn (thumbs-thumbname img))) | 319 | (tn (thumbs-thumbname img))) |
| 317 | (if (or (not (file-exists-p tn)) | 320 | (if (or (not (file-exists-p tn)) |
| 318 | ;; This is not the right fix, but I don't understand | 321 | ;; This is not the right fix, but I don't understand |
| 319 | ;; the external program or why it produces a geometry | 322 | ;; the external program or why it produces a geometry |
| @@ -378,8 +381,9 @@ If MARKED is non-nil, the image is marked." | |||
| 378 | (unless (bobp) (newline)))) | 381 | (unless (bobp) (newline)))) |
| 379 | 382 | ||
| 380 | (defun thumbs-show-thumbs-list (L &optional buffer-name same-window) | 383 | (defun thumbs-show-thumbs-list (L &optional buffer-name same-window) |
| 381 | (when (not (display-images-p)) | 384 | (unless (and (display-images-p) |
| 382 | (error "Images are not supported in this Emacs session")) | 385 | (image-type-available-p 'jpeg)) |
| 386 | (error "Required image type is not supported in this Emacs session")) | ||
| 383 | (funcall (if same-window 'switch-to-buffer 'pop-to-buffer) | 387 | (funcall (if same-window 'switch-to-buffer 'pop-to-buffer) |
| 384 | (or buffer-name "*THUMB-View*")) | 388 | (or buffer-name "*THUMB-View*")) |
| 385 | (let ((inhibit-read-only t)) | 389 | (let ((inhibit-read-only t)) |