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

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

[nongnu] elpa/inf-ruby 488fc1b129 147/265: Refine the previous change


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 488fc1b129 147/265: Refine the previous change
Date: Sat, 9 Jul 2022 21:59:21 -0400 (EDT)

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

    Refine the previous change
---
 inf-ruby.el | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 0f3622ac2b..63e3db49a9 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -539,9 +539,6 @@ Returns the selected completion or nil."
 (defvar inf-ruby-orig-process-filter nil
   "Original process filter before switching to `inf-ruby-mode'.")
 
-(defvar inf-ruby-orig-compilation-arguments nil
-  "Original compilation arguments 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
@@ -553,9 +550,8 @@ interactive mode, i.e. hits a debugger breakpoint."
         (arguments compilation-arguments))
     (inf-ruby-mode)
     (make-local-variable 'inf-ruby-orig-compilation-mode)
-    (make-local-variable 'inf-ruby-orig-compilation-arguments)
-    (setq inf-ruby-orig-compilation-mode mode
-          inf-ruby-orig-compilation-arguments arguments))
+    (setq inf-ruby-orig-compilation-mode mode)
+    (set (make-local-variable 'compilation-arguments) arguments))
   (let ((proc (get-buffer-process (current-buffer))))
     (when proc
       (make-local-variable 'inf-ruby-orig-process-filter)
@@ -574,11 +570,11 @@ Otherwise, just toggle read-only status."
   (if inf-ruby-orig-compilation-mode
       (let ((orig-mode-line-process mode-line-process)
             (proc (get-buffer-process (current-buffer)))
-            (arguments inf-ruby-orig-compilation-arguments)
+            (arguments compilation-arguments)
             (filter inf-ruby-orig-process-filter))
         (funcall inf-ruby-orig-compilation-mode)
-        (setq mode-line-process orig-mode-line-process
-              compilation-arguments arguments)
+        (setq mode-line-process orig-mode-line-process)
+        (set (make-local-variable 'compilation-arguments) arguments)
         (when proc
           (set-process-filter proc filter)))
     (toggle-read-only)))



reply via email to

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