[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 8c8819f84a 167/265: Improve docs, add autoloads,
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 8c8819f84a 167/265: Improve docs, add autoloads, rename and make interactive the setup/remove functions |
Date: |
Sat, 9 Jul 2022 21:59:23 -0400 (EDT) |
branch: elpa/inf-ruby
commit 8c8819f84a3393f5ac985d067e75a7c88384a3b7
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Improve docs, add autoloads, rename and make interactive the setup/remove
functions
---
README.md | 3 ++-
inf-ruby.el | 13 +++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index e430e2150a..453b4db573 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,8 @@ automatically.
Additionally, consider adding
```lisp
-(inf-ruby-setup-auto-breakpoint)
+(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 da7d0c91ab..b01cbeb2dc 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -47,9 +47,10 @@
;;
;; Additionally, consider adding
;;
-;; (add-hook 'after-init-hook 'inf-ruby-switch-setup)
+;; (add-hook 'compilation-filter-hook 'inf-ruby-auto-enter)
+;; (add-hook 'comint-input-filter-functions 'inf-ruby-auto-exit)
;;
-;; to your init file to easily switch from common Ruby compilation
+;; to your init file to automatically switch from common Ruby compilation
;; modes to interact with a debugger.
;;
;; To call `inf-ruby-console-auto' more easily, you can, for example,
@@ -741,6 +742,7 @@ Gemfile, it should use the `gemspec' instruction."
ruby-compilation-mode
projectile-rails-server-mode)))
+;;;###autoload
(defun inf-ruby-auto-enter ()
"Switch to `inf-ruby-mode' if the breakpoint pattern matches the current
line."
(when (and (inf-ruby-in-ruby-compilation-modes major-mode)
@@ -750,6 +752,7 @@ Gemfile, it should use the `gemspec' instruction."
;; Exiting excursion before this call to get the prompt fontified.
(inf-ruby-switch-from-compilation)))
+;;;###autoload
(defun inf-ruby-auto-exit (input)
"Return to the previous compilation mode if INPUT is a debugger exit
command."
(when (inf-ruby-in-ruby-compilation-modes inf-ruby-orig-compilation-mode)
@@ -758,11 +761,13 @@ Gemfile, it should use the `gemspec' instruction."
;; marker error.
(run-with-idle-timer 0 nil #'inf-ruby-maybe-switch-to-compilation))))
-(defun inf-ruby-setup-auto-breakpoint ()
+(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))
-(defun inf-ruby-remove-auto-breakpoint ()
+(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))
- [nongnu] elpa/inf-ruby d776551688 087/265: Add pry to inf-ruby-implementations, (continued)
- [nongnu] elpa/inf-ruby d776551688 087/265: Add pry to inf-ruby-implementations, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 28b84de084 122/265: Advertise using the .pryrc workaround, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 562fa9a422 094/265: Close #37, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 55559dfaac 144/265: fix OpenStruct.new syntax to work with ruby 1.8.7, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 488fc1b129 147/265: Refine the previous change, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby aad537f010 156/265: Merge pull request #82 from mkaschenko/ruby-send-buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3968234eed 150/265: Merge pull request #77 from syohex/update-url, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a2a6434bb3 163/265: Reverting to re-search-forward, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9f02c4a1c8 158/265: Adding ruby-debug pattern, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 2598a06923 164/265: Updating docstrings to follow Emacs' conventions, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 8c8819f84a 167/265: Improve docs, add autoloads, rename and make interactive the setup/remove functions,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby e4337ff378 182/265: inf-ruby-console-default: Support executable "console" script as well, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ac80ea9fd3 188/265: Make run-ruby do one thing only, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 91424afd17 192/265: inf-ruby-console-*: Make sure default-directory is set to the project root, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1dd007201a 197/265: Do not overwrite inf-ruby-buffer if it's still live, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9bd6d24aca 202/265: inf-ruby-console-gem: Enable completion, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 81adadf0f9 203/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby fd8d392fef 224/265: ruby-print-result: Fallback to inf-ruby-buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 03dd9c9d4e 246/265: Avoid creating duplicates in inf-ruby-buffers, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3cdf30dc73 251/265: Apply code review - remove cl-lib and optional args, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3e16215cb2 128/265: Document changing C-c C-s to call inf-ruby-console-auto, ELPA Syncer, 2022/07/09