From: Matt Armstrong Date: 2003-01-01T17:34:54+09:00 Subject: Re: lstripped here-document (Re: comments and continuing strings on the next line) nobu.nokada@softhome.net writes: > A happy new year, > > At Tue, 17 Sep 2002 22:52:00 +0900, > Paul Brannan wrote: >> I do recall one of the apocalypses mentioning a perl rfc that proposed a >> <<< operator for 'here documents', which would remove whitespace from >> the 'here document' (at compile-time) that matched the whitespace in >> front of the terminator. Doesn't seem like a bad idea for either perl >> or ruby. > > I thought a new syntax like this, > > p <<-|EOS > | foo > | bar > EOS > # => " foo\n bar\n" > > That is, a punctuation between << and the terminator, except > for quotations, directs to strip leading white-spaces till that > punctuation. Any line wihtout it results an syntax error. > > The patch was posted in [ruby-dev:19261]. Any comments are > welcome. I like this, though my biggest problem with << is that the ruby-mode.el still wants to indent. If <<-| were understood by ruby-mode.el, that'd be great.