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

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

[nongnu] elpa/inf-ruby fe1ea9925c 226/265: Restore original compilation-


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby fe1ea9925c 226/265: Restore original compilation-error-regexp-alist
Date: Sat, 9 Jul 2022 21:59:28 -0400 (EDT)

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

    Restore original compilation-error-regexp-alist
---
 inf-ruby.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 02a222d294..abb2fa4360 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -692,6 +692,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-error-regexp-alist nil
+  "Original `compilation-error-regexp-alist' 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
@@ -701,11 +704,14 @@ interactive mode, i.e. hits a debugger breakpoint."
   (buffer-enable-undo)
   (let ((mode major-mode)
         (arguments compilation-arguments)
-        (orig-mode-line-process mode-line-process))
+        (orig-mode-line-process mode-line-process)
+        (orig-error-alist compilation-error-regexp-alist))
     (inf-ruby-mode)
     (make-local-variable 'inf-ruby-orig-compilation-mode)
     (setq inf-ruby-orig-compilation-mode mode)
     (set (make-local-variable 'compilation-arguments) arguments)
+    (set (make-local-variable 'inf-ruby-orig-error-regexp-alist)
+         orig-error-alist)
     (when orig-mode-line-process
       (setq mode-line-process orig-mode-line-process)))
   (let ((proc (get-buffer-process (current-buffer))))
@@ -727,10 +733,12 @@ Otherwise, just toggle read-only status."
       (let ((orig-mode-line-process mode-line-process)
             (proc (get-buffer-process (current-buffer)))
             (arguments compilation-arguments)
-            (filter inf-ruby-orig-process-filter))
+            (filter inf-ruby-orig-process-filter)
+            (errors inf-ruby-orig-error-regexp-alist))
         (funcall inf-ruby-orig-compilation-mode)
         (setq mode-line-process orig-mode-line-process)
         (set (make-local-variable 'compilation-arguments) arguments)
+        (set (make-local-variable 'compilation-error-regexp-alist) errors)
         (when proc
           (set-process-filter proc filter)))
     (toggle-read-only)))



reply via email to

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