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

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 25 Dec 2010 23:22:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 7735 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier  <monnier <at> iro.umontreal.ca>
Cc: 7735 <at> debbugs.gnu.org, Lennart Borgman <lennart.borgman <at> gmail.com>
Subject: Re: bug#7735: A questing mark at the end of a string in ruby-mode
Date: Sat, 22 Jan 2011 20:07:13 -0500
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.