summaryrefslogtreecommitdiff
path: root/sample/ruby-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'sample/ruby-mode.el')
-rw-r--r--sample/ruby-mode.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el
index 20e1abebc96..aa91be330de 100644
--- a/sample/ruby-mode.el
+++ b/sample/ruby-mode.el
@@ -321,12 +321,12 @@ An end of a defun is found by moving forward from the beginning of one."
(defun ruby-reindent-then-newline-and-indent ()
(interactive "*")
- (save-excursion
- (delete-region (point) (progn (skip-chars-backward " \t") (point))))
(insert ?\n)
(save-excursion
(forward-line -1)
- (indent-according-to-mode))
+ (indent-according-to-mode)
+ (end-of-line)
+ (delete-region (point) (progn (skip-chars-backward " \t") (point))))
(indent-according-to-mode))
(defun ruby-encomment-region (beg end)