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

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

[nongnu] elpa/recomplete 692ab36f17 1/2: Cleanup: formatting


From: ELPA Syncer
Subject: [nongnu] elpa/recomplete 692ab36f17 1/2: Cleanup: formatting
Date: Mon, 9 Jan 2023 01:01:34 -0500 (EST)

branch: elpa/recomplete
commit 692ab36f175ce0d92bbb889e66aaacb2c711d42f
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Cleanup: formatting
---
 recomplete.el | 47 ++++++++++++++++++++++-------------------------
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/recomplete.el b/recomplete.el
index 0c185a7fb0..a3c8144484 100644
--- a/recomplete.el
+++ b/recomplete.el
@@ -334,7 +334,7 @@ Return the region replaced."
             (cond
              ((eq (aref str (- len i-next)) (char-after (- end i-next)))
               (setq i i-next))
-             (t ;; Break.
+             (t ; Break.
               (setq len-test i))))))
       (unless (zerop i)
         (setq i-end (- len i))
@@ -349,7 +349,7 @@ Return the region replaced."
           (cond
            ((eq (aref str i) (char-after (+ beg i)))
             (setq i (1+ i)))
-           (t ;; Break.
+           (t ; Break.
             (setq len-test i)))))
       (unless (zerop i)
         (setq i-beg i)
@@ -388,16 +388,16 @@ step onto the next item)."
   (when (eq buffer-undo-list t)
     (user-error "(re)complete: undo disabled for this buffer"))
 
-  (let
-      ( ;; Initial values if not overwritten by the values in 
`recomplete--alist'.
-       (point-init (point))
-       (buffer-undo-list-init buffer-undo-list)
-       (pending-undo-list-init pending-undo-list)
-       (cycle-index (or cycle-index-init 0))
-       (cycle-reverse nil)
-       (fn-cache nil)
+  (let ((buffer-undo-list-init buffer-undo-list)
+        (pending-undo-list-init pending-undo-list)
+        (cycle-index (or cycle-index-init 0))
+        (cycle-reverse nil)
+        (fn-cache nil)
 
-       (message-list (list)))
+        ;; Initial values if not overwritten by the values in 
`recomplete--alist'.
+        (point-init (point))
+
+        (message-list (list)))
 
     ;; Roll-back and cycle through corrections.
     (let ((alist recomplete--alist))
@@ -432,10 +432,8 @@ step onto the next item)."
 
         ;; Undo with strict checks so we know _exactly_ whats going on
         ;; and don't allow some unknown state to be entered.
-        (let
-            ( ;; Skip the 'nil' car of the list.
-             (undo-data (cdr buffer-undo-list))
-             (undo-data-init (cdr buffer-undo-list-init)))
+        (let ((undo-data (cdr buffer-undo-list)) ; Skip the 'nil' car of the 
list.
+              (undo-data-init (cdr buffer-undo-list-init)))
 
 
           ;; It's possible the last action did not add an undo step.
@@ -452,16 +450,15 @@ step onto the next item)."
             (unless (eq undo-data-init (recomplete--undo-next undo-data))
               (user-error "(re)complete: unexpected undo-state before undo, 
abort!"))
 
-            (let
-                ( ;; Roll back the edit, override `this-command' so we have 
predictable undo behavior.
-                 ;; Also so setting it doesn't overwrite the current 
`this-command'
-                 ;; which is checked above as `last-command'.
-                 (this-command nil)
-                 ;; We never want to undo in region (unlikely, set just to be 
safe).
-                 (undo-in-region nil)
-                 ;; The "Undo" message is just noise, don't log it or display 
it.
-                 (inhibit-message t)
-                 (message-log-max nil))
+            ;; Roll back the edit, override `this-command' so we have 
predictable undo behavior.
+            ;; Also so setting it doesn't overwrite the current `this-command'
+            ;; which is checked above as `last-command'.
+            (let ((this-command nil)
+                  ;; We never want to undo in region (unlikely, set just to be 
safe).
+                  (undo-in-region nil)
+                  ;; The "Undo" message is just noise, don't log it or display 
it.
+                  (inhibit-message t)
+                  (message-log-max nil))
 
               (undo-only)
 



reply via email to

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