[#12164] patch for ext/gdbm — Koji Arai <JCA02266@...>

新井です。

24 messages 2001/02/04
[#12168] Re: patch for ext/gdbm — matz@... (Yukihiro Matsumoto) 2001/02/05

まつもと ゆきひろです

[#12176] Re: patch for ext/gdbm — Koji Arai <JCA02266@...> 2001/02/05

新井です。

[#12179] Re: patch for ext/gdbm — matz@... (Yukihiro Matsumoto) 2001/02/06

まつもと ゆきひろです

[#12219] Re: patch for ext/gdbm — Koji Arai <JCA02266@...> 2001/02/12

新井です。

[#12220] Re: patch for ext/gdbm — Koji Arai <JCA02266@...> 2001/02/12

新井です。

[#12256] set_trace_func — keiju@... (Keiju ISHITSUKA)

けいじゅ@日本ラショナルソフトウェアです.

15 messages 2001/02/17

[#12293] crash on proc without a block — Kenichi Komiya <kom@...1.accsnet.ne.jp>

15 messages 2001/02/25

[#12323] Re: [ruby-list:28364] class definition extension — "K.Kosako" <kosako@...>

ruby-listから移動しました。

13 messages 2001/02/28
[#12324] Re: [ruby-list:28364] class definition extension — matz@... (Yukihiro Matsumoto) 2001/02/28

まつもと ゆきひろです

[ruby-dev:12145] [PATCH] indent of access control & symbol highlight

From: nobu.nakada@...
Date: 2001-02-03 02:19:35 UTC
List: ruby-dev #12145
なかだです。

  単独の private, protected, public, module_function(つまりそれ
以降のコンテクストを変えるもの)は一段インデントを減らした方が見
やすいんじゃないでしょうか。arton さんのパクリですが。

  class C
    ...
  private
    ...
  end

  あと、上の4つと attr, attr_accessor, attr_reader,
attr_writer と、 :symbol? とか :symbol!, :symbol=, :演算子もハ
イライトするようにしてみました。現状でも :symbol? はハイライト
しようとしてるように見えるんですが、効いてないようです。

# どうも \?? よりも \b にマッチしてるような雰囲気。


Index: ruby-mode.el
===================================================================
RCS file: /cvs/ruby/src/ruby/misc/ruby-mode.el,v
retrieving revision 1.25
diff -u -2 -p -r1.25 ruby-mode.el
--- ruby-mode.el	2000/12/25 06:29:27	1.25
+++ ruby-mode.el	2001/02/03 02:08:32
@@ -34,4 +34,8 @@
   )
 
+(defconst ruby-access-label-re
+  "private\\|protected\\|public\\|module_function"
+  )
+
 (defconst ruby-block-op-re
   "and\\|or\\|not"
@@ -53,4 +57,5 @@
 (defconst ruby-negative
   (concat "^[ \t]*\\(\\(" ruby-block-mid-re "\\)\\>\\|\\("
+	    ruby-access-label-re "\\)[ \t]*\\([;#]\\|$\\)\\|\\("
 	    ruby-block-end-re "\\)\\>\\|}\\|\\]\\)")
   )
@@ -697,4 +702,6 @@ An end of a defun is found by moving for
 	     '("alias"
 	       "and"
+	       "attr"
+	       "attr_\\(accessor\\|reader\\|writer\\)"
 	       "begin"
 	       "break"
@@ -712,8 +719,11 @@ An end of a defun is found by moving for
 	       "if"
 	       "in"
-	       "module"
+	       "module\\(_function\\)?"
 	       "next"
 	       "not"
 	       "or"
+	       "private"
+	       "protected"
+	       "public"
 	       "raise"
 	       "redo"
@@ -750,5 +760,5 @@ An end of a defun is found by moving for
        1 font-lock-function-name-face)
      ;; symbols
-     '("\\(^\\|[^:]\\)\\(:\\(\\w\\|_\\)+\\??\\)\\b"
+     '("\\(^\\|[^:]\\)\\(:\\([-+/%&|^~`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|\\[\\]\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b\\)\\)\\)"
        2 font-lock-reference-face))
     "*Additional expressions to highlight in ruby mode."))
@@ -766,5 +776,5 @@ An end of a defun is found by moving for
      ("^\\s *\\(include\\|alias\\|undef\\).*$" nil decl)
      ("^\\s *\\<\\(class\\|def\\|module\\)\\>" "[)\n;]" defun)
-     ("[^_]\\<\\(begin\\|case\\|else\\|elsif\\|end\\|ensure\\|for\\|if\\|unless\\|rescue\\|then\\|when\\|while\\|until\\|do\\|yield\\)\\>\\([^_]\\|$\\)" 1 defun)
+     ("[^_]\\<\\(begin\\|case\\|else\\|elsif\\|end\\|ensure\\|for\\|if\\|unless\\|rescue\\|then\\|when\\|while\\|until\\|do\\|yield\\|private\\|protected\\|public\\|module_function\\|attr\\|attr_\\(accessor\\|reader\\|writer\\)\\)\\>\\([^_]\\|$\\)" 1 defun)
      ("[^_]\\<\\(and\\|break\\|next\\|raise\\|fail\\|in\\|not\\|or\\|redo\\|retry\\|return\\|super\\|yield\\|catch\\|throw\\|self\\|nil\\)\\>\\([^_]\\|$\\)" 1 keyword)
      ("\\$\\(.\\|\\sw+\\)" nil type)


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread

Prev Next