From 3f7a4655351dc6facb709ab4d3c6e3bd8164da77 Mon Sep 17 00:00:00 2001 From: Michael Reed Date: Sun, 15 Nov 2015 17:43:41 -0500 Subject: ex_cmds.lua: Use ex_ni directly As can be seen in [1], the ifdefs are leftovers from Vim, where tons of features are optional. This is not the case in Nvim, so the macros are of little use. Besides, ex_ni is already used in a bunch of places, just not consistently. The ex_language macro was left untouched as the inclusion of ``:language'' actually is determined at compile time, unlike the other commands which _always_ print "this command is not available in this version". [1]: https://github.com/vim/vim/blob/master/src/ex_docmd.c#L18-L497 Reviewed-by: Justin M. Keyes --- src/nvim/ex_docmd.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/nvim/ex_docmd.c') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 7b5e3939f2..4d9f8b5769 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -80,6 +80,9 @@ static int quitmore = 0; static int ex_pressedreturn = FALSE; +/* whether ":lcd" was produced for a session */ +static int did_lcd; + typedef struct ucmd { char_u *uc_name; /* The command name */ uint32_t uc_argt; /* The argument type */ @@ -144,23 +147,9 @@ struct dbg_stuff { # include "ex_docmd.c.generated.h" #endif -# define ex_gui ex_nogui -# define ex_popup ex_ni -# define ex_simalt ex_ni -# define gui_mch_find_dialog ex_ni -# define gui_mch_replace_dialog ex_ni -# define ex_helpfind ex_ni -static int did_lcd; /* whether ":lcd" was produced for a session */ #ifndef HAVE_WORKING_LIBINTL # define ex_language ex_ni #endif -# define ex_wsverb ex_ni -# define ex_nbclose ex_ni -# define ex_nbkey ex_ni -# define ex_nbstart ex_ni - - - /* * Declare cmdnames[]. -- cgit