Re: [patch] Disallow changing 'fenc' in modeline

2010-07-24 Fir de Conversatie Nikolai Weibull
On Sat, Jul 24, 2010 at 05:06, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 23/07/10 20:06, Nikolai Weibull wrote: meta/  may actually appear anywhere in the document, if places is referring to HTML processors (which of course don’t have to respect it). meta in an HTML document

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-24 Fir de Conversatie Tony Mechelynck
On 24/07/10 10:55, Nikolai Weibull wrote: On Sat, Jul 24, 2010 at 05:06, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 23/07/10 20:06, Nikolai Weibull wrote: meta/may actually appear anywhere in the document, if places is referring to HTML processors (which of course don’t have

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-24 Fir de Conversatie Nikolai Weibull
On Sat, Jul 24, 2010 at 14:57, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 24/07/10 10:55, Nikolai Weibull wrote: As near the top as possible: how could that have eluded you? It hasn’t, and the fact that we’re discussing a moot point hasn’t either. -- You received this message

[patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie tyru
Hi list. I wonder why Vim does not disallow changing 'fileencoding' in modeline. However, I've created the patch to disallow it like 'encoding'. -- 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,

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Bram Moolenaar
Patrick Texier wrote: Le Fri, 23 Jul 2010 17:33:05 +0900, tyru a écrit dans le message aanlkti=d8o=n-cmnnbbr8zkg8k=kpefrsqd+tzruc...@mail.gmail.com : I wonder why Vim does not disallow changing 'fileencoding' in modeline. However, I've created the patch to disallow it like 'encoding'.

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Nikolai Weibull
Bram Moolenaar wrote: Patrick Texier wrote: No, it is the right way to define encoding of a 8-bit file. Vim can not choose between ISO-8859-1(15), cp1252, cp1250... I'm trying to think of a valid reason to change 'fenc' in the modeline.  Can't think of one... Oh, wait, the order is wrong,

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Benjamin R. Haskell
On Fri, 23 Jul 2010, Nikolai Weibull wrote: Bram Moolenaar wrote: Patrick Texier wrote: No, it is the right way to define encoding of a 8-bit file. Vim can not choose between ISO-8859-1(15), cp1252, cp1250... I'm trying to think of a valid reason to change 'fenc' in the modeline.

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Nikolai Weibull
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 received this message from the vim_dev maillist. Do not top-post! Type

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie James Vega
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

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Nikolai Weibull
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

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie James Vega
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

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Nikolai Weibull
On Fri, Jul 23, 2010 at 19:33, James Vega james...@jamessan.com wrote: On Fri, Jul 23, 2010 at 1:25 PM, Nikolai Weibull n...@bitwi.se wrote: Sort of like a modeline? Sort of, except modelines can be at the top or the bottom of the file And one could easily scan from the beginning or end of

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Matt Wozniski
On Fri, Jul 23, 2010 at 2:06 PM, Nikolai Weibull n...@bitwi.se wrote: On Fri, Jul 23, 2010 at 19:33, James Vega james...@jamessan.com wrote: On Fri, Jul 23, 2010 at 1:25 PM, Nikolai Weibull n...@bitwi.se wrote: Sort of like a modeline? Sort of, except modelines can be at the top or the

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Bram Moolenaar
Matt Wozniski wrote: On Fri, Jul 23, 2010 at 2:06 PM, Nikolai Weibull n...@bitwi.se wrote: On Fri, Jul 23, 2010 at 19:33, James Vega james...@jamessan.com wrote: On Fri, Jul 23, 2010 at 1:25 PM, Nikolai Weibull n...@bitwi.se wrote: Sort of like a modeline? Sort of, except modelines

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Tony Mechelynck
On 23/07/10 20:06, Nikolai Weibull wrote: On Fri, Jul 23, 2010 at 19:33, James Vegajames...@jamessan.com wrote: On Fri, Jul 23, 2010 at 1:25 PM, Nikolai Weibulln...@bitwi.se wrote: Sort of like a modeline? Sort of, except modelines can be at the top or the bottom of the file And one

Re: [patch] Disallow changing 'fenc' in modeline

2010-07-23 Fir de Conversatie Tony Mechelynck
On 23/07/10 23:00, Bram Moolenaar wrote: Matt Wozniski wrote: [...] Doing it *properly* (eg, for all supported encodings) would definitely be difficult, but I can envision a quick hack that works for single-byte encodings: 0) Start handling a :e command 1) remember what 'fenc' was set to