all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: 16907@debbugs.gnu.org
Subject: bug#16907: Fw: bug#16907: 24.3.50; [ruby-mode] %w/W literals have incorrect indentation
Date: Sat, 1 Mar 2014 13:01:54 +0200	[thread overview]
Message-ID: <423A2EF41D2A443C882C68ED39059EB0@gmail.com> (raw)
In-Reply-To: <EEE11950A9324F769B6F4A079B10788E@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2024 bytes --]

>  
> From: Bozhidar Batsov <bozhidar@batsov.com>
> To: Dmitry Gutov <dgutov@yandex.ru>
> Date: Saturday, March 1, 2014 at 1:00:52 PM
> Subject: Re: bug#16907: 24.3.50; [ruby-mode] %w/W literals have incorrect indentation
>  
>  
>  
> --  
> Cheers,
> Bozhidar
>  
>  
> On Saturday, March 1, 2014 at 3:55 AM, Dmitry Gutov wrote:
>  
> > (This is probably too late for 24.4)
> >  
> >  
> >  
>  
> Hope it’s not :-) (although it’s not a big deal obviously).  
> >  
> > Bozhidar Batsov <bozhidar@batsov.com (mailto:bozhidar@batsov.com)> writes:
> >  
> > > %w/W should be indented like other array literals.
> >  
> > And %i/I too, I guess.
> Indeed. I forgot about them.  
> >  
> > 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).
> >  
> >  
> >  
>  
> I was thinking more or less the same.   
> >  
> > 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.
> Sounds reasonable. Not sure how hard it would be to implement.  
> >  
> > 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.
> >  
> >  
> >  
>  
> Option 1 seems better/cleaner to me, but obviously I’m not as familiar as you with the existing code, so
> it’s ultimately your call.
>   
> >  
> > The change in syntax highlighting would have to be handled separately.  
>  


[-- Attachment #2: Type: text/html, Size: 3953 bytes --]

  parent reply	other threads:[~2014-03-01 11:01 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
     [not found]   ` <EEE11950A9324F769B6F4A079B10788E@gmail.com>
2014-03-01 11:01     ` Bozhidar Batsov [this message]
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=423A2EF41D2A443C882C68ED39059EB0@gmail.com \
    --to=bozhidar@batsov.com \
    --cc=16907@debbugs.gnu.org \
    /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.