summaryrefslogtreecommitdiffstats
path: root/misc/ruby-mode.el
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-04 04:51:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-04 04:51:08 +0000
commit52d12453a9941ff91fbcaf1b02914efcb5a7621b (patch)
treea6ad21b14e176e9c3a39a775781b978950315543 /misc/ruby-mode.el
parent960c03333927ea7bc50a29b263e33331edff5460 (diff)
downloadruby-52d12453a9941ff91fbcaf1b02914efcb5a7621b.tar.gz
ruby-52d12453a9941ff91fbcaf1b02914efcb5a7621b.tar.xz
ruby-52d12453a9941ff91fbcaf1b02914efcb5a7621b.zip
19991004
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r--misc/ruby-mode.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 2875608f0..50e4f50e8 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -576,12 +576,11 @@ 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))))
(newline)
(save-excursion
- (forward-line -1)
- (indent-according-to-mode))
+ (end-of-line 0)
+ (indent-according-to-mode)
+ (delete-region (point) (progn (skip-chars-backward " \t") (point))))
(indent-according-to-mode))
(fset 'ruby-encomment-region (symbol-function 'comment-region))