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

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

[nongnu] elpa/inf-ruby e91b349e4f 168/265: Hook up inf-ruby-auto-exit in


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby e91b349e4f 168/265: Hook up inf-ruby-auto-exit inside inf-ruby-auto-enter
Date: Sat, 9 Jul 2022 21:59:23 -0400 (EDT)

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

    Hook up inf-ruby-auto-exit inside inf-ruby-auto-enter
---
 README.md   |  1 -
 inf-ruby.el | 10 ++++------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 453b4db573..21a92732c9 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,6 @@ Additionally, consider adding
 
 ```lisp
 (add-hook 'compilation-filter-hook 'inf-ruby-auto-enter)
-(add-hook 'comint-input-filter-functions 'inf-ruby-auto-exit)
 ```
 
 to your init file to automatically switch from common Ruby compilation
diff --git a/inf-ruby.el b/inf-ruby.el
index b01cbeb2dc..14a2141b3f 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -48,7 +48,6 @@
 ;; Additionally, consider adding
 ;;
 ;;    (add-hook 'compilation-filter-hook 'inf-ruby-auto-enter)
-;;    (add-hook 'comint-input-filter-functions 'inf-ruby-auto-exit)
 ;;
 ;; to your init file to automatically switch from common Ruby compilation
 ;; modes to interact with a debugger.
@@ -750,7 +749,8 @@ Gemfile, it should use the `gemspec' instruction."
                (beginning-of-line)
                (re-search-forward inf-ruby-breakpoint-pattern nil t)))
     ;; Exiting excursion before this call to get the prompt fontified.
-    (inf-ruby-switch-from-compilation)))
+    (inf-ruby-switch-from-compilation)
+    (add-hook 'comint-input-filter-functions 'inf-ruby-auto-exit nil t)))
 
 ;;;###autoload
 (defun inf-ruby-auto-exit (input)
@@ -763,13 +763,11 @@ Gemfile, it should use the `gemspec' instruction."
 
 (defun inf-ruby-enable-auto-breakpoint ()
   (interactive)
-  (add-hook 'compilation-filter-hook 'inf-ruby-auto-enter)
-  (add-hook 'comint-input-filter-functions 'inf-ruby-auto-exit))
+  (add-hook 'compilation-filter-hook 'inf-ruby-auto-enter))
 
 (defun inf-ruby-disable-auto-breakpoint ()
   (interactive)
-  (remove-hook 'compilation-filter-hook 'inf-ruby-auto-enter)
-  (remove-hook 'comint-input-filter-functions 'inf-ruby-auto-exit))
+  (remove-hook 'compilation-filter-hook 'inf-ruby-auto-enter))
 
 ;;;###autoload
 (defun inf-ruby-console-default (dir)



reply via email to

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