emacs-devel
[Top][All Lists]
Advanced

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

Re: trunk r114534: Get Ruby's SMIE code to pass the test suite.


From: Dmitry Gutov
Subject: Re: trunk r114534: Get Ruby's SMIE code to pass the test suite.
Date: Sun, 06 Oct 2013 03:20:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:
> ------------------------------------------------------------
> revno: 114534
> revision-id: address@hidden
> parent: address@hidden
> committer: Stefan Monnier <address@hidden>
> branch nick: trunk
> timestamp: Sat 2013-10-05 14:37:08 -0400
> message:
>   Get Ruby's SMIE code to pass the test suite.
>   * lisp/progmodes/ruby-mode.el (ruby-use-smie): Change default.

Cool stuff.

> === modified file 'test/ChangeLog'
> --- a/test/ChangeLog  2013-10-04 21:45:37 +0000
> +++ b/test/ChangeLog  2013-10-05 18:37:08 +0000
> @@ -1,3 +1,8 @@
> +2013-10-05  Stefan Monnier  <address@hidden>
> +
> +     * indent/ruby.rb: Port a few cases from automated/ruby-mode-tests.el.
> +     Adjust indentation of continued line to the new SMIE behavior.

I'm slightly concerned that this makes those tests "fail" in the default
engine. Shouldn't be too much of a problem, though, if SMIE works well.

> +
>  2013-10-04  Stefan Monnier  <address@hidden>
>
>       * automated/completion-tests.el:
>
> === modified file 'test/indent/ruby.rb'
> --- a/test/indent/ruby.rb     2013-09-15 23:42:26 +0000
> +++ b/test/indent/ruby.rb     2013-10-05 18:37:08 +0000
> @@ -1,3 +1,10 @@
> +if something_wrong?             # ruby-move-to-block-skips-heredoc
> +  ActiveSupport::Deprecation.warn(<<-eowarn)
> +  boo hoo
> +  end
> +  eowarn
> +end

This "port" omits a significant part of the test. Specifically, its
automation. Do you intend to eventually remove it from
automated/ruby-mode-tests.el? I'd be firmly against that.

Otherwise, duplicating examples from there in this file, as a playground
of sorts, seems harmless.

> +foo = [1,                       # ruby-deep-indent
> +       2]
> +
> +foo = {                         # ruby-deep-indent-disabled
> +  a : b
> +}
> +
> +foo = [                         # ruby-deep-indent-disabled
> +  1
> +]
> +
> +foo(                            # ruby-deep-indent-disabled
> +  a
> +)

Being able to handle all the cases above without touching
`ruby-deep-indent' is nice.  I've been using an advice for
`ruby-indent-line' which does that, for quite some time.

>  # Bug#15369
>  MSG = 'Separate every 3 digits in the integer portion of a number' \
> -  'with underscores(_).'
> +      'with underscores(_).'

This one doesn't work for me. With SMIE, it indents like this:

MSG = 'Separate every 3 digits in the integer portion of a number' \
                                                                   'with 
underscores(_).'



reply via email to

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