Benji Fisher wrote:

>      Bug or feature?  While editing this e-mail,
> 
> :set ft=log
> 
> :set ft? syntax?
>   filetype=log
>   syntax=log
> 
> :noa e!
> "/tmp/mutt-localhost-19331-88" 
> "/tmp/mutt-localhost-19331-88" 7L, 108C
> 
> :set ft? syntax?
>   filetype=log
>   syntax=log
> 
> as expected.  While editing a help file,
> 
> :set ft=log
> 
> :set ft? syntax?
>   filetype=log
>   syntax=log
> 
> :noa e!
> "autocmd.txt" 
> "autocmd.txt" [readonly] 1260L, 52535C
> 
> :set ft? syntax?
>   filetype=help
>   syntax=log
> 
> How did 'filetype' get set to "help"?

help files are handled a bit special.  The filetype is automatically set
to "help" when loading the file.  'syntax' stays at "log", because
setting 'syntax' is done with an autocommand and you disabled that.

-- 
"Beware of bugs in the above code; I have only proved
it correct, not tried it." -- Donald Knuth

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to