[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby f2e7cc8313 025/265: Restrict a Windows-specific f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby f2e7cc8313 025/265: Restrict a Windows-specific fix to be applied only on Windows platforms. |
Date: |
Sat, 9 Jul 2022 21:59:11 -0400 (EDT) |
branch: elpa/inf-ruby
commit f2e7cc831324e144150e1ec25d571c18c4ea6d89
Author: Cornelius Mika <cornelius.mika@gmail.com>
Commit: Cornelius Mika <cornelius.mika@gmail.com>
Restrict a Windows-specific fix to be applied only on Windows platforms.
---
inf-ruby.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 0e2d6221a1..802e200609 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -329,6 +329,13 @@ Then switch to the process buffer."
(replace-regexp-in-string "\n" "\\\\n"
(replace-regexp-in-string "\\\\" "\\\\\\\\" str))))
+(defun inf-ruby-fix-completions-on-windows ()
+ "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))))
+
(defun inf-ruby-completions (seed)
"Return a list of completions for the line of ruby code starting with SEED."
(let* ((proc (get-buffer-process inf-ruby-buffer))
@@ -339,7 +346,8 @@ Then switch to the process buffer."
(ruby-escape-single-quoted seed)))
(while (and (not (string-match inf-ruby-prompt-pattern kept))
(accept-process-output proc 2)))
- (setq completions (cdr (butlast (split-string kept "\r?\n") 2)))
+ (setq completions (butlast (split-string kept "\r?\n") 2))
+ (inf-ruby-fix-completions-on-windows)
(set-process-filter proc comint-filt)
completions))
- [nongnu] elpa/inf-ruby 106972ded1 165/265: Touch up docstrings and rename MODE-VAR to MODE, (continued)
- [nongnu] elpa/inf-ruby 106972ded1 165/265: Touch up docstrings and rename MODE-VAR to MODE, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0ed06255ec 179/265: Allow running multiple ruby processes, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 536a68528c 184/265: Make ruby-last-ruby-buffer buffer-local, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d1e6e9e669 003/265: Bugfix: Escape the completion seed., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ed768ce413 004/265: Evaluate code sent via 'ruby-send-region' in the same binding as the REPL., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 68a7ad32fa 006/265: Bugfix: Don't stall Emacs when there is no valid completion output., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 06e2b1e29e 008/265: Bugfix: Complete only when point is at a top-level prompt., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ec0d30ad19 019/265: Merge pull request #5 from lewang/quote_fix, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f52d33ec43 016/265: Transform an unneded case statement into an if statement., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 28c24e3e70 021/265: Merge pull request #7 from lewang/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f2e7cc8313 025/265: Restrict a Windows-specific fix to be applied only on Windows platforms.,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby 415eb2dfd8 018/265: allow quoted parameters to run-ruby, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby fd0eccaedf 020/265: use `eval-after' to bind keys instead of hooking, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 910658e1f3 029/265: Use 'ruby-backward-sexp' instead of 'backward-sexp', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4f4f0ccdf7 026/265: Version 2.2.4, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 032d3f024e 024/265: Merge pull request #9 from DrJKL/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 505b3cd216 023/265: Changed the manual installation comments to reflect the change from inf-ruby-keys to inf-ruby-setup-keybindings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5d159adddd 030/265: Fix commit 'Store non-whitespace input in the REPL history, ...', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 87b96ca887 035/265: Drop --inf-ruby-mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby bf49b368a5 047/265: Fix #18, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby cfb1c89a25 038/265: inf-ruby-minor-mode-map: Initialize to the resulting map, ELPA Syncer, 2022/07/09