path: root/misc/ruby-mode.el
diff options
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-06 22:38:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-06 22:38:08 +0000
commit120772041e7addfc574e3b045cb4fc6a3517f4f4 (patch)
tree4fd85446564f9f1430d623827a5c36bbcdf8dc64 /misc/ruby-mode.el
parente39aa51dfafffc7de369247e62ce5245ed91f7f3 (diff)
* misc/emacs-mode.el: don't set case-fold-search globally to nil;
instead just set it when we need it. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index f01af9d0af..17ce8c33c7 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -196,7 +196,7 @@ Also ignores spaces after parenthesis when 'space."
(eval-when-compile (require 'cl))
(defun ruby-imenu-create-index-in-block (prefix beg end)
- (let ((index-alist '())
+ (let ((index-alist '()) (case-fold-search nil)
name next pos decl sing)
(goto-char beg)
(while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^\(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^\(\n ]+\\)\\)" end t)
@@ -244,7 +244,6 @@ Also ignores spaces after parenthesis when 'space."
(defun ruby-mode-variables ()
(set-syntax-table ruby-mode-syntax-table)
(setq local-abbrev-table ruby-mode-abbrev-table)
- (setq case-fold-search nil)
(make-local-variable 'indent-line-function)
(setq indent-line-function 'ruby-indent-line)
(make-local-variable 'require-final-newline)
@@ -674,6 +673,7 @@ The variable ruby-indent-level controls the amount of indentation.
(let ((indent-point (point))
+ (case-fold-search nil)
state bol eol begin op-end
(paren (progn (skip-syntax-forward " ")
(and (char-after) (matching-paren (char-after)))))
@@ -1150,7 +1150,7 @@ balanced expression is found."
(defun ruby-in-here-doc-p ()
- (let ((old-point (point)))
+ (let ((old-point (point)) (case-fold-search nil))
(catch 'found-beg
(while (re-search-backward ruby-here-doc-beg-re nil t)
@@ -1167,6 +1167,7 @@ buffer position `limit' or the end of the buffer."
(catch 'done
(let ((eol (save-excursion (end-of-line) (point)))
+ (case-fold-search nil)
;; Fake match data such that (match-end 0) is at eol
(end-match-data (progn (looking-at ".*$") (match-data)))
beg-match-data end-re)
@@ -1193,7 +1194,7 @@ buffer position `limit' or the end of the buffer."
(string-to-syntax "|"))))
(defun ruby-here-doc-end-syntax ()
- (let ((pss (syntax-ppss)))
+ (let ((pss (syntax-ppss)) (case-fold-search nil))
(when (eq (syntax-ppss-context pss) 'string)
(goto-char (nth 8 pss))