changeset 22180:786ca9e1dc9a v8.2.1639

patch 8.2.1639: options window cannot be translated Commit: https://github.com/vim/vim/commit/64075b0ab18449132ed01a07874fe1d1f3f356d4 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 9 12:56:30 2020 +0200 patch 8.2.1639: options window cannot be translated Problem: Options window cannot be translated. Solution: Get the translation for "local to" texts once and use them in many places. Fix that 'whichwrap' is not a local option. (issue #6800)
author Bram Moolenaar <Bram@vim.org>
date Wed, 09 Sep 2020 13:00:04 +0200
parents 85eb6ecfb2e8
children 774f66d748c9
files runtime/optwin.vim src/version.c
diffstat 2 files changed, 110 insertions(+), 105 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -69,10 +69,14 @@ fun! <SID>Space()
   endif
 endfun
 
+let s:local_to_window = gettext('(local to window)')
+let s:local_to_buffer = gettext('(local to buffer)')
+
 " find the window in which the option applies
 " returns 0 for global option, 1 for local option, -1 for error
 fun! <SID>Find(lnum)
-    if getline(a:lnum - 1) =~ "(local to"
+    let line = getline(a:lnum - 1)
+    if line =~ s:local_to_window || line =~ s:local_to_buffer
       let local = 1
       let thiswin = winnr()
       wincmd p
@@ -235,8 +239,7 @@ call <SID>OptionG("hf", &hf)
 
 call <SID>Header("moving around, searching and patterns")
 call append("$", "whichwrap\tlist of flags specifying which commands wrap to another line")
-call append("$", "\t(local to window)")
-call <SID>OptionL("ww")
+call <SID>OptionG("ww")
 call append("$", "startofline\tmany jump commands move the cursor to the first non-blank")
 call append("$", "\tcharacter of a line")
 call <SID>BinOptionG("sol", &sol)
