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

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

[elpa] externals/gnugo 91f2d79 318/357: [gnugo int] Avoid latent order-o


From: Stefan Monnier
Subject: [elpa] externals/gnugo 91f2d79 318/357: [gnugo int] Avoid latent order-of-evaluation error.
Date: Sun, 29 Nov 2020 14:51:48 -0500 (EST)

branch: externals/gnugo
commit 91f2d798013ea0c410a019ebe8afc80309d8c8e4
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo int] Avoid latent order-of-evaluation error.
    
    * packages/gnugo/gnugo.el (gnugo--decorate): Replace sibling ‘pop’
    calls as args to ‘cons’ w/ explicit sequencing and local vars.
---
 gnugo.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index c644850..b466e24 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -897,9 +897,16 @@ For all other values of RSEL, do nothing and return nil."
    with fruit
    while plist
    do (setf
-       fruit (list (cons                ; DWR: LtR OoE assumed.
-                    (pop plist)
-                    (pop plist)))
+       fruit (list
+              ;; Albeit elegant, this assumes LtR OoE, unfortunately.
+              ;;- (cons
+              ;;   (pop plist)
+              ;;   (pop plist))
+              ;; Instead, we use ‘let*’ for explicit sequencing.
+              ;; Let the Scheme-based Emacs hacking proceed apace!
+              (let* ((k (pop plist))
+                     (v (pop plist)))
+                (cons k v)))
        (cdr tp) fruit
        tp       fruit)))
 



reply via email to

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