GNU bug report logs - #6286
Ruby Mode Missing Syntax

Previous Next

Package: emacs;

Reported by: Nick Ewing <nick <at> nickewing.net>

Date: Thu, 27 May 2010 22:02:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00247.html

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 6286 <at> debbugs.gnu.org
Subject: bug#6286: General delimited literals in ruby-mode patch
Date: Wed, 25 Apr 2012 03:46:59 +0400
Hi Stefan,

Thanks for the answers.

On 24.04.2012 19:43, Stefan Monnier wrote:
> The maintainership is sadly unclear, indeed.  If someone could try to
> bring the two versions closer (and keep them in sync) that would be very
> appreciated.  Maybe it is enough to bring changes from the Ruby code to
> the Emacs code and not the other way around, but only if there's a clear
> understanding that the Ruby version is "deprecated" and won't see new
> development.  Also, I'm not sure the Emacs version includes all the
> functionality of the current Ruby code, so there's some work to do.

They seem to have a ticket for this, but the comments are all in 
Japanese: http://bugs.ruby-lang.org/issues/5142
And Babelfish doesn't help much.
If nobody beats me to it, I'm going to ask on the mailing list later.

>> This ruby-mode is not compatible with Emacs 23 either way.
>
> That might be: I have not verified that it is indeed
> backward compatible, I just tried to avoid consciously
> introducing incompatibilities.

To be precise, when you load it in 23.3, it complains about prog-mode's 
function definition being void.

I guess that means we don't need to worry about maintaining the "else" 
branch when implementing something that requires `syntax-propertize-rules'?

>> -                       (or (not (eq ?/ c))
>> -                           (null (nth 0 (ruby-parse-region (or begin parse-start) (point)))))
>> +                       ;; not a regexp or general delimited literal
>> +                       (null (nth 0 (ruby-parse-region (or begin parse-start) (point))))
>
> Could you explain this part of your patch?

That's a fix for indentation after percent literals delimited with 
operator characters: %r-abc-. But you seem to have already worked that out.

> BTW, is it really true that "%Q(hello (my) world)" is correct?
> That web-page doesn't clearly mention such nesting.

Yes, it seems to be one of the more obscure features:

irb(main):002:0> %Q(hello [(my]) world)
=> "hello [(my]) world"

It's mentioned here: http://phrogz.net/programmingruby/language.html

(to be continued)

-- Dmitry




This bug report was last modified 12 years and 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.