summaryrefslogtreecommitdiff
path: root/sample/ruby-mode.el
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-11-25 03:31:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-11-25 03:31:19 +0000
commitce8859c5563493a94f57d3b630e7b9c1d3cd656f (patch)
treeeefe3446c88ef90ff4d3578ae925b4e69d762822 /sample/ruby-mode.el
parent75ff8fdb16fa0a733512e61350c9844ea530ad35 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/ruby-mode.el')
-rw-r--r--sample/ruby-mode.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el
index d379a633c3..8bf843c1ea 100644
--- a/sample/ruby-mode.el
+++ b/sample/ruby-mode.el
@@ -209,7 +209,7 @@ The variable ruby-indent-level controls the amount of indentation.
(looking-at ruby-block-mid-re))
(progn
(goto-char (match-end 0))
- (looking-at "[^_]")))))))))
+ (looking-at "\\>")))))))))
(defun ruby-parse-region (start end)
(let ((indent-point end)
@@ -253,7 +253,7 @@ The variable ruby-indent-level controls the amount of indentation.
((looking-at "%")
(cond
((and (not (eobp)) (ruby-expr-beg)
- (looking-at "%[Qqrx]?\\(.\\)"))
+ (looking-at "%[Qqrxw]?\\(.\\)"))
(setq w (buffer-substring (match-beginning 1)
(match-end 1)))
(cond
@@ -598,7 +598,7 @@ An end of a defun is found by moving forward from the beginning of one."
("[^$\\?]\\('[^\\']*\\(\\\\\\(.\\|\n\\)[^\\']*\\)*'\\)" 1 string)
("[^$\\?]\\(`[^\\`]*\\(\\\\\\(.\\|\n\\)[^\\`]*\\)*`\\)" 1 string)
("^\\s *#.*$" nil comment)
- ("[^$@?\\]\\(#[^$@{].*$\\)" 1 comment)
+ ("[^$@?\\]\\(#[^$@{\n].*$\\)" 1 comment)
("[^a-zA-Z_]\\(\\?\\(\\\\[CM]-\\)*.\\)" 1 string)
("^\\s *\\(require\\|load\\).*$" nil include)
("^\\s *\\(include\\|alias\\|undef\\).*$" nil decl)
@@ -624,6 +624,7 @@ An end of a defun is found by moving forward from the beginning of one."
"break"
"case"
"class"
+ "def"
"do"
"elsif"
"else"
@@ -652,7 +653,7 @@ An end of a defun is found by moving forward from the beginning of one."
"while"
)
"\\|")
- "\\)[ \n\t()]")
+ "\\)\\b")
2)
;; variables
'("\\(^\\|[^_]\\)\\b\\(nil\\|self\\|true\\|false\\)\\b\\([^_]\\|$\\)"
@@ -664,8 +665,8 @@ 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]+[^ \t(]*"
- 0 font-lock-function-name-face t))
+ '("^\\s *def[ \t]+\\([^ \t(]*\\)"
+ 1 font-lock-function-name-face t))
"*Additional expressions to highlight in ruby mode.")
(if (and (>= (string-to-int emacs-version) 19)
(not (featurep 'xemacs)))