branch: elpa/inf-ruby
commit aad537f010a64e8123b610329fd09fedc82abb41
Merge: 24c08fca2a 5bb2919691
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Merge pull request #82 from mkaschenko/ruby-send-buffer
Add ruby-send-buffer function
---
inf-ruby.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/inf-ruby.el b/inf-ruby.el
index dd063bf916..06eeb0af4b 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -475,6 +475,13 @@ Then switch to the process buffer."
file-name
"\"\)\n")))
+(defun ruby-send-buffer ()
+ "Send the current buffer to the inferior Ruby process."
+ (interactive)
+ (save-restriction
+ (widen)
+ (ruby-send-region (point-min) (point-max))))
+
(defun ruby-escape-single-quoted (str)
"Escape single quotes, double quotes and newlines in STR."
(replace-regexp-in-string "'" "\\\\'"