]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix gratuitous argument passing error in image-dired (Bug#7817).
authorChong Yidong <cyd@stupidchicken.com>
Fri, 28 Jan 2011 18:09:59 +0000 (13:09 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 28 Jan 2011 18:09:59 +0000 (13:09 -0500)
* lisp/image-dired.el (image-dired-mouse-display-image): No-op if
no file is found.

lisp/ChangeLog
lisp/image-dired.el

index c35e3db23e608161122c16fdd3fa5e8cd0aa2b77..d71c51f5bdee045d433a22eb209e34908827f539 100644 (file)
@@ -1,5 +1,8 @@
 2011-01-28  Chong Yidong  <cyd@stupidchicken.com>
 
+       * image-dired.el (image-dired-mouse-display-image): No-op if no
+       file is found (Bug#7817).
+
        * mouse.el (mouse-menu-non-singleton): Doc fix (Bug#7801).
 
 2011-01-28  Kenichi Handa  <handa@m17n.org>
index 41fee0b0df23ce699006101f6cb1d6fb02ae83ac..489195837fc8f134bf57264da5de7a6994ce5e2e 100644 (file)
@@ -2187,15 +2187,15 @@ matching tag will be marked in the dired buffer."
 Track this in associated dired buffer if `image-dired-track-movement' is
 non-nil."
   (interactive "e")
-  (let (file)
-    (mouse-set-point event)
-    (goto-char (posn-point (event-end event)))
-    (setq file (image-dired-original-file-name))
-    (if image-dired-track-movement
-        (image-dired-track-original-file))
-    (image-dired-create-display-image-buffer)
-    (display-buffer image-dired-display-image-buffer)
-    (image-dired-display-image file)))
+  (mouse-set-point event)
+  (goto-char (posn-point (event-end event)))
+  (let ((file (image-dired-original-file-name)))
+    (when file
+      (if image-dired-track-movement
+         (image-dired-track-original-file))
+      (image-dired-create-display-image-buffer)
+      (display-buffer image-dired-display-image-buffer)
+      (image-dired-display-image file))))
 
 (defun image-dired-mouse-select-thumbnail (event)
   "Use mouse EVENT to select thumbnail image.