Better implementation of creating the Color Scheme menu. (Juergen Kraemer)
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 3829990..0db488f 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1711,15 +1711,23 @@
user has his own plugin he wants to use. Then the user must have a chance to
disable loading this specific plugin. This will make it possible: >
- 6 if exists("loaded_typecorr")
+ 6 if exists("g:loaded_typecorr")
7 finish
8 endif
- 9 let loaded_typecorr = 1
+ 9 let g:loaded_typecorr = 1
This also avoids that when the script is loaded twice it would cause error
messages for redefining functions and cause trouble for autocommands that are
added twice.
+The name is recommended to start with "loaded_" and then the file name of the
+plugin, literally. The "g:" is prepended just to avoid mistakes when using
+the variable in a function (without "g:" it would be a variable local to the
+function).
+
+Using "finish" stops Vim from reading the rest of the file, it's much quicker
+than using if-endif around the whole file.
+
MAPPING
@@ -1896,10 +1904,10 @@
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " License: This file is placed in the public domain.
5
- 6 if exists("loaded_typecorr")
+ 6 if exists("g:loaded_typecorr")
7 finish
8 endif
- 9 let loaded_typecorr = 1
+ 9 let g:loaded_typecorr = 1
10
11 let s:save_cpo = &cpo
12 set cpo&vim