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

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

[nongnu] elpa/parseclj aeac6a1755 118/185: Fix code's organization for 2


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj aeac6a1755 118/185: Fix code's organization for 2-item stack reduction
Date: Tue, 28 Dec 2021 14:05:27 -0500 (EST)

branch: elpa/parseclj
commit aeac6a1755171bad1cd3a9f3eb94fc26d476cf33
Author: Daniel Barreto <daniel.barreto.n@gmail.com>
Commit: Daniel Barreto <daniel.barreto.n@gmail.com>

    Fix code's organization for 2-item stack reduction
    
    Leaves `new-stack` as an uninitialized lexical variable so that we compute 
it
    only when needed.
---
 parseclj-parser.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/parseclj-parser.el b/parseclj-parser.el
index b71c5a0bff..83303d45b5 100644
--- a/parseclj-parser.el
+++ b/parseclj-parser.el
@@ -203,11 +203,9 @@ functions. Additionally the following options are 
recognized
        (t (push token stack)))
 
       ;; Reduce based on top two items on the stack (special prefixed elements)
-      (let (top-value
-            opening-token
-            new-stack)
-        (setq top-value (parseclj--take-value stack value-p))
-        (setq opening-token (parseclj--take-token (nthcdr (length top-value) 
stack) value-p '(:discard :tag)))
+      (let* ((top-value (parseclj--take-value stack value-p))
+             (opening-token (parseclj--take-token (nthcdr (length top-value) 
stack) value-p '(:discard :tag)))
+             new-stack)
         (while (and top-value opening-token)
           ;; (message "Reducing...")
           ;; (message "  - STACK %S" stack)



reply via email to

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