[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby c45cd825e0 195/265: inf-ruby-mode: Use define-der
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby c45cd825e0 195/265: inf-ruby-mode: Use define-derived-mode |
Date: |
Sat, 9 Jul 2022 21:59:25 -0400 (EDT) |
branch: elpa/inf-ruby
commit c45cd825e048b396ae25bef3874fe7f4dd2a2a3b
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
inf-ruby-mode: Use define-derived-mode
Closes #53.
---
inf-ruby.el | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index d21450e2b6..cd85135b54 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -211,7 +211,7 @@ The following commands are available:
(defvar inf-ruby-buffer-impl-name nil "The name of the Ruby shell")
(make-variable-buffer-local 'inf-ruby-buffer-impl-name)
-(defun inf-ruby-mode ()
+(define-derived-mode inf-ruby-mode comint-mode "Inf-Ruby"
"Major mode for interacting with an inferior Ruby REPL process.
A simple IRB process can be fired up with \\[inf-ruby].
@@ -248,11 +248,6 @@ to continue it.
The following commands are available:
\\{inf-ruby-mode-map}"
- (interactive)
- (let ((orig-mode-line-process mode-line-process))
- (comint-mode)
- (when orig-mode-line-process
- (setq mode-line-process orig-mode-line-process)))
(setq comint-prompt-regexp inf-ruby-prompt-pattern)
(ruby-mode-variables)
(when (bound-and-true-p ruby-use-smie)
@@ -260,9 +255,6 @@ The following commands are available:
#'inf-ruby-smie--forward-token)
(set (make-local-variable 'smie-backward-token-function)
#'inf-ruby-smie--backward-token))
- (setq major-mode 'inf-ruby-mode)
- (setq mode-name "Inf-Ruby")
- (use-local-map inf-ruby-mode-map)
(add-hook 'comint-output-filter-functions 'inf-ruby-output-filter nil t)
(setq comint-get-old-input 'inf-ruby-get-old-input)
(set (make-local-variable 'compilation-error-regexp-alist)
@@ -271,8 +263,7 @@ The following commands are available:
(when (eq system-type 'windows-nt)
(setq comint-process-echoes t))
(add-hook 'completion-at-point-functions 'inf-ruby-completion-at-point nil t)
- (compilation-shell-minor-mode t)
- (run-hooks 'inf-ruby-mode-hook))
+ (compilation-shell-minor-mode t))
(defun inf-ruby-output-filter (output)
"Check if the current prompt is a top-level prompt."
@@ -639,11 +630,14 @@ interactive mode, i.e. hits a debugger breakpoint."
(setq buffer-read-only nil)
(buffer-enable-undo)
(let ((mode major-mode)
- (arguments compilation-arguments))
+ (arguments compilation-arguments)
+ (orig-mode-line-process mode-line-process))
(inf-ruby-mode)
(make-local-variable 'inf-ruby-orig-compilation-mode)
(setq inf-ruby-orig-compilation-mode mode)
- (set (make-local-variable 'compilation-arguments) arguments))
+ (set (make-local-variable 'compilation-arguments) arguments)
+ (when orig-mode-line-process
+ (setq mode-line-process orig-mode-line-process)))
(let ((proc (get-buffer-process (current-buffer))))
(when proc
(make-local-variable 'inf-ruby-orig-process-filter)
- [nongnu] elpa/inf-ruby c14a68d164 207/265: Specify environment correctly, (continued)
- [nongnu] elpa/inf-ruby c14a68d164 207/265: Specify environment correctly, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5ae6149a15 211/265: Merge pull request #110 from ppiotrowicz/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a986a1a8c6 260/265: Fix broken behaviour on load-current-ruby-file fn, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby dbf4386bac 264/265: Use a more uniform style, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1940f90fde 017/265: Version 2.2.3, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby b45b057006 044/265: Fix syntax error highlighting, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a85ae010c6 046/265: Handle different prompts, not just the IRB default, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 310da805b6 129/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 67629312ad 120/265: Work around pry/pry#1267, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 866483eecc 190/265: Fix a comment, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c45cd825e0 195/265: inf-ruby-mode: Use define-derived-mode,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby bf380c13e5 198/265: Support JRuby 9000 RVM prompt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a4b1c40202 204/265: inf-ruby-console-script: Extract from ...-default, and up its priority, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 674a2a837f 209/265: Drop a newline and link to the wiki page directly, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1a5aebea0d 213/265: Bring back interactive run-ruby, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby fe1ea9925c 226/265: Restore original compilation-error-regexp-alist, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9bfbce42be 241/265: Untabify and reformat the new code a little, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 92d5d122fa 245/265: Use 'bundle exec' in nomultiline check when needed, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby bcdb97983c 257/265: Merge pull request #154 from tunnes/feature-create-load-current-ruby-file, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5143c84f91 189/265: inf-ruby-proc: Fall back to inf-ruby-buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5b24985b0e 135/265: Check IRB is defined before using it, fixes #64, ELPA Syncer, 2022/07/09