Skip to content
Browse files

Use 'ruby-backward-sexp' instead of 'backward-sexp'

Ruby-mode doesn't customize 'forward-sexp-function', but it does have its own
forward/backward-sexp commands. With this change, you can put the point after
a class definition or after the end of a do/end block, press `C-x C-e`, and it
will send the whole definition or block to the repl.
  • Loading branch information...
1 parent 5fa2849 commit 910658e1f30e6120a6cbd06bc49487c678b7b0c5 @dgutov dgutov committed with Dec 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 inf-ruby.el
2 inf-ruby.el
@@ -261,7 +261,7 @@ Must not contain ruby meta characters.")
(defun ruby-send-last-sexp ()
"Send the previous sexp to the inferior Ruby process."
- (ruby-send-region (save-excursion (backward-sexp) (point)) (point)))
+ (ruby-send-region (save-excursion (ruby-backward-sexp) (point)) (point)))
(defun ruby-send-block ()
"Send the current block to the inferior Ruby process."

0 comments on commit 910658e

Please sign in to comment.
Something went wrong with that request. Please try again.