[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby f1ea8f8a69 103/265: Restore compatibility with Em
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby f1ea8f8a69 103/265: Restore compatibility with Emacs < 24.4 |
Date: |
Sat, 9 Jul 2022 21:59:17 -0400 (EDT) |
branch: elpa/inf-ruby
commit f1ea8f8a6936c3a4fa936f2f3c426eb2da3273cd
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Restore compatibility with Emacs < 24.4
#45
---
inf-ruby.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 8e9442eb94..2dcb7b964f 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -130,6 +130,10 @@ Used for determining the default in the
next one.")
(defvar inf-ruby-at-top-level-prompt-p t)
+(make-variable-buffer-local 'inf-ruby-at-top-level-prompt-p)
+
+(defvar inf-ruby-last-prompt nil)
+(make-variable-buffer-local 'inf-ruby-last-prompt)
(defconst inf-ruby-error-regexp-alist
'(("SyntaxError: \\(?:compile error\n\\)?\\([^\(].*\\):\\([1-9][0-9]*\\):" 1
2)
@@ -229,9 +233,10 @@ The following commands are available:
(defun inf-ruby-output-filter (output)
"Check if the current prompt is a top-level prompt."
(unless (zerop (length output))
- (setq inf-ruby-at-top-level-prompt-p
+ (setq inf-ruby-last-prompt (car (last (split-string output "\n")))
+ inf-ruby-at-top-level-prompt-p
(string-match inf-ruby-first-prompt-pattern
- (car (last (split-string output "\n")))))))
+ inf-ruby-last-prompt))))
;; adapted from replace-in-string in XEmacs (subr.el)
(defun inf-ruby-remove-in-string (str regexp)
@@ -441,8 +446,7 @@ Then switch to the process buffer."
(kept "") completions
;; Guard against running completions in parallel:
inf-ruby-at-top-level-prompt-p)
- (unless (equal "(rdb:1) " (buffer-substring (car comint-last-prompt)
- (cdr comint-last-prompt)))
+ (unless (equal "(rdb:1) " inf-ruby-last-prompt)
(set-process-filter proc (lambda (proc string) (setq kept (concat kept
string))))
(unwind-protect
(let ((completion-snippet
- [nongnu] elpa/inf-ruby 91424afd17 192/265: inf-ruby-console-*: Make sure default-directory is set to the project root, (continued)
- [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
- [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 <=
- [nongnu] elpa/inf-ruby 6d7f1dc10a 085/265: Merge remote-tracking branch 'bbatsov/style', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 409fd736d4 104/265: Complete on an empty line, too, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5759a9187c 132/265: Recommend setting Pry.config.correct_indent to false, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1d6fef6eba 171/265: Wrap SMIE tokenizer functions to bind inhibit-field-text-motion, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 12f7f0750c 159/265: Automatically returning to the previous compilation mode after typing, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby df014b0717 177/265: Merge pull request #90 from codeasone/support-single-quoted-gemspec-name, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 74ca3a7f97 191/265: in a{, new} buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5aaa7e879c 193/265: Only launch one console per project, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 62c1c72d8e 205/265: Add autoload, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 86db14c315 022/265: Rename: inf-ruby-keys -> inf-ruby-setup-keybindings, ELPA Syncer, 2022/07/09