bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7735: A questing mark at the end of a string in ruby-mode


From: Chong Yidong
Subject: bug#7735: A questing mark at the end of a string in ruby-mode
Date: Sat, 22 Jan 2011 20:07:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Lennart Borgman <lennart.borgman@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@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]