[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 4da1cca555 079/265: Set process filter in inf-rub
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 4da1cca555 079/265: Set process filter in inf-ruby-switch-to-compilation |
Date: |
Sat, 9 Jul 2022 21:59:15 -0400 (EDT) |
branch: elpa/inf-ruby
commit 4da1cca5552fefef675d392485d58c3de89d6383
Author: Teruki Shigitani <teruki.shigitani@mail.google.com>
Commit: Teruki Shigitani <teruki.shigitani@mail.google.com>
Set process filter in inf-ruby-switch-to-compilation
---
inf-ruby.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 6670cd4c13..680aba0c24 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -386,8 +386,8 @@ The reason for this is unknown. Remove this line from
`completions'."
(let* ((proc (inf-ruby-proc))
(line (buffer-substring (save-excursion (beginning-of-thing 'line))
(point)))
- (comint-filt (process-filter proc))
- (kept "") completions)
+ (comint-filt (process-filter proc))
+ (kept "") completions)
(set-process-filter proc (lambda (proc string) (setq kept (concat kept
string))))
(process-send-string
proc
@@ -454,6 +454,9 @@ completion."
(defvar inf-ruby-orig-compilation-mode nil
"Original compilation mode before switching to `inf-ruby-mode'.")
+(defvar inf-ruby-orig-process-filter nil
+ "Original process filter before switching to `inf-ruby-mode`.")
+
(defun inf-ruby-switch-from-compilation ()
"Make the buffer writable and switch to `inf-ruby-mode'.
Recommended for use when the program being executed enters
@@ -467,6 +470,8 @@ interactive mode, i.e. hits a debugger breakpoint."
(setq inf-ruby-orig-compilation-mode mode))
(let ((proc (get-buffer-process (current-buffer))))
(when proc
+ (make-local-variable 'inf-ruby-orig-process-filter)
+ (setq inf-ruby-orig-process-filter (process-filter proc))
(set-process-filter proc 'comint-output-filter))
(when (looking-back inf-ruby-prompt-pattern (line-beginning-position))
(let ((line (match-string 0)))
@@ -479,9 +484,12 @@ interactive mode, i.e. hits a debugger breakpoint."
Otherwise, just toggle read-only status."
(interactive)
(if inf-ruby-orig-compilation-mode
- (let ((orig-mode-line-process mode-line-process))
+ (let ((orig-mode-line-process mode-line-process)
+ (proc (get-buffer-process (current-buffer))))
(funcall inf-ruby-orig-compilation-mode)
- (setq mode-line-process orig-mode-line-process))
+ (setq mode-line-process orig-mode-line-process)
+ (when proc
+ (set-process-filter proc inf-ruby-orig-process-filter)))
(toggle-read-only)))
;;;###autoload
- [nongnu] elpa/inf-ruby 401f191d53 045/265: Touch up docstrings, (continued)
- [nongnu] elpa/inf-ruby 401f191d53 045/265: Touch up docstrings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d308394e7a 041/265: inf-ruby-output-filter: Ignore empty strings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5fa2f80d4e 057/265: inf-ruby-completions: Pass _pry_ when it's defined, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 2c28bc9f57 060/265: inf-ruby-prompt-format: Include whitespace after rdb prompt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c5d2178f17 072/265: Add a basic README, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 819e67542a 114/265: inf-ruby-console-gem: really skip directories under lib, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 441cda957c 101/265: Support completion in Pry 1.0.0.pre1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 8c0aa0911b 118/265: Add "Bugs" section, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby b3747e9574 127/265: Merge pull request #59 from proofit404/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9157d9c561 115/265: inf-ruby-console-gem: when gemspec doesn't modify LOAD_PATH, -I lib, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4da1cca555 079/265: Set process filter in inf-ruby-switch-to-compilation,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby a960434970 096/265: run-ruby: write better docstring, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby dbb8d63324 082/265: Add missing license section to comment front-matter, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 27143433e4 083/265: A few doc fixes, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d91f395070 080/265: Add missing require for thingatpt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4c39cd1509 123/265: Fix a couple of compilation warnings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 00237986d8 130/265: Turn `inf-ruby-implementations` into custom form, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 70da83f8e4 131/265: Merge pull request #54 from wasamasa/feature-defcustom, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f6a6b89e08 161/265: Adapting code to use looking-at over re-search-forward., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 505a7bc140 170/265: Merge pull request #84 from janpath/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4d82095424 174/265: inf-ruby-console-gem: Only try to load Ruby files, ELPA Syncer, 2022/07/09