From 120772041e7addfc574e3b045cb4fc6a3517f4f4 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 6 Sep 2008 22:38:08 +0000 Subject: * 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://ci.ruby-lang.org/ruby/trunk@19208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'misc/ruby-mode.el') 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. (save-excursion (beginning-of-line) (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 () (save-excursion - (let ((old-point (point))) + (let ((old-point (point)) (case-fold-search nil)) (beginning-of-line) (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." (beginning-of-line) (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) (save-excursion (goto-char (nth 8 pss)) -- cgit v1.2.3