* misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): deal

with escaped $ and ? at the end of strings.  [ruby-talk:62297]

* misc/ruby-mode.el (ruby-font-lock-keywords): added defined?.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-01-23 20:12:59 +00:00
Родитель 333eb8380f
Коммит 69a7d012c4
2 изменённых файлов: 13 добавлений и 16 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Fri Jan 24 05:12:55 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): deal
with escaped $ and ? at the end of strings. [ruby-talk:62297]
* misc/ruby-mode.el (ruby-font-lock-keywords): added defined?.
Thu Jan 23 17:25:04 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_eval): do not warn discarding already undefined

Просмотреть файл

@ -788,24 +788,14 @@ An end of a defun is found by moving forward from the beginning of one."
'(
;; #{ }, #$hoge, #@foo are not comments
("\\(#\\)[{$@]" 1 (1 . nil))
;; the last $' in the string ,'...$' is not variable
;; the last ?' in the string ,'...?' is not ascii code
("\\(^\\|[[ \t\n<+(,=]\\)\\('\\)[^'\n\\\\]*\\(\\\\.[^'\n\\\\]*\\)*[?$]\\('\\)"
(2 (7 . nil))
(4 (7 . nil)))
;; the last $` in the string ,`...$` is not variable
;; the last ?` in the string ,`...?` is not ascii code
("\\(^\\|[[ \t\n<+(,=]\\)\\(`\\)[^`\n\\\\]*\\(\\\\.[^`\n\\\\]*\\)*[?$]\\(`\\)"
(2 (7 . nil))
(4 (7 . nil)))
;; the last $" in the string ,"...$" is not variable
;; the last ?" in the string ,"...?" is not ascii code
("\\(^\\|[[ \t\n<+(,=]\\)\\(\"\\)[^\"\n\\\\]*\\(\\\\.[^\"\n\\\\]*\\)*[?$]\\(\"\\)"
;; the last $', $", $` in the respective string is not variable
;; the last ?', ?", ?` in the respective string is not ascii code
("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*\\\\?[?$]\\(\\2\\)"
(2 (7 . nil))
(4 (7 . nil)))
;; $' $" $` .... are variables
;; ?' ?" ?` are ascii codes
("[?$][#\"'`]" 0 (1 . nil))
("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[?$]\\([#\"'`]\\)" 3 (1 . nil))
;; regexps
("\\(^\\|[=(,~?:;]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)"
(4 (7 . ?/))
@ -874,7 +864,7 @@ An end of a defun is found by moving forward from the beginning of one."
1 font-lock-function-name-face)
;; keywords
(cons (concat
"\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\("
"\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(defined\\?\\|\\("
(mapconcat
'identity
'("alias"
@ -914,7 +904,7 @@ An end of a defun is found by moving forward from the beginning of one."
"yield"
)
"\\|")
"\\)\\>")
"\\)\\>\\)")
2)
;; variables
'("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>"