emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

May I do this small change to image-dired now?


From: Mathias Dahl
Subject: May I do this small change to image-dired now?
Date: Sat, 27 Feb 2016 14:21:58 +0100

Hi,

I got some inspiration today to actually "maintain" `image-dired' again :)

I cloned the Git repo and have committed a small local change. Here is what git show tells me has happened:

==
Author: Mathias Dahl <address@hidden>
Date:   Sat Feb 27 14:11:02 2016 +0100

    Try to preserve the current column when using `image-dired-next-line' and `image-dired-previous-line'.

diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index a8274f5..67b023d 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -1143,7 +1143,8 @@ image."
 (defun image-dired-next-line ()
   "Move to next line and display properties."
   (interactive)
-  (forward-line 1)
+  (let ((goal-column (current-column)))
+    (next-line))
   ;; If we end up in an empty spot, back up to the next thumbnail.
   (if (not (image-dired-image-at-point-p))
       (image-dired-backward-image))
@@ -1155,7 +1156,8 @@ image."
 (defun image-dired-previous-line ()
   "Move to previous line and display properties."
   (interactive)
-  (forward-line -1)
+  (let ((goal-column (current-column)))
+    (previous-line))
   ;; If we end up in an empty spot, back up to the next
   ;; thumbnail. This should only happen if the user deleted a
   ;; thumbnail and did not refresh, so it is not very common. But we
==

I have two questions:

1. If I git push this change, will it end up on the main Emacs branch (or trunk, Git and VCSes are not my strongest skill...)? I initially cloned the repo using my username on Savannah according to the guideline on EmacsWiki.
2. Is it a good time to do this now?

Thanks!

/Mathias


reply via email to

[Prev in Thread] Current Thread [Next in Thread]