all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Bozhidar Batsov <bozhidar@batsov.com>
Cc: 16907@debbugs.gnu.org
Subject: bug#16907: 24.3.50; [ruby-mode] %w/W literals have incorrect indentation
Date: Sat, 01 Mar 2014 03:55:02 +0200	[thread overview]
Message-ID: <874n3in0nd.fsf@yandex.ru> (raw)
In-Reply-To: <m2ha7jutyl.fsf@batsov.com> (Bozhidar Batsov's message of "Fri, 28 Feb 2014 17:40:02 +0200")

(This is probably too late for 24.4)

Bozhidar Batsov <bozhidar@batsov.com> writes:

> %w/W should be indented like other array literals.

And %i/I too, I guess.

Looks like this'll have to be done in two parts:

1. syntax-propertize the above cases differently from the rest of the
percent literals (which are treated like strings).

Don't know exactly what syntax to use. The values can contain any
unpaired characters, except those delimiting them. Put syntax "symbol"
on everything inside them, except whitespace?

And still handle interpolations somehow.

2. Tokenize the elements inside the above literals without regard to
characters used in them. `ruby-smie--backward-token' and its counterpart
would have to be able to easily know when it's inside such literal.

Alternatively, still propertize them as "general strings", but replace
`smie-indent-inside-string' in `smie-indent-functions' with a
specialized version that would look at what the string begins with.

The change in syntax highlighting would have to be handled separately.





  reply	other threads:[~2014-03-01  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 15:40 bug#16907: 24.3.50; [ruby-mode] %w/W literals have incorrect indentation Bozhidar Batsov
2014-03-01  1:55 ` Dmitry Gutov [this message]
     [not found]   ` <EEE11950A9324F769B6F4A079B10788E@gmail.com>
2014-03-01 11:01     ` bug#16907: Fw: " Bozhidar Batsov
2014-03-01 13:57     ` Dmitry Gutov
2014-03-01 14:00       ` Bozhidar Batsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874n3in0nd.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=16907@debbugs.gnu.org \
    --cc=bozhidar@batsov.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.