diff options
author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-10 08:44:05 +0000 |
---|---|---|
committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-10 08:44:05 +0000 |
commit | 36f3603cae6536e571220721e916b8d284cf0675 (patch) | |
tree | eb9605811483000f6980263aa163b4f627ab1c3f /sample/ruby-mode.el | |
parent | fd1d8cdc09ed86e4a0812120a17ff0d7b04adcaf (diff) |
This commit was manufactured by cvs2svn to create tag 'v1_1b7'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_1b7@70 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/ruby-mode.el')
-rw-r--r-- | sample/ruby-mode.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el index 0f56477ea0..d31b2d196e 100644 --- a/sample/ruby-mode.el +++ b/sample/ruby-mode.el @@ -2,11 +2,16 @@ ;;; ruby-mode.el - ;;; ;;; $Author$ -;;; Time-stamp: <97/03/21 01:16:05 matz> +;;; $Date$ ;;; created at: Fri Feb 4 14:49:13 JST 1994 ;;; -(defconst ruby-mode-version "1.0.7") +(defconst ruby-mode-revision "$Revision$") + +(defconst ruby-mode-version + (progn + (string-match "[0-9.]+" ruby-mode-revision) + (substring ruby-mode-revision (match-beginning 0) (match-end 0)))) (defconst ruby-block-beg-re "class\\|module\\|def\\|if\\|unless\\|case\\|while\\|until\\|for\\|begin\\|do" @@ -79,7 +84,7 @@ (modify-syntax-entry ?\` "\"" ruby-mode-syntax-table) (modify-syntax-entry ?# "<" ruby-mode-syntax-table) (modify-syntax-entry ?\n ">" ruby-mode-syntax-table) - (modify-syntax-entry ?\\ "'" ruby-mode-syntax-table) + (modify-syntax-entry ?\\ "\\" ruby-mode-syntax-table) (modify-syntax-entry ?$ "/" ruby-mode-syntax-table) (modify-syntax-entry ?? "_" ruby-mode-syntax-table) (modify-syntax-entry ?_ "_" ruby-mode-syntax-table) @@ -632,10 +637,10 @@ An end of a defun is found by moving forward from the beginning of one." '("\\(^\\|[^_]\\)\\b\\([A-Z]+[a-zA-Z0-9_]*\\)" 2 font-lock-type-face) ;; functions - '("^\\s *def[ \t]+.*$" - 0 font-lock-function-name-face)) + '("^\\s *def[ \t]+[^ \t(]*" + 0 font-lock-function-name-face t)) "*Additional expressions to highlight in ruby mode.") - (if (and (>= (string-to-int emacs-version) 20) + (if (and (>= (string-to-int emacs-version) 19) (not (featurep 'xemacs))) (add-hook 'ruby-mode-hook @@ -645,5 +650,4 @@ An end of a defun is found by moving forward from the beginning of one." '((ruby-font-lock-keywords) nil nil ((?\_ . "w")))))) (add-hook 'ruby-mode-hook (lambda () - (setq font-lock-keywords ruby-font-lock-keywords) - (font-lock-mode 1)))))) + (setq font-lock-keywords ruby-font-lock-keywords)))))) |