On Fri, Jul 23, 2010 at 1:25 PM, Nikolai Weibull <n...@bitwi.se> wrote:
> On Fri, Jul 23, 2010 at 19:04, James Vega <james...@jamessan.com> wrote:
>> On Fri, Jul 23, 2010 at 12:56 PM, Nikolai Weibull <n...@bitwi.se> wrote:
>>> On Fri, Jul 23, 2010 at 17:22, Benjamin R. Haskell <v...@benizi.com> wrote:
>
>>>> As Bram asserted, modelines take effect too late to serve this purpose.
>
>>> Then the modeline needs to take effect earlier to serve this purpose.
>
>> You have to read the file to see if there's a modeline, but to read (and
>> properly interpret) the file, you need to know the encoding.  So there's
>> a cyclic dependency.
>
> Of course.  Yet Emacs, WebKit/Gecko/Internet Explorer, Ruby, Python,
> and so on manage to deal with it.
>
>> The TODO list has an item for supporting an encoding specification in
>> the first few lines of the file similar to what Python allows.
>
> Sort of like a modeline?

Sort of, except modelines can be at the top or the bottom of the file
and are processed after the buffer has been loaded.  This would have to
be part of the process of loading the buffer, which is why the places
that do allow it require the information to be at the top of the file.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@jamessan.com>

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui