From 69a7d012c406fd47c2416a87da33c7e6b7df81df Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 23 Jan 2003 20:12:59 +0000 Subject: * 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 --- ChangeLog | 7 +++++++ misc/ruby-mode.el | 22 ++++++---------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index d57ad36655..13ba7c7766 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Jan 24 05:12:55 2003 Nobuyoshi Nakada + + * 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 * eval.c (rb_eval): do not warn discarding already undefined diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index e2eff3ea1f..4fe33eebbf 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -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\\)\\>" -- cgit v1.2.3