aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-03-24 19:53:31 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-03-24 19:53:31 -0400
commitc56c035576f56f86405c40f3708bff49c996f1f8 (patch)
treec01d8a2e201cf4b588016869079e84ccca140c5c /src
parente16ff72e71172730f1d2e7c814f774c1174af36b (diff)
parentd85fabc24fbb12fef5f597fc56168cbb20daf214 (diff)
downloadrneovim-c56c035576f56f86405c40f3708bff49c996f1f8.tar.gz
rneovim-c56c035576f56f86405c40f3708bff49c996f1f8.tar.bz2
rneovim-c56c035576f56f86405c40f3708bff49c996f1f8.zip
Merge #2236 'docs cleanup'
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c11
-rw-r--r--src/nvim/ex_cmds2.c2
-rw-r--r--src/nvim/main.c4
-rw-r--r--src/nvim/msgpack_rpc/channel.c2
-rw-r--r--src/nvim/option.c19
-rw-r--r--src/nvim/testdir/dotest.in2
6 files changed, 14 insertions, 26 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 9e4b110e8b..08ad33e60e 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -345,13 +345,6 @@ typedef enum {
VAR_FLAVOUR_VIMINFO /* all uppercase */
} var_flavour_T;
-/*
- * Array to hold the value of v: variables.
- * The value is in a dictitem, so that it can also be used in the v: scope.
- * The reason to use this table anyway is for very quick access to the
- * variables with the VV_ defines.
- */
-
/* values for vv_flags: */
#define VV_COMPAT 1 /* compatible, also used without "v:" */
#define VV_RO 2 /* read-only */
@@ -359,6 +352,10 @@ typedef enum {
#define VV_NAME(s, t) s, {{t, 0, {0}}, 0, {0}}, {0}
+// Array to hold the value of v: variables.
+// The value is in a dictitem, so that it can also be used in the v: scope.
+// The reason to use this table anyway is for very quick access to the
+// variables with the VV_ defines.
static struct vimvar {
char *vv_name; /* name of variable, without v: */
dictitem_T vv_di; /* value and name for key */
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index 07d63c9be5..cd1b066fdd 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -2335,7 +2335,7 @@ do_source (
/*
* The file exists.
* - In verbose mode, give a message.
- * - For a vimrc file, may want to set 'compatible', call vimrc_found().
+ * - For a vimrc file, may want to call vimrc_found().
*/
if (p_verbose > 1) {
verbose_enter();
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 0b3402b682..9f4bc22ae0 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -891,7 +891,6 @@ static void command_line_scan(mparm_T *parmp)
/* "--help" give help message */
/* "--version" give version message */
/* "--literal" take files literally */
- /* "--nofork" don't fork */
/* "--noplugin[s]" skip plugins */
/* "--cmd <cmd>" execute cmd before vimrc */
if (STRICMP(argv[0] + argv_idx, "help") == 0)
@@ -923,7 +922,6 @@ static void command_line_scan(mparm_T *parmp)
#if !defined(UNIX)
parmp->literal = TRUE;
#endif
- } else if (STRNICMP(argv[0] + argv_idx, "nofork", 6) == 0) {
} else if (STRNICMP(argv[0] + argv_idx, "noplugin", 8) == 0)
p_lpl = FALSE;
else if (STRNICMP(argv[0] + argv_idx, "cmd", 3) == 0) {
@@ -1963,7 +1961,7 @@ static void mainerr(int n, const char *str)
}
-/// Prints help message and exits; used for 'nvim -h' & 'nvim --help'
+/// Prints help message for "nvim -h" or "nvim --help" and exits.
static void usage(void)
{
signal_stop(); // kill us with CTRL-C here, if you like
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 25d41e7328..e8dab05ba0 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -723,7 +723,7 @@ static void complete_call(msgpack_object *obj, Channel *channel)
static void call_set_error(Channel *channel, char *msg)
{
- ELOG("Msgpack-RPC error: %s", msg);
+ ELOG("msgpack-rpc: %s", msg);
for (size_t i = 0; i < kv_size(channel->call_stack); i++) {
ChannelCallFrame *frame = kv_A(channel->call_stack, i);
frame->returned = true;
diff --git a/src/nvim/option.c b/src/nvim/option.c
index db49f6ba1c..016a50fb62 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -26,8 +26,6 @@
* - Add an entry in runtime/optwin.vim.
* When making changes:
* - Adjust the help for the option in doc/option.txt.
- * - When an entry has the P_VIM flag, or is lacking the P_VI_DEF flag, add a
- * comment at the help for the 'compatible' option.
*/
#define IN_OPTION_C
@@ -334,7 +332,7 @@ typedef struct vimoption {
#define P_WAS_SET 0x100U /* option has been set/reset */
#define P_NO_MKRC 0x200U /* don't include in :mkvimrc output */
#define P_VI_DEF 0x400U /* Use Vi default for Vim */
-#define P_VIM 0x800U /* Vim option, reset when 'cp' set */
+#define P_VIM 0x800U /* Vim option */
/* when option changed, what to display: */
#define P_RSTAT 0x1000U /* redraw status lines */
@@ -2010,8 +2008,7 @@ void set_init_1(void)
|| enc_utf8
) {
/* Adjust the default for 'isprint' and 'iskeyword' to match
- * latin1. Also set the defaults for when 'nocompatible' is
- * set. */
+ * latin1. */
set_string_option_direct((char_u *)"isp", -1,
ISP_LATIN1, OPT_FREE, SID_NONE);
set_string_option_direct((char_u *)"isk", -1,
@@ -7416,14 +7413,10 @@ static void paste_option_changed(void)
old_p_paste = p_paste;
}
-/*
- * vimrc_found() - Called when a ".vimrc" or "VIMINIT" has been found.
- *
- * Reset 'compatible' and set the values for options that didn't get set yet
- * to the Vim defaults.
- * Don't do this if the 'compatible' option has been set or reset before.
- * When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
- */
+/// vimrc_found() - Called when a ".vimrc" or "VIMINIT" has been found.
+///
+/// Set the values for options that didn't get set yet to the Vim defaults.
+/// When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
void vimrc_found(char_u *fname, char_u *envname)
{
bool dofree = false;
diff --git a/src/nvim/testdir/dotest.in b/src/nvim/testdir/dotest.in
index b495f674f8..2ef4576f4e 100644
--- a/src/nvim/testdir/dotest.in
+++ b/src/nvim/testdir/dotest.in
@@ -1,3 +1,3 @@
-:set nocp nomore
+:set nomore
:map dotest /^STARTTEST j:set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest :set ff& cpo+=A nj0:so! Xdotest dotest
dotest