options: mark nonfunctional &termencoding option as hidden. #2631

Remove related dead code and references in the docs.

Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Shougo Matsushita <Shougo.Matsu@gmail.com>
This commit is contained in:
Björn Linse
2015-05-10 15:18:39 +02:00
parent f4423c9697
commit d9acfbd471
14 changed files with 14 additions and 165 deletions

View File

@@ -753,11 +753,6 @@ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
*/
EXTERN char mb_bytelen_tab[256];
/* Variables that tell what conversion is used for keyboard input and display
* output. */
EXTERN vimconv_T input_conv; /* type of input conversion */
EXTERN vimconv_T output_conv; /* type of output conversion */
/*
* Function pointers, used to quickly get to the right function. Each has
* three possible values: latin_ (8-bit), utfc_ or utf_ (utf-8) and dbcs_

View File

@@ -58,16 +58,11 @@
* V
* file
*
* (1) Typed characters arrive in the current locale. Conversion is to be
* done when 'encoding' is different from 'termencoding'.
* (1) Typed characters arrive in the current locale.
* (2) Text will be made available with the encoding specified with
* 'encoding'. If this is not sufficient, system-specific conversion
* might be required.
* (3) For the GUI the correct font must be selected, no conversion done.
* Otherwise, conversion is to be done when 'encoding' differs from
* 'termencoding'. (Different in the GTK+ 2 port -- 'termencoding'
* is always used for both input and output and must always be set to
* "utf-8". gui_mch_init() does this automatically.)
* (4) The encoding of the file is specified with 'fileencoding'. Conversion
* is to be done when it's different from 'encoding'.
*
@@ -426,9 +421,6 @@ char_u * mb_init(void)
/* Just starting up: set the whole table to one's. */
for (i = 0; i < 256; ++i)
mb_bytelen_tab[i] = 1;
input_conv.vc_type = CONV_NONE;
input_conv.vc_factor = 1;
output_conv.vc_type = CONV_NONE;
return NULL;
} else if (STRNCMP(p_enc, "8bit-", 5) == 0
|| STRNCMP(p_enc, "iso-8859-", 9) == 0) {
@@ -3701,12 +3693,6 @@ bool iconv_enabled(bool verbose)
void iconv_end(void)
{
/* Don't use iconv() when inputting or outputting characters. */
if (input_conv.vc_type == CONV_ICONV)
convert_setup(&input_conv, NULL, NULL);
if (output_conv.vc_type == CONV_ICONV)
convert_setup(&output_conv, NULL, NULL);
if (hIconvDLL != 0)
FreeLibrary(hIconvDLL);
if (hMsvcrtDLL != 0)
@@ -3942,7 +3928,7 @@ char_u * string_convert_ext(vimconv_T *vcp, char_u *ptr,
break;
# ifdef USE_ICONV
case CONV_ICONV: /* conversion with output_conv.vc_fd */
case CONV_ICONV: /* conversion with vcp->vc_fd */
retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
break;
# endif

View File

@@ -1501,7 +1501,7 @@ static vimoption_T
(char_u *)&p_tbidi, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
(char_u *)&p_tenc, PV_NONE,
(char_u *)NULL, PV_NONE,
{(char_u *)"", (char_u *)0L}
SCRIPTID_INIT},
{"terse", NULL, P_BOOL|P_VI_DEF,
@@ -3705,7 +3705,7 @@ did_set_string_option (
errmsg = e_invarg;
}
/* 'encoding' and 'fileencoding' */
else if (varp == &p_enc || gvarp == &p_fenc || varp == &p_tenc) {
else if (varp == &p_enc || gvarp == &p_fenc) {
if (gvarp == &p_fenc) {
if (!MODIFIABLE(curbuf) && opt_flags != OPT_GLOBAL)
errmsg = e_modifiable;
@@ -3738,14 +3738,6 @@ did_set_string_option (
if (varp == &p_enc && *curbuf->b_p_keymap != NUL)
(void)keymap_init();
/* When 'termencoding' is not empty and 'encoding' changes or when
* 'termencoding' changes, need to setup for keyboard input and
* display output conversion. */
if (((varp == &p_enc && *p_tenc != NUL) || varp == &p_tenc)) {
convert_setup(&input_conv, p_tenc, p_enc);
convert_setup(&output_conv, p_enc, p_tenc);
}
}
} else if (varp == &p_penc) {
/* Canonize printencoding if VIM standard one */

View File

@@ -553,7 +553,6 @@ EXTERN int p_tr; /* 'tagrelative' */
EXTERN char_u *p_tags; /* 'tags' */
EXTERN int p_tgst; /* 'tagstack' */
EXTERN int p_tbidi; /* 'termbidi' */
EXTERN char_u *p_tenc; /* 'termencoding' */
EXTERN int p_terse; /* 'terse' */
EXTERN int p_to; /* 'tildeop' */
EXTERN int p_timeout; /* 'timeout' */

View File

@@ -35,7 +35,6 @@
# A. A simple configuration:
# set encoding=utf-8; let $LANG='zh_TW.UTF-8';
# (set langmenu=none or ..)
# set termencoding=utf-8
# set fileencodings=ucs-bom,utf-8,japan,taiwan,prc
# set fileencoding=taiwan (or utf-8)
#

View File

@@ -27,7 +27,6 @@
# A. A simple configuration:
# set encoding=utf-8; let $LANG='zh_TW.UTF-8';
# (set langmenu=none or ..)
# set termencoding=utf-8
# set fileencodings=ucs-bom,utf-8,japan,taiwan,prc
# set fileencoding=taiwan (or utf-8)
#