From 9d4c5c8823411cddaeee61a58141e453ea897da0 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Tue, 20 Jul 2010 14:27:59 +0200 Subject: Changed global msg to script-local s:msg in easytags.vim --- easytags.vim | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/easytags.vim b/easytags.vim index 8d1eb94..e692532 100644 --- a/easytags.vim +++ b/easytags.vim @@ -14,6 +14,8 @@ if &cp || exists('g:loaded_easytags') finish endif +let s:script = expand(':p:~') + " Configuration defaults and initialization. {{{1 if !exists('g:easytags_file') @@ -80,20 +82,21 @@ endfunction if !s:InitEasyTags(55) if !exists('g:easytags_ctags_version') || empty(g:easytags_ctags_version) - let msg = "easytags.vim: Plug-in not loaded because Exuberant Ctags isn't installed!" + let s:msg = "%s: Plug-in not loaded because Exuberant Ctags isn't installed!" if executable('apt-get') - let msg .= " On Ubuntu & Debian you can install Exuberant Ctags by" - let msg .= " installing the package named `exuberant-ctags':" - let msg .= " sudo apt-get install exuberant-ctags" + let s:msg .= " On Ubuntu & Debian you can install Exuberant Ctags by" + let s:msg .= " installing the package named `exuberant-ctags':" + let s:msg .= " sudo apt-get install exuberant-ctags" else - let msg .= " Please download & install Exuberant Ctags from http://ctags.sf.net" + let s:msg .= " Please download & install Exuberant Ctags from http://ctags.sf.net" endif - echomsg msg + echomsg printf(s:msg, s:script) else - let msg = "easytags.vim: Plug-in not loaded because Exuberant Ctags 5.5" - let msg .= " or newer is required while you have version %s installed!" - echomsg printf(msg, g:easytags_ctags_version) + let s:msg = "%s: Plug-in not loaded because Exuberant Ctags 5.5" + let s:msg .= " or newer is required while you have version %s installed!" + echomsg printf(s:msg, s:script, g:easytags_ctags_version) endif + unlet s:msg finish endif -- cgit v1.2.3