
Problem colouring regexps in Emacs 20.7
I also encountered the problem where an escaped forward slash in a
regular expression such as /\// cause a large portion of the script
to be coloured like a string/regexp in GNU Emacs 20.7. [Ruby-talk 6002]
I believe this patch fixes the problem. If other users could confirm
this, it can be applied to misc/ruby-mode.el in the distribution.
Thanks, Marc.
(The patch starts on the line beginning with --- and was is unified
diff format.)
--- ../ruby-1.6.3/misc/ruby-mode.el Thu Feb 8 09:18:02 2001
(setq font-lock-syntactic-keywords
'(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil))
- ("\\(/\\)\\([^/\n]\\|\\\\/\\)*\\(/\\)"
+ ("\\(/\\)\\([^/\n]\\|\\/\\)*\\(/\\)"
(1 (7 . ?'))
(3 (7 . ?')))))
(make-local-variable 'font-lock-defaults)