patch 8.2.4038: various code not used when features are disabled
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
diff --git a/src/globals.h b/src/globals.h
index b258aec..f04b29e 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -440,7 +440,9 @@
#endif
+#ifdef FEAT_EVAL
EXTERN int did_source_packages INIT(= FALSE);
+#endif
// Magic number used for hashitem "hi_key" value indicating a deleted item.
// Only the address is used.
@@ -1153,7 +1155,9 @@
EXTERN cmdmod_T cmdmod; // Ex command modifiers
+#ifdef FEAT_EVAL
EXTERN int is_export INIT(= FALSE); // :export {cmd}
+#endif
EXTERN int msg_silent INIT(= 0); // don't print messages
EXTERN int emsg_silent INIT(= 0); // don't print error messages
@@ -1190,7 +1194,9 @@
#endif
;
EXTERN int ex_normal_busy INIT(= 0); // recursiveness of ex_normal()
+#ifdef FEAT_EVAL
EXTERN int in_feedkeys INIT(= 0); // ex_normal_busy set in feedkeys()
+#endif
EXTERN int ex_normal_lock INIT(= 0); // forbid use of ex_normal()
#ifdef FEAT_EVAL
@@ -1394,8 +1400,10 @@
EXTERN long sub_nsubs; // total number of substitutions
EXTERN linenr_T sub_nlines; // total number of lines changed
+#ifdef FEAT_EVAL
// Used when a compiled :substitute has an expression.
EXTERN struct subs_expr_S *substitute_instr INIT(= NULL);
+#endif
// table to store parsed 'wildmode'
EXTERN char_u wim_flags[4];
@@ -1588,7 +1596,9 @@
EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM"));
EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP"));
+#ifdef FEAT_EVAL
EXTERN char line_msg[] INIT(= N_(" line "));
+#endif
#ifdef FEAT_CRYPT
EXTERN char need_key_msg[] INIT(= N_("Need encryption key for \"%s\""));