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

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

[nongnu] elpa/nix-mode d14dd9ce95 196/500: Don't assign to unbound varia


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode d14dd9ce95 196/500: Don't assign to unbound variable: let-bind it locally instead
Date: Sat, 29 Jan 2022 08:27:05 -0500 (EST)

branch: elpa/nix-mode
commit d14dd9ce95f338942093ac2a09d2129ca0e94acf
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>

    Don't assign to unbound variable: let-bind it locally instead
---
 nix-repl.el | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/nix-repl.el b/nix-repl.el
index fed64c0840..a202eed28b 100644
--- a/nix-repl.el
+++ b/nix-repl.el
@@ -55,27 +55,27 @@
     (nix--with-temp-process-filter proc
                                    (goto-char (point-min))
                                    (process-send-string proc (concat prefix 
"\t\"" (nix--char-with-ctrl ?a) "\"\n"))
-                                   (setq i 0)
-                                   (while (and (< (setq i (1+ i)) 100)
-                                               (not (search-forward-regexp 
"\"\\([^\"]*\\)\"[\n]*nix-repl>" nil t)))
-                                     (sleep-for 0.01))
-                                   (let ((new-prefix (match-string 1))
-                                         (start-compl (point)))
-                                     (if (string-suffix-p " " new-prefix)
-                                         (list (substring new-prefix 0 -1))
-                                       (process-send-string proc (concat 
new-prefix "\t\t" (nix--char-with-ctrl ?u) "\n"))
-                                       (goto-char start-compl)
-                                       (setq i 0)
-                                       (while (and (< (setq i (1+ i)) 100)
-                                                   (not (search-forward-regexp
-                                                         
"[\n]+nix-repl>\\|Display all \\([0-9]+\\)" nil t)))
-                                         (sleep-for 0.01))
-                                       (if (match-string 1)
-                                           (progn
-                                             (process-send-string proc "n")
-                                             '())
-                                         (search-backward "\n" nil t)
-                                         (split-string (buffer-substring 
start-compl (1- (point))))))))))
+                                   (let ((i 0))
+                                     (while (and (< (setq i (1+ i)) 100)
+                                                 (not (search-forward-regexp 
"\"\\([^\"]*\\)\"[\n]*nix-repl>" nil t)))
+                                       (sleep-for 0.01))
+                                     (let ((new-prefix (match-string 1))
+                                           (start-compl (point)))
+                                       (if (string-suffix-p " " new-prefix)
+                                           (list (substring new-prefix 0 -1))
+                                         (process-send-string proc (concat 
new-prefix "\t\t" (nix--char-with-ctrl ?u) "\n"))
+                                         (goto-char start-compl)
+                                         (setq i 0)
+                                         (while (and (< (setq i (1+ i)) 100)
+                                                     (not 
(search-forward-regexp
+                                                           
"[\n]+nix-repl>\\|Display all \\([0-9]+\\)" nil t)))
+                                           (sleep-for 0.01))
+                                         (if (match-string 1)
+                                             (progn
+                                               (process-send-string proc "n")
+                                               '())
+                                           (search-backward "\n" nil t)
+                                           (split-string (buffer-substring 
start-compl (1- (point)))))))))))
 
 (defun nix--send-repl (input &optional process mute)
   "Send INPUT to PROCESS.



reply via email to

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