summaryrefslogtreecommitdiff
path: root/misc/ruby-mode.el
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-10 07:03:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-10 07:03:36 +0000
commit1ce6f065b519284a5ad7135a6db77fcbe1aa778a (patch)
tree79c663a365cc039f46e51658f288538eade86658 /misc/ruby-mode.el
parentef45458e9405c57ab4f59f648c4001ea4df30489 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r--misc/ruby-mode.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 787a048..33b88a2 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -442,7 +442,6 @@ The variable ruby-indent-level controls the amount of indentation.
(cond
((nth 0 state) ; within string
(setq indent nil)) ; do nothing
-
((car (nth 1 state)) ; in paren
(goto-char (cdr (nth 1 state)))
(if (eq (car (nth 1 state)) ?\( )
@@ -463,8 +462,7 @@ The variable ruby-indent-level controls the amount of indentation.
(goto-char parse-start)
(back-to-indentation)
(setq indent (ruby-indent-size (current-column) (nth 2 state)))))
- ))
-
+ ))
((and (nth 2 state)(> (nth 2 state) 0)) ; in nest
(if (null (cdr (nth 1 state)))
(error "invalid nest"))
@@ -485,7 +483,7 @@ The variable ruby-indent-level controls the amount of indentation.
((and (nth 2 state) (< (nth 2 state) 0)) ; in negative nest
(setq indent (ruby-indent-size (current-column) (nth 2 state)))))
-
+
(cond
(indent
(goto-char indent-point)
@@ -514,7 +512,7 @@ The variable ruby-indent-level controls the amount of indentation.
(setq end (point))
(beginning-of-line)
(if (re-search-forward "^\\s *#" end t)
- (beginning-of-line)
+ (forward-line 1)
(setq done t))))
(setq bol (point))
(end-of-line)
@@ -538,9 +536,10 @@ The variable ruby-indent-level controls the amount of indentation.
(goto-char (match-end 0))
(not (looking-at "[a-z_]"))))
(and (looking-at ruby-operator-re)
+ (not (eq (char-after (1- (point))) ??))
+ (not (eq (char-after (1- (point))) ?$))
(or (not (eq ?/ (char-after (point))))
(null (nth 0 (ruby-parse-region parse-start (point)))))
- (not (eq (char-after (1- (point))) ?$))
(or (not (eq ?| (char-after (point))))
(save-excursion
(or (eolp) (forward-char -1))