From: nobu.nokada@... Date: 2003-01-23T21:02:13+09:00 Subject: Re: emacs colouring problem Hi, At Thu, 23 Jan 2003 02:00:59 +0900, Mark Probert wrote: > I have found that the following line causes the syntax > highlighter to have problems: > > t.sub!(/\$/, '\$') This patch works? Index: ruby-mode.el =================================================================== RCS file: /cvs/ruby/src/ruby/misc/ruby-mode.el,v retrieving revision 1.62 diff -u -2 -p -r1.62 ruby-mode.el --- ruby-mode.el 9 Jan 2003 16:26:43 -0000 1.62 +++ ruby-mode.el 23 Jan 2003 12:00:40 -0000 @@ -791,20 +791,20 @@ An end of a defun is found by moving for ;; the last $' in the string ,'...$' is not variable ;; the last ?' in the string ,'...?' is not ascii code - ("\\(^\\|[[ \t\n<+(,=]\\)\\('\\)[^'\n\\\\]*\\(\\\\.[^'\n\\\\]*\\)*[?$]\\('\\)" + ("\\(^\\|[[ \t\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\\\\]*\\)*[?$]\\(`\\)" + ("\\(^\\|[[ \t\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\\\\]*\\)*[?$]\\(\"\\)" + ("\\(^\\|[[ \t\n<+(,=]\\)\\(\"\\)\\(\\\\.\\|[^\"\n\\\\]*\\)*\\\\?[?$]\\(\"\\)" (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\\\\]*\\)*\\(/\\)" -- Nobu Nakada