emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/evil 215c39d: Pull temporary goal column normalization int


From: ELPA Syncer
Subject: [nongnu] elpa/evil 215c39d: Pull temporary goal column normalization into let (#1533)
Date: Sat, 16 Oct 2021 14:57:32 -0400 (EDT)

branch: elpa/evil
commit 215c39d1c4312ce5a3a66c19bbba61374d029c86
Author: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Pull temporary goal column normalization into let (#1533)
---
 evil-common.el | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/evil-common.el b/evil-common.el
index 3977532..d843bda 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -1010,22 +1010,25 @@ This mostly copies the approach of Emacs' 
`line-move-1', but is modified
 so it is more compatible with evil's notions of eol & tracking."
   (declare (indent defun)
            (debug t))
-  `(progn
-     (setq this-command 'next-line)
-     (if (consp temporary-goal-column)
-         (setq temporary-goal-column (+ (car temporary-goal-column)
-                                        (cdr temporary-goal-column))))
-     (if (not (memq last-command '(next-line previous-line)))
-         (setq temporary-goal-column
-               (if (and evil-track-eol
-                        (evil-eolp)
-                        (memq real-last-command '(move-end-of-line 
evil-end-of-line)))
-                   most-positive-fixnum
-                 (current-column))))
-     ,@body
-     (if evil-start-of-line
-         (evil-first-non-blank)
-       (line-move-to-column (truncate (or goal-column 
temporary-goal-column))))))
+  (let ((normalize-temporary-goal-column
+         `(if (consp temporary-goal-column)
+              (setq temporary-goal-column (+ (car temporary-goal-column)
+                                             (cdr temporary-goal-column))))))
+    `(progn
+       (setq this-command 'next-line)
+       ,normalize-temporary-goal-column
+       (if (not (memq last-command '(next-line previous-line)))
+           (setq temporary-goal-column
+                 (if (and evil-track-eol
+                          (evil-eolp)
+                          (memq real-last-command '(move-end-of-line 
evil-end-of-line)))
+                     most-positive-fixnum
+                   (current-column))))
+       ,@body
+       (if evil-start-of-line
+           (evil-first-non-blank)
+         ,normalize-temporary-goal-column
+         (line-move-to-column (truncate (or goal-column 
temporary-goal-column)))))))
 
 (defun evil-narrow (beg end)
   "Restrict the buffer to BEG and END.



reply via email to

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