GNU bug report logs -
#7735
A questing mark at the end of a string in ruby-mode
Previous Next
Full log
View this message in rfc822 format
Lennart Borgman <lennart.borgman <at> gmail.com> writes:
> A question mark at the end of a string makes ruby-mode believe the
> string does not end there.
>
> To show this place the following in a ruby-mode buffer:
>
> re_str = wild.join(".*?")
> re = Regexp.new(re_str, 1)
This bug was appeared during the introduction of syntax-propertize.
Stefan, could you take a look?
2010-09-10 Stefan Monnier <monnier <at> iro.umontreal.ca>
* progmodes/ruby-mode.el (ruby-here-doc-beg-re):
Define while compiling.
(ruby-here-doc-end-re, ruby-here-doc-beg-match)
(ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
(syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
(ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
(ruby-here-doc-end-syntax): Only define when
syntax-propertize is not available.
(ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
New functions.
(ruby-in-ppss-context-p): Update to new syntax of heredocs.
(electric-indent-chars): Silence bytecompiler.
(ruby-mode): Use prog-mode, syntax-propertize-function, and
electric-indent-chars.
This bug report was last modified 14 years and 118 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.