[前][次][番号順一覧][スレッド一覧]

ruby-changes:7687

From: matz <ko1@a...>
Date: Sun, 7 Sep 2008 07:39:58 +0900 (JST)
Subject: [ruby-changes:7687] Ruby:r19208 (trunk): * misc/emacs-mode.el: don't set case-fold-search globally to nil;

matz	2008-09-07 07:38:08 +0900 (Sun, 07 Sep 2008)

  New Revision: 19208

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19208

  Log:
    * misc/emacs-mode.el: don't set case-fold-search globally to nil;
      instead just set it when we need it.

  Modified files:
    trunk/ChangeLog
    trunk/misc/ruby-mode.el

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19207)
+++ ChangeLog	(revision 19208)
@@ -19,6 +19,9 @@
 
 	* misc/ruby-mode.el: fix a variable-name error.
 
+	* misc/emacs-mode.el: don't set case-fold-search globally to nil;
+	  instead just set it when we need it.
+
 Sun Sep  7 06:31:51 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* file.c (file_expand_path): applied a patch from Nobuhiro Tachino
Index: misc/ruby-mode.el
===================================================================
--- misc/ruby-mode.el	(revision 19207)
+++ misc/ruby-mode.el	(revision 19208)
@@ -196,7 +196,7 @@
 
 (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 @@
 (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 @@
   (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 @@
 
   (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 @@
       (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 @@
         (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))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]