[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 1dd007201a 197/265: Do not overwrite inf-ruby-buf
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 1dd007201a 197/265: Do not overwrite inf-ruby-buffer if it's still live |
Date: |
Sat, 9 Jul 2022 21:59:26 -0400 (EDT) |
branch: elpa/inf-ruby
commit 1dd007201a6f1465791edaea7e80e3adbeda5a45
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Do not overwrite inf-ruby-buffer if it's still live
This way, if the first inf-ruby buffer was non-project specific, we
don't overwrite the variable's value with a project-specific one.
And the Ruby buffers outside of any projects use the first one.
---
inf-ruby.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 5173c3496b..e5c9c2f5a6 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -217,7 +217,7 @@ The following commands are available:
\\{inf-ruby-minor-mode-map}"
:lighter "" :keymap inf-ruby-minor-mode-map)
-(defvar inf-ruby-buffer nil "Last used Ruby process buffer.")
+(defvar inf-ruby-buffer nil "The oldest live Ruby process buffer.")
(defvar inf-ruby-buffers nil "List of Ruby process buffers.")
@@ -372,7 +372,10 @@ Runs the hooks `comint-mode-hook' and `inf-ruby-mode-hook'.
(setq inf-ruby-buffer-impl-name name
inf-ruby-buffer-command command))
- (pop-to-buffer (setq inf-ruby-buffer (current-buffer))))
+ (unless (and inf-ruby-buffer (comint-check-proc inf-ruby-buffer))
+ (setq inf-ruby-buffer (current-buffer)))
+
+ (pop-to-buffer (current-buffer)))
(defun run-ruby-or-pop-to-buffer (command &optional name buffer)
(if (not (and buffer
- [nongnu] elpa/inf-ruby 488fc1b129 147/265: Refine the previous change, (continued)
- [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, 2022/07/09
- [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 <=
- [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
- [nongnu] elpa/inf-ruby b3ee3093b5 105/265: Autoloading inf-ruby-minor-mode is more important, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c5bfcf59eb 112/265: Turn string into a choice, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f1ea8f8a69 103/265: Restore compatibility with Emacs < 24.4, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6d7f1dc10a 085/265: Merge remote-tracking branch 'bbatsov/style', ELPA Syncer, 2022/07/09