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

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

[nongnu] elpa/org-contrib c6dc355e13 2/2: lisp/org-sudoku.el: Switch to


From: ELPA Syncer
Subject: [nongnu] elpa/org-contrib c6dc355e13 2/2: lisp/org-sudoku.el: Switch to lexical binding
Date: Fri, 5 Jan 2024 07:00:04 -0500 (EST)

branch: elpa/org-contrib
commit c6dc355e132176cc493524740c6b4b48b59ad99e
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    lisp/org-sudoku.el: Switch to lexical binding
    
    * lisp/org-sudoku.el (org-sudoku-create):
    (org-sudoku-solve-game): Remove unused variables.
---
 lisp/org-sudoku.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/org-sudoku.el b/lisp/org-sudoku.el
index 55aad9e04c..b81fcae147 100644
--- a/lisp/org-sudoku.el
+++ b/lisp/org-sudoku.el
@@ -1,4 +1,4 @@
-;;; org-sudoku.el --- Create and solve SUDOKU games in Org tables
+;;; org-sudoku.el --- Create and solve SUDOKU games in Org tables  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
 ;;
@@ -56,8 +56,7 @@ a game.")
 (defun org-sudoku-create (nfilled)
   "Create a sudoku game."
   (interactive "nNumber of pre-filled fields: ")
-  (let ((sizesq org-sudoku-size)
-       game)
+  (let (game)
     (cl-loop for i from 1 to org-sudoku-size do
             (cl-loop for j from 1 to org-sudoku-size do
                      (push (list (cons i j) 0) game)))
@@ -209,14 +208,18 @@ If RANDOM is nil, always start with the first allowed 
value and try
 solving from there.
 STOP-AT can be a float time, the solver will abort at that time because
 it is probably stuck."
-  (let (e v v1 allowed next g)
+  (let (e
+       ;; FIXME unused.
+       ;; v
+        v1 allowed next g)
     (when (and stop-at
               (> (float-time) stop-at))
       (setq game nil)
       (throw 'abort nil))
     (while (setq next (org-sudoku-find-next-constrained-field game))
       (setq e (assoc next game)
-           v (nth 1 e)
+           ;; FIXME: Unused, potential fault is logic.
+           ;; v (nth 1 e)
            allowed (nth 2 e))
       (catch 'solved
        (if (= (length allowed) 1)



reply via email to

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