summaryrefslogtreecommitdiffstats
path: root/misc/ruby-mode.el
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-26 07:53:40 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-26 07:53:40 +0000
commited095f8f3bdd3ce7be1a7b9d3ba87ce8636cfc98 (patch)
tree4ad03331db768b9eeeae816b3c972acd0c66d33d /misc/ruby-mode.el
parent4c09ab359f004b35047428b89ecdd8539f137e70 (diff)
downloadruby-ed095f8f3bdd3ce7be1a7b9d3ba87ce8636cfc98.tar.gz
ruby-ed095f8f3bdd3ce7be1a7b9d3ba87ce8636cfc98.tar.xz
ruby-ed095f8f3bdd3ce7be1a7b9d3ba87ce8636cfc98.zip
* misc/ruby-mode.el (ruby-calculate-indent): should distinguish
comment and # in strings. [ruby-dev:33874] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r--misc/ruby-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 59efd66f6..49a43ae17 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -713,7 +713,7 @@ The variable ruby-indent-level controls the amount of indentation.
(setq end nil))
(goto-char (or end pos))
(skip-chars-backward " \t")
- (setq begin (if (nth 0 state) pos (cdr (nth 1 state))))
+ (setq begin (if (and end (nth 0 state)) pos (cdr (nth 1 state))))
(setq state (ruby-parse-region parse-start (point))))
(or (bobp) (forward-char -1))
(and