]> git.eshelyaron.com Git - emacs.git/commitdiff
; Simplify image-dired-forward-image
authorStefan Kangas <stefankangas@gmail.com>
Sat, 24 Sep 2022 18:18:48 +0000 (20:18 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 24 Sep 2022 18:33:00 +0000 (20:33 +0200)
* lisp/image/image-dired.el (image-dired-forward-image): Simplify.

lisp/image/image-dired.el

index c519b326545fa112db674829bffbd8d3b699aac4..b8b16343c12792216499a90f66944ea59bb2d0a9 100644 (file)
@@ -675,16 +675,14 @@ point is on the last image, move to the last one and vice versa."
                    (forward-char (if (> arg 0) 1 -1)))
                  (setq pos (point))
                  (image-dired-image-at-point-p)))
-          (progn (goto-char pos)
-                 (image-dired--update-header-line))
+          (goto-char pos)
         (if wrap-around
-            (progn (goto-char (if (> arg 0)
-                                  (point-min)
-                                ;; There are two spaces after the last image.
-                                (- (point-max) 2)))
-                   (image-dired--update-header-line))
-          (message "At %s image" (if (> arg 0) "last" "first"))
-          (image-dired--update-header-line)))))
+            (goto-char (if (> arg 0)
+                           (point-min)
+                         ;; There are two spaces after the last image.
+                         (- (point-max) 2)))
+          (message "At %s image" (if (> arg 0) "last" "first"))))))
+  (image-dired--update-header-line)
   (when image-dired-track-movement
     (image-dired-track-original-file)))