[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 3940b91ac5 252/265: Create load current ruby file
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 3940b91ac5 252/265: Create load current ruby file fn and key binding |
Date: |
Sat, 9 Jul 2022 21:59:30 -0400 (EDT) |
branch: elpa/inf-ruby
commit 3940b91ac57153a488294291ecf8bddd5cdadee5
Author: tunnes <ayrton.tunes@outlook.com>
Commit: tunnes <ayrton.tunes@outlook.com>
Create load current ruby file fn and key binding
Currently we already have the load ruby file feature, but it needs to
provide a
file that must be loaded on the inferior Ruby process, but usually we might
want
to load the file that we are changing on the current buffer, this change
aims to
adderess that.
---
inf-ruby.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/inf-ruby.el b/inf-ruby.el
index b35f7d9495..24f09191c0 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -165,6 +165,7 @@ graphical char in all other prompts.")
(defvar inf-ruby-mode-map
(let ((map (copy-keymap comint-mode-map)))
(define-key map (kbd "C-c C-l") 'ruby-load-file)
+ (define-key map (kbd "C-c C-k") 'ruby-load-current-file)
(define-key map (kbd "C-x C-e") 'ruby-send-last-stmt)
(define-key map (kbd "TAB") 'completion-at-point)
(define-key map (kbd "C-x C-q") 'inf-ruby-maybe-switch-to-compilation)
@@ -215,6 +216,7 @@ next one.")
(define-key map (kbd "C-c M-r") 'ruby-send-region-and-go)
(define-key map (kbd "C-c C-z") 'ruby-switch-to-inf)
(define-key map (kbd "C-c C-l") 'ruby-load-file)
+ (define-key map (kbd "C-c C-k") 'ruby-load-current-file)
(define-key map (kbd "C-c C-s") 'inf-ruby)
(easy-menu-define
inf-ruby-minor-mode-menu
@@ -652,6 +654,11 @@ Then switch to the process buffer."
file-name
"\"\)\n")))
+(defun ruby-load-current-file ()
+ "Load the current ruby file into the inferior Ruby process."
+ (interactive)
+ (ruby-load-file (buffer-name)))
+
(defun ruby-send-buffer ()
"Send the current buffer to the inferior Ruby process."
(interactive)
- [nongnu] elpa/inf-ruby b228a7d9af 225/265: inf-ruby-error-regexp-alist: bol-anchor for better performance, (continued)
- [nongnu] elpa/inf-ruby b228a7d9af 225/265: inf-ruby-error-regexp-alist: bol-anchor for better performance, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1b89400e6f 227/265: Add '--nomultiline' with newer IRB versions, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 41e5ed3a88 229/265: run-ruby: Update for the latest change, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6291121307 236/265: It is a triangle, right?, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 2ec94b4b33 237/265: Exclude --noreadline when Irb version is > 1.2.0, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby bb7d4ca086 240/265: Merge pull request #141 from sharmanr/send-definition, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1fc972ecda 243/265: Merge pull request #142 from PuercoPop/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c6990a60c7 244/265: Implement inf-ruby-reuse-older-buffers, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f484fa82cc 247/265: ruby-send-last-stmt: New command, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6943bf1e78 254/265: Apply code review - print evaluation as default, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3940b91ac5 252/265: Create load current ruby file fn and key binding,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby c49b3d360a 253/265: Apply code review - remove unecessary line, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby bae94383d5 256/265: Stop wrapping the evaluation result in quotes, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ff25dda5e2 259/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f892e6e74f 262/265: Set env var RUBY_DEBUG_NO_RELINE, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4ddf6b3889 265/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c97c8184ca 070/265: Take `inf-ruby-setup-keybindings' out of the picture, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 673d6b66b0 064/265: Do Bond completion in the middle of the line, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1bcb92d3ec 121/265: Revert "Work around pry/pry#1267", ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 74ae145ecd 078/265: Make MELPA link point to inf-ruby's subpage, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f4efbee52a 077/265: Drop the .el, ELPA Syncer, 2022/07/09