@@ -274,10 +277,10 @@ call append("$", "\t(global or local to 
 call <SID>OptionG("def", &def)
 if has("find_in_path")
   call append("$", "include\tpattern for an include-file line")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("inc")
   call append("$", "includeexpr\texpression used to transform an include line to a file name")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("inex")
 endif
 
@@ -302,7 +305,7 @@ call append("$", "showfulltag\twhen comp
 call <SID>BinOptionG("sft", &sft)
 if has("eval")
   call append("$", "tagfunc\ta function to be used to perform tag searches")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("tfu")
 endif
 if has("cscope")
@@ -325,21 +328,21 @@ endif
 
 call <SID>Header("displaying text")
 call append("$", "scroll\tnumber of lines to scroll for CTRL-U and CTRL-D")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>OptionL("scr")
 call append("$", "scrolloff\tnumber of screen lines to show around the cursor")
 call append("$", " \tset so=" . &so)
 call append("$", "wrap\tlong lines wrap")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("wrap")
 call append("$", "linebreak\twrap long lines at a character in 'breakat'")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("lbr")
 call append("$", "breakindent\tpreserve indentation in wrapped text")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("bri")
 call append("$", "breakindentopt\tadjust breakindent behaviour")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>OptionL("briopt")
 call append("$", "breakat\twhich characters might cause a line break")
 call <SID>OptionG("brk", &brk)
@@ -372,27 +375,27 @@ call append("$", "writedelay\tdelay in m
 call append("$", "\t(for debugging)")
 call append("$", " \tset wd=" . &wd)
 call append("$", "list\tshow <Tab> as ^I and end-of-line as $")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("list")
 call append("$", "listchars\tlist of strings used for list mode")
 call <SID>OptionG("lcs", &lcs)
 call append("$", "number\tshow the line number for each line")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("nu")
 call append("$", "relativenumber\tshow the relative line number for each line")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("rnu")
 if has("linebreak")
   call append("$", "numberwidth\tnumber of columns to use for the line number")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("nuw")
 endif
 if has("conceal")
   call append("$", "conceallevel\tcontrols whether concealable text is hidden")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("cole")
   call append("$", "concealcursor\tmodes in which text in the cursor line can be concealed")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("cocu")
 endif
 
@@ -401,14 +404,14 @@ call <SID>Header("syntax, highlighting a
 call append("$", "background\t\"dark\" or \"light\"; the background color brightness")
 call <SID>OptionG("bg", &bg)
 call append("$", "filetype\ttype of file; triggers the FileType event when set")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("ft")
 if has("syntax")
   call append("$", "syntax\tname of syntax highlighting used")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("syn")
   call append("$", "synmaxcol\tmaximum column to look for syntax items")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("smc")
 endif
 call append("$", "highlight\twhich highlighting to use for various occasions")
@@ -416,7 +419,7 @@ call <SID>OptionG("hl", &hl)
 call append("$", "hlsearch\thighlight all matches for the last used search pattern")
 call <SID>BinOptionG("hls", &hls)
 call append("$", "wincolor\thighlight group to use for the window")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>OptionL("wcr")
 if has("termguicolors")
   call append("$", "termguicolors\tuse GUI colors for the terminal")
@@ -424,31 +427,31 @@ if has("termguicolors")
 endif
 if has("syntax")
   call append("$", "cursorcolumn\thighlight the screen column of the cursor")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("cuc")
   call append("$", "cursorline\thighlight the screen line of the cursor")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("cul")
   call append("$", "cursorlineopt\tspecifies which area 'cursorline' highlights")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("culopt")
   call append("$", "colorcolumn\tcolumns to highlight")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("cc")
   call append("$", "spell\thighlight spelling mistakes")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("spell")
   call append("$", "spelllang\tlist of accepted languages")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("spl")
   call append("$", "spellfile\tfile that \"zg\" adds good words to")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("spf")
   call append("$", "spellcapcheck\tpattern to locate the end of a sentence")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("spc")
   call append("$", "spelloptions\tflags to change how spell checking works")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("spo")
   call append("$", "spellsuggest\tmethods used to suggest corrections")
   call <SID>OptionG("sps", &sps)
@@ -473,10 +476,10 @@ call append("$", " \tset wh=" . &wh)
 call append("$", "winminheight\tminimal number of lines used for any window")
 call append("$", " \tset wmh=" . &wmh)
 call append("$", "winfixheight\tkeep the height of the window")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("wfh")
 call append("$", "winfixwidth\tkeep the width of the window")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("wfw")
 call append("$", "winwidth\tminimal number of columns used for the current window")
 call append("$", " \tset wiw=" . &wiw)
@@ -490,7 +493,7 @@ if has("quickfix")
   call append("$", "previewheight\tdefault height for the preview window")
   call append("$", " \tset pvh=" . &pvh)
   call append("$", "previewwindow\tidentifies the preview window")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("pvw")
 endif
 call append("$", "hidden\tdon't unload a buffer when no longer shown in a window")
@@ -503,22 +506,22 @@ call <SID>BinOptionG("sb", &sb)
 call append("$", "splitright\ta new window is put right of the current one")
 call <SID>BinOptionG("spr", &spr)
 call append("$", "scrollbind\tthis window scrolls together with other bound windows")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("scb")
 call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
 call <SID>OptionG("sbo", &sbo)
 call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>BinOptionL("crb")
 if has("terminal")
   call append("$", "termwinsize\tsize of a terminal window")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("tws")
   call append("$", "termwinkey\tkey that precedes Vim commands in a terminal window")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("twk")
   call append("$", "termwinscroll\tmax number of lines to keep for scrollback in a terminal window")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   if has('win32')
     call append("$", "termwintype\ttype of pty to use for a terminal window")
     call <SID>OptionG("twt", &twt)
@@ -780,39 +783,39 @@ call <SID>OptionG("udir", &udir)
 call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload")
 call append("$", " \tset ur=" . &ur)
 call append("$", "modified\tchanges have been made and not written to a file")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("mod")
 call append("$", "readonly\tbuffer is not to be written")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("ro")
 call append("$", "modifiable\tchanges to the text are not possible")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("ma")
 call append("$", "textwidth\tline length above which to break a line")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("tw")
 call append("$", "wrapmargin\tmargin from the right in which to break a line")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("wm")
 call append("$", "backspace\tspecifies what <BS>, CTRL-W, etc. can do in Insert mode")
 call append("$", " \tset bs=" . &bs)
 call append("$", "comments\tdefinition of what comment lines look like")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("com")
 call append("$", "formatoptions\tlist of flags that tell how automatic formatting works")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("fo")
 call append("$", "formatlistpat\tpattern to recognize a numbered list")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("flp")
 if has("eval")
   call append("$", "formatexpr\texpression used for \"gq\" to format lines")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("fex")
 endif
 if has("insert_expand")
   call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("cpt")
   call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
   call <SID>OptionG("cot", &cot)
@@ -825,10 +828,10 @@ if has("insert_expand")
   call append("$", "pumwidth\tminimum width of the popup menu")
   call <SID>OptionG("pw", &pw)
   call append("$", "completefunc\tuser defined function for Insert mode completion")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("cfu")
   call append("$", "omnifunc\tfunction for filetype-specific Insert mode completion")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("ofu")
   call append("$", "dictionary\tlist of dictionary files for keyword completion")
   call append("$", "\t(global or local to buffer)")
@@ -838,7 +841,7 @@ if has("insert_expand")
   call <SID>OptionG("tsr", &tsr)
 endif
 call append("$", "infercase\tadjust case of a keyword completion match")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("inf")
 if has("digraphs")
   call append("$", "digraph\tenable entering digraphs with c1 <BS> c2")
@@ -853,78 +856,78 @@ call <SID>BinOptionG("sm", &sm)
 call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'")
 call append("$", " \tset mat=" . &mat)
 call append("$", "matchpairs\tlist of pairs that match for the \"%\" command")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("mps")
 call append("$", "joinspaces\tuse two spaces after '.' when joining a line")
 call <SID>BinOptionG("js", &js)
 call append("$", "nrformats\t\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for")
 call append("$", "\tCTRL-A and CTRL-X commands")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("nf")
 
 
 call <SID>Header("tabs and indenting")
 call append("$", "tabstop\tnumber of spaces a <Tab> in the text stands for")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("ts")
 call append("$", "shiftwidth\tnumber of spaces used for each step of (auto)indent")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("sw")
 if has("vartabs")
   call append("$", "vartabstop\tlist of number of spaces a tab counts for")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("vts")
   call append("$", "varsofttabstop\tlist of number of spaces a soft tabsstop counts for")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("vsts")
 endif
 call append("$", "smarttab\ta <Tab> in an indent inserts 'shiftwidth' spaces")
 call <SID>BinOptionG("sta", &sta)
 call append("$", "softtabstop\tif non-zero, number of spaces to insert for a <Tab>")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("sts")
 call append("$", "shiftround\tround to 'shiftwidth' for \"<<\" and \">>\"")
 call <SID>BinOptionG("sr", &sr)
 call append("$", "expandtab\texpand <Tab> to spaces in Insert mode")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("et")
 call append("$", "autoindent\tautomatically set the indent of a new line")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("ai")
 if has("smartindent")
   call append("$", "smartindent\tdo clever autoindenting")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>BinOptionL("si")
 endif
 if has("cindent")
   call append("$", "cindent\tenable specific indenting for C code")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>BinOptionL("cin")
   call append("$", "cinoptions\toptions for C-indenting")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("cino")
   call append("$", "cinkeys\tkeys that trigger C-indenting in Insert mode")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("cink")
   call append("$", "cinwords\tlist of words that cause more C-indent")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("cinw")
   call append("$", "indentexpr\texpression used to obtain the indent of a line")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("inde")
   call append("$", "indentkeys\tkeys that trigger indenting with 'indentexpr' in Insert mode")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("indk")
 endif
 call append("$", "copyindent\tcopy whitespace for indenting from previous line")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("ci")
 call append("$", "preserveindent\tpreserve kind of whitespace when changing indent")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("pi")
 if has("lispindent")
   call append("$", "lisp\tenable lisp mode")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>BinOptionL("lisp")
   call append("$", "lispwords\twords that change how lisp indenting works")
   call <SID>OptionL("lw")
@@ -934,42 +937,42 @@ endif
 if has("folding")
   call <SID>Header("folding")
   call append("$", "foldenable\tset to display all folds open")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("fen")
   call append("$", "foldlevel\tfolds with a level higher than this number will be closed")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fdl")
   call append("$", "foldlevelstart\tvalue for 'foldlevel' when starting to edit a file")
   call append("$", " \tset fdls=" . &fdls)
   call append("$", "foldcolumn\twidth of the column used to indicate folds")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fdc")
   call append("$", "foldtext\texpression used to display the text of a closed fold")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fdt")
   call append("$", "foldclose\tset to \"all\" to close a fold when the cursor leaves it")
   call <SID>OptionG("fcl", &fcl)
   call append("$", "foldopen\tspecifies for which commands a fold will be opened")
   call <SID>OptionG("fdo", &fdo)
   call append("$", "foldminlines\tminimum number of screen lines for a fold to be closed")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fml")
   call append("$", "commentstring\ttemplate for comments; used to put the marker in")
   call <SID>OptionL("cms")
   call append("$", "foldmethod\tfolding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\"")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fdm")
   call append("$", "foldexpr\texpression used when 'foldmethod' is \"expr\"")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fde")
   call append("$", "foldignore\tused to ignore lines when 'foldmethod' is \"indent\"")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fdi")
   call append("$", "foldmarker\tmarkers used when 'foldmethod' is \"marker\"")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fmr")
   call append("$", "foldnestmax\tmaximum fold depth for when 'foldmethod' is \"indent\" or \"syntax\"")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("fdn")
 endif
 
@@ -977,7 +980,7 @@ endif
 if has("diff")
   call <SID>Header("diff mode")
   call append("$", "diff\tuse diff mode for the current window")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("diff")
   call append("$", "diffopt\toptions for using diff mode")
   call <SID>OptionG("dip", &dip)
@@ -1005,31 +1008,31 @@ call append("$", " \tset ttm=" . &ttm)
 
 call <SID>Header("reading and writing files")
 call append("$", "modeline\tenable using settings from modelines when reading a file")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("ml")
 call append("$", "modelineexpr\tallow setting expression options from a modeline")
 call <SID>BinOptionG("mle", &mle)
 call append("$", "modelines\tnumber of lines to check for modelines")
 call append("$", " \tset mls=" . &mls)
 call append("$", "binary\tbinary file editing")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("bin")
 call append("$", "endofline\tlast line in the file has an end-of-line")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("eol")
 call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("fixeol")
 call append("$", "bomb\tprepend a Byte Order Mark to the file")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("bomb")
 call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("ff")
 call append("$", "fileformats\tlist of file formats to look for when editing a file")
 call <SID>OptionG("ffs", &ffs)
 call append("$", "textmode\tobsolete, use 'fileformat'")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("tx")
 call append("$", "textauto\tobsolete, use 'fileformats'")
 call <SID>BinOptionG("ta", &ta)
@@ -1062,10 +1065,10 @@ call <SID>OptionG("pm", &pm)
 call append("$", "fsync\tforcibly sync the file to disk after writing it")
 call <SID>BinOptionG("fs", &fs)
 call append("$", "shortname\tuse 8.3 file names")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("sn")
 call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("cm")
 
 
@@ -1073,7 +1076,7 @@ call <SID>Header("the swap file")
 call append("$", "directory\tlist of directories for the swap file")
 call <SID>OptionG("dir", &dir)
 call append("$", "swapfile\tuse a swap file for this buffer")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("swf")
 call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk")
 call <SID>OptionG("sws", &sws)
@@ -1104,7 +1107,7 @@ call append("$", "suffixes\tlist of file
 call <SID>OptionG("su", &su)
 if has("file_in_path")
   call append("$", "suffixesadd\tlist of file name extensions added when searching for a file")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("sua")
 endif
 if has("wildignore")
@@ -1186,7 +1189,7 @@ if has("win32") || has("osfiletype")
   call <SID>Header("system specific")
   if has("osfiletype")
     call append("$", "osfiletype\tOS-specific information about the type of file")
-    call append("$", "\t(local to buffer)")
+    call append("$", "\t" .. s:local_to_buffer)
     call <SID>OptionL("oft")
   endif
   if has("win32")
@@ -1204,21 +1207,21 @@ call <SID>OptionG("isf", &isf)
 call append("$", "isident\tspecifies the characters in an identifier")
 call <SID>OptionG("isi", &isi)
 call append("$", "iskeyword\tspecifies the characters in a keyword")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("isk")
 call append("$", "isprint\tspecifies printable characters")
 call <SID>OptionG("isp", &isp)
 if has("textobjects")
   call append("$", "quoteescape\tspecifies escape characters in a string")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("qe")
 endif
 if has("rightleft")
   call append("$", "rightleft\tdisplay the buffer right-to-left")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("rl")
   call append("$", "rightleftcmd\twhen to edit the command-line right-to-left")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("rlc")
   call append("$", "revins\tinsert characters backwards")
   call <SID>BinOptionG("ri", &ri)
@@ -1239,7 +1242,7 @@ if has("farsi")
 endif
 if has("arabic")
   call append("$", "arabic\tprepare for editing Arabic text")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>BinOptionL("arab")
   call append("$", "arabicshape\tperform shaping of Arabic characters")
   call <SID>BinOptionG("arshape", &arshape)
@@ -1261,12 +1264,12 @@ if has("xim")
   call <SID>BinOptionG("imd", &imd)
 endif
 call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>OptionL("imi")
 call append("$", "imstyle\tinput method style, 0: on-the-spot, 1: over-the-spot")
 call <SID>OptionG("imst", &imst)
 call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither")
-call append("$", "\t(local to window)")
+call append("$", "\t" .. s:local_to_window)
 call <SID>OptionL("ims")
 if has("xim")
   call append("$", "imcmdline\twhen set always use IM when starting to edit a command line")
@@ -1283,7 +1286,7 @@ call append("$", "encoding\tcharacter en
 call append("$", "\t\"euc-jp\", \"big5\", etc.")
 call <SID>OptionG("enc", &enc)
 call append("$", "fileencoding\tcharacter encoding for the current file")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>OptionL("fenc")
 call append("$", "fileencodings\tautomatically detected character encodings")
 call <SID>OptionG("fencs", &fencs)
@@ -1344,20 +1347,20 @@ if has("viminfo")
 endif
 if has("quickfix")
   call append("$", "bufhidden\twhat happens with a buffer when it's no longer in a window")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("bh")
   call append("$", "buftype\t\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer")
-  call append("$", "\t(local to buffer)")
+  call append("$", "\t" .. s:local_to_buffer)
   call <SID>OptionL("bt")
 endif
 call append("$", "buflisted\twhether the buffer shows up in the buffer list")
-call append("$", "\t(local to buffer)")
+call append("$", "\t" .. s:local_to_buffer)
 call <SID>BinOptionL("bl")
 call append("$", "debug\tset to \"msg\" to see all error messages")
 call append("$", " \tset debug=" . &debug)
 if has("signs")
   call append("$", "signcolumn\twhether to show the signcolumn")
-  call append("$", "\t(local to window)")
+  call append("$", "\t" .. s:local_to_window)
   call <SID>OptionL("scl")
 endif
 if has("mzscheme")
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1639,
+/**/
     1638,
 /**/
     1637,