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

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

[nongnu] elpa/inf-ruby 6aba85ea70 042/265: inf-ruby-fix-completions-on-w


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 6aba85ea70 042/265: inf-ruby-fix-completions-on-windows: Fix free variable compilation warning
Date: Sat, 9 Jul 2022 21:59:12 -0400 (EDT)

branch: elpa/inf-ruby
commit 6aba85ea708c547afe96934afa939a45a5e0c3a7
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    inf-ruby-fix-completions-on-windows: Fix free variable compilation warning
---
 inf-ruby.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 018fcdeb22..fca91613b3 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -329,12 +329,13 @@ Then switch to the process buffer."
     (replace-regexp-in-string "\n" "\\\\n"
       (replace-regexp-in-string "\\\\" "\\\\\\\\" str))))
 
-(defsubst inf-ruby-fix-completions-on-windows ()
+(defsubst inf-ruby-fix-completions-on-windows (completions)
   "On Windows, the string received by `accept-process-output'
 starts with the last line that was sent to the Ruby process.
 The reason for this is unknown. Remove this line from `completions'."
   (if (eq system-type 'windows-nt)
-    (setq completions (cdr completions))))
+      (cdr completions)
+    completions))
 
 (defun inf-ruby-completions (seed)
   "Return a list of completions for the line of ruby code starting with SEED."
@@ -347,7 +348,7 @@ The reason for this is unknown. Remove this line from 
`completions'."
     (while (and (not (string-match inf-ruby-prompt-pattern kept))
                 (accept-process-output proc 2)))
     (setq completions (butlast (split-string kept "\r?\n") 2))
-    (inf-ruby-fix-completions-on-windows)
+    (setq completions (inf-ruby-fix-completions-on-windows completions))
     (set-process-filter proc comint-filt)
     completions))
 



reply via email to

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