summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el7
-rw-r--r--misc/rubydb3x.el2
2 files changed, 5 insertions, 4 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 2875608f07..50e4f50e87 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))
diff --git a/misc/rubydb3x.el b/misc/rubydb3x.el
index 14e3dac83b..98ce1a1978 100644
--- a/misc/rubydb3x.el
+++ b/misc/rubydb3x.el
@@ -108,6 +108,8 @@ and source-file directory for your debugger."
(gud-def gud-print "p %e" "\C-p" "Evaluate ruby expression at point.")
(setq comint-prompt-regexp "^(rdb:-) ")
+ (if (boundp 'comint-last-output-start)
+ (set-marker comint-last-output-start (point)))
(set (make-local-variable 'paragraph-start) comint-prompt-regexp)
(run-hooks 'rubydb-mode-hook)
)