From 99e8314b3bac2fa842817b67f749974beb721b9f Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 26 Feb 2008 07:53:40 +0000 Subject: * misc/ruby-mode.el (ruby-calculate-indent): should distinguish comment and # in strings. [ruby-dev:33874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 59efd66f66..49a43ae17d 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 -- cgit v1.2.1