Mathias Michaelis wrote:
Hello Andalou
I use vim 7.0 on Windows XP compiled with MS Visual C.
If I do: gvim -u NONE -U NONE -c "set verbosefile=C:/vim.log"
I get:
------------------------------------------------------
Error detected while processing function <SNR>1_BMShow:
line 12:
E329: No menu "&Buffer"
Error detected while processing function <SNR>1_BMShow:
line 14:
E328: Menu only exists in another mode
Tear off this menu
-------------------------------------------------------
I can confirm that behaviour of gvim, but I think it is a feature,
not a bug. Typing
:scriptnames
in the gvim opened like above shows that <SNR>1_BMShow means the
function BMShow() defined in $VIMRUNTIME\menu.vim. Line 12 and line
14 of that function contain the code
12: silent! unmenu &Buffers
14: silent! unmenu! &Buffers
Here, the silent! means that it is expected that something could go
wrong, but an error message should not be displayed nor queued in
the message history (shown by :messages). :silent is probably not
designed to suppress verbose messages, although I can't find that
explicitly in the
:help :silent
With best regards
Mathias
'verbosefile' says it's analogous to ":redir", and the latter (as
mentioned not very clearly under ":help :redir") does not filter away
silent messages (they are logged but not displayed). I would expect
silent messages to be logged to the 'verbosefile' (even though not
displayed) when 'verbosefile' is nonempty.
However, under ":help -u" it is said that "-u NONE" disables vimrc,
gvimrc, and all global plugins. If menu.vim was sourced nevertheless,
then IIUC the user must have somehow triggered that sourcing.
Best regards,
Tony.