[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 0b27477d11 166/265: Tweak auto-enter and auto-exi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 0b27477d11 166/265: Tweak auto-enter and auto-exit to work better (or at all) |
Date: |
Sat, 9 Jul 2022 21:59:23 -0400 (EDT) |
branch: elpa/inf-ruby
commit 0b27477d11103d383867a65a8ca96ed878f66346
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Tweak auto-enter and auto-exit to work better (or at all)
---
inf-ruby.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index bdd20718f1..da7d0c91ab 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -743,18 +743,20 @@ Gemfile, it should use the `gemspec' instruction."
(defun inf-ruby-auto-enter ()
"Switch to `inf-ruby-mode' if the breakpoint pattern matches the current
line."
- (when (inf-ruby-in-ruby-compilation-modes major-mode)
- (save-excursion
- (beginning-of-line)
- (when (re-search-forward inf-ruby-breakpoint-pattern
- (line-end-position) t)
- (inf-ruby-switch-from-compilation)))))
+ (when (and (inf-ruby-in-ruby-compilation-modes major-mode)
+ (save-excursion
+ (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)))
(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)
- (if (member input '("quit" "exit" ""))
- (inf-ruby-maybe-switch-to-compilation))))
+ (if (member input '("quit\n" "exit\n" ""))
+ ;; After the current command completes, otherwise we get a
+ ;; marker error.
+ (run-with-idle-timer 0 nil #'inf-ruby-maybe-switch-to-compilation))))
(defun inf-ruby-setup-auto-breakpoint ()
(add-hook 'compilation-filter-hook 'inf-ruby-auto-enter)
- [nongnu] elpa/inf-ruby dc7df6541e 091/265: inf-ruby-completions: Make safer, (continued)
- [nongnu] elpa/inf-ruby dc7df6541e 091/265: inf-ruby-completions: Make safer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 96c48e0270 084/265: Save inf-ruby-orig-process-filter value locally before switching mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e8cd8c4a28 076/265: Touch up README, docstrings and comments, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 24c08fca2a 152/265: Fix the previous commit, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 171c4e9e38 139/265: Update subheaders, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 96408b9cad 149/265: Update MELPA URL, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c353603f1f 140/265: Merge pull request #68 from Trevoke/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0885009c11 012/265: Version 2.2, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 37bae51429 015/265: Replace pointless setfs with setqs., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 80a1c2c3d2 031/265: Fix commit 'Store non-whitespace input in the REPL history, ...', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0b27477d11 166/265: Tweak auto-enter and auto-exit to work better (or at all),
ELPA Syncer <=
- [nongnu] elpa/inf-ruby db89398caa 173/265: Recognize byebug prompt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby beb39ad5af 148/265: Define and use ruby-print-result, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5c73e1a79c 143/265: Use INSIDE_EMACS, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 57b3419be3 175/265: Allow single quoted gemspec name, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 73e2142a99 194/265: Add new option inf-ruby-console-environment, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 7aa37e9154 199/265: Add ruby-send-line function, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 05984b3d24 201/265: inf-ruby-console-read-directory: Fix for predicates with wildcards, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 401f191d53 045/265: Touch up docstrings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d308394e7a 041/265: inf-ruby-output-filter: Ignore empty strings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5fa2f80d4e 057/265: inf-ruby-completions: Pass _pry_ when it's defined, ELPA Syncer, 2022/07/09