Edward L. Fox wrote:

> Here's a small patch provided by Liang Peng, alias Bezetek James.  He
> has fixed the problem in menu/unmenu/emenu series commands.
> 
> As my understanding, "emenu" is designed for scripts to access some
> menu items.  However, "emenu" only accepts the localized menu names.
> For example, you can use your script to add a new menu item by calling
> "amenu File.Test :echo 'hello'<CR>", but you can't execute the same
> menu item by calling "emenu File.Test" if you are not running Vim in
> English mode.  Instead, you have to use localized menu name for
> "File".  However, we don't have any interface to access the menu
> translation table via script.  So "emenu" command is nearly useless
> for script writers.
> 
> Bezetek's patch makes menu/unmenu/emenu useful again.  He modified the
> menu structure to store the original strings before the localization,
> and accepts the unlocalized strings for all the menu series commands
> when calling all menu related command.  To keep the compatibility,
> localized menu names are also accepted, just like the behavior before.
> 
> This is his first patch to Vim, and he's quite eager to participate in
> open source projects.  Please help review his patch and include it in
> the next release of Vim.  Many thanks!

This is very useful.

There was an old patch that I never got around looking into, from Bjorn
Winckler.  It dates 2008 March 30.

http://www.mail-archive.com/vim_dev@googlegroups.com/msg02561.html

Perhaps you can compare the patches and find out what works best?

-- 
How To Keep A Healthy Level Of Insanity:
3. Every time someone asks you to do something, ask if they want fries
   with that.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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.
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