Gary Johnson wrote:

> > > I just encountered this error message while trying to debug a 
> > > problem with extracting vimballs.  It's not related to 
> > > vimballs--that's just how I happened to find it.  I executed
> > > 
> > >    vim -V9verbose.out DrawIt.vba.gz
> > > 
> > > and discovered this message among the others in the verbose.out log 
> > > file:
> > > 
> > >    ...
> > >    continuing in /home/garyjohn/share/vim/vim71/syntax/manual.vim
> > >    Error detected while processing 
> > > /home/garyjohn/share/vim/vim71/syntax/manual.vim:
> > >    line   20:
> > >    E216: No such group or event: syntaxset FileType
> > >    finished sourcing /home/garyjohn/share/vim/vim71/syntax/manual.vim
> > >    ...
> > > 
> > > Here is that section of manual.vim, with line numbers enabled:
> > > 
> > >     19 " Remove the connection between FileType and Syntax autocommands.
> > >     20 silent! au! syntaxset FileType
> > > 
> > > Is this a bug or is this error expected under some conditions and 
> > > hence the "silent!" command?  If the latter, it would be nice if a 
> > > comment to that effect could be added to syntax/manual.vim so that 
> > > folks could know to ignore the message when it appears in their 
> > > debug logs.
> > > 
> > > I see this running vim 7.1.79 on Cygwin and 7.1.77 on SunOS 5.8.
> > 
> > I would think this is normal: When doing :syntax manual twice there are
> > no syntaxset autocommands.  That's why there is a ":silent!" before the
> > command.  However, when I try to reproduce it by executing the command
> > directly I don't get this error.  So somewhere the "syntaxset" augroup
> > must have been deleted.
> 
> I haven't looked into the reasons for the syntaxset autocommands so 
> I don't know if attempting to remove a non-existent syntaxset group 
> at that point is normal or not.  You seem to think it is and you 
> must have thought it was when you wrote the script since you saw the 
> need to suppress the error message with ":silent!".
> 
> One concern I had about the error message was that I thought it 
> indicated a bug in one or more vim scripts and that I should report 
> it.
> 
> My other concern about the message is that I found it while trying 
> to troubleshoot another problem.  I had no idea what was causing the 
> problem and I was looking for any clue to the cause.  I spent some 
> time determining that that error message was not related to the 
> problem at hand.  I also spent some time reporting it since I 
> thought it might indicate a real problem somewhere.  I think it 
> would help the process of troubleshooting if the vim code did not 
> produce any error messages at all, expected or not, when operating 
> normally.  I think a better approach to inhibiting this particular 
> error message would be the following:
> 
>    if exists("#syntaxset")
>       au! syntaxset FileType
>    endif
> 
> I think the behavior is the same as the original code, but no 
> distracting error message appears in the verbose output.

Right.  This kind of exists() was added later.

It's indeed better to use this than silencing errors.  But don't be
surprised if there are a few places where it happens anyway.

-- 
Far back in the mists of ancient time, in the great and glorious days of the
former Galactic Empire, life was wild, rich and largely tax free.
Mighty starships plied their way between exotic suns, seeking adventure and
reward among the furthest reaches of Galactic space.  In those days, spirits
were brave, the stakes were high, men were real men, women were real women
and small furry creatures from Alpha Centauri were real small furry creatures
from Alpha Centauri.  And all dared to brave unknown terrors, to do mighty
deeds, to boldly split infinitives that no man had split before -- and thus
was the Empire forged.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// 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    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui