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

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

[nongnu] elpa/inf-ruby 03e969c89a 146/265: Retain compilation-arguments


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 03e969c89a 146/265: Retain compilation-arguments
Date: Sat, 9 Jul 2022 21:59:21 -0400 (EDT)

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

    Retain compilation-arguments
---
 inf-ruby.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index a6d4b14da8..0f3622ac2b 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -539,6 +539,9 @@ 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
@@ -546,10 +549,13 @@ interactive mode, i.e. hits a debugger breakpoint."
   (interactive)
   (setq buffer-read-only nil)
   (buffer-enable-undo)
-  (let ((mode major-mode))
+  (let ((mode major-mode)
+        (arguments compilation-arguments))
     (inf-ruby-mode)
     (make-local-variable 'inf-ruby-orig-compilation-mode)
-    (setq inf-ruby-orig-compilation-mode mode))
+    (make-local-variable 'inf-ruby-orig-compilation-arguments)
+    (setq inf-ruby-orig-compilation-mode mode
+          inf-ruby-orig-compilation-arguments arguments))
   (let ((proc (get-buffer-process (current-buffer))))
     (when proc
       (make-local-variable 'inf-ruby-orig-process-filter)
@@ -568,9 +574,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)
             (filter inf-ruby-orig-process-filter))
         (funcall inf-ruby-orig-compilation-mode)
-        (setq mode-line-process orig-mode-line-process)
+        (setq mode-line-process orig-mode-line-process
+              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]