diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 657777d7db..7958ff6e13 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -1709,8 +1709,8 @@ char_u *trans_function_name(char_u **pp, bool skip, // only } start = *pp; - /* Check for hard coded : already translated function ID (from a user - * command). */ + // Check for hard coded : already translated function ID (from a user + // command). if ((*pp)[0] == K_SPECIAL && (*pp)[1] == KS_EXTRA && (*pp)[2] == (int)KE_SNR) { *pp += 3; @@ -2032,8 +2032,8 @@ void ex_function(exarg_T *eap) } } - /* An error in a function call during evaluation of an expression in magic - * braces should not cause the function not to be defined. */ + // An error in a function call during evaluation of an expression in magic + // braces should not cause the function not to be defined. saved_did_emsg = did_emsg; did_emsg = FALSE; @@ -2105,8 +2105,8 @@ void ex_function(exarg_T *eap) ga_init(&newlines, (int)sizeof(char_u *), 3); if (!eap->skip) { - /* Check the name of the function. Unless it's a dictionary function - * (that we are overwriting). */ + // Check the name of the function. Unless it's a dictionary function + // (that we are overwriting). if (name != NULL) { arg = name; } else { @@ -2164,8 +2164,8 @@ void ex_function(exarg_T *eap) } } - /* When there is a line break use what follows for the function body. - * Makes 'exe "func Test()\n...\nendfunc"' work. */ + // When there is a line break use what follows for the function body. + // Makes 'exe "func Test()\n...\nendfunc"' work. if (*p == '\n') { line_arg = p + 1; } else if (*p != NUL && *p != '"' && !eap->skip && !did_emsg) { @@ -2176,9 +2176,9 @@ void ex_function(exarg_T *eap) * Read the body of the function, until ":endfunction" is found. */ if (KeyTyped) { - /* Check if the function already exists, don't let the user type the - * whole function before telling him it doesn't work! For a script we - * need to skip the body to be able to find what follows. */ + // Check if the function already exists, don't let the user type the + // whole function before telling him it doesn't work! For a script we + // need to skip the body to be able to find what follows. if (!eap->skip && !eap->forceit) { if (fudi.fd_dict != NULL && fudi.fd_newkey == NULL) { EMSG(_(e_funcdict)); @@ -2305,8 +2305,8 @@ void ex_function(exarg_T *eap) break; } - /* Increase indent inside "if", "while", "for" and "try", decrease - * at "end". */ + // Increase indent inside "if", "while", "for" and "try", decrease + // at "end". if (indent > 2 && STRNCMP(p, "end", 3) == 0) { indent -= 2; } else if (STRNCMP(p, "if", 2) == 0 @@ -2421,8 +2421,8 @@ void ex_function(exarg_T *eap) } } - /* Don't define the function when skipping commands or when an error was - * detected. */ + // Don't define the function when skipping commands or when an error was + // detected. if (eap->skip || did_emsg) { goto erret; } @@ -2640,8 +2640,8 @@ bool function_exists(const char *const name, bool no_deref) NULL); nm = skipwhite(nm); - /* Only accept "funcname", "funcname ", "funcname (..." and - * "funcname(...", not "funcname!...". */ + // Only accept "funcname", "funcname ", "funcname (..." and + // "funcname(...", not "funcname!...". if (p != NULL && (*nm == NUL || *nm == '(')) { n = translated_function_exists(p); } @@ -2903,9 +2903,9 @@ void ex_return(exarg_T *eap) } } - /* When skipping or the return gets pending, advance to the next command - * in this line (!returning). Otherwise, ignore the rest of the line. - * Following lines will be ignored by get_func_line(). */ + // When skipping or the return gets pending, advance to the next command + // in this line (!returning). Otherwise, ignore the rest of the line. + // Following lines will be ignored by get_func_line(). if (returning) { eap->nextcmd = NULL; } else if (eap->nextcmd == NULL) { // no argument @@ -3098,9 +3098,9 @@ int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv) } if (reanimate) { - /* The pending return value could be overwritten by a ":return" - * without argument in a finally clause; reset the default - * return value. */ + // The pending return value could be overwritten by a ":return" + // without argument in a finally clause; reset the default + // return value. current_funccal->rettv->v_type = VAR_NUMBER; current_funccal->rettv->vval.v_number = 0; } @@ -3109,9 +3109,9 @@ int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv) } else { current_funccal->returned = TRUE; - /* If the return is carried out now, store the return value. For - * a return immediately after reanimation, the value is already - * there. */ + // If the return is carried out now, store the return value. For + // a return immediately after reanimation, the value is already + // there. if (!reanimate && rettv != NULL) { tv_clear(current_funccal->rettv); *current_funccal->rettv = *(typval_T *)rettv;