summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorDominique Pelle <dominique.pelle@gmail.com>2022-01-08 12:41:16 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 12:41:16 +0000
commit748b308eebe8d8860888eb27da08333f175d547d (patch)
treedcb524e3faab88b0238bd892cdfa2870252c7e51 /src/buffer.c
parent370791465e745354d66696de8cbd15504cf958c0 (diff)
patch 8.2.4038: various code not used when features are disabledv8.2.4038
Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index c00993a945..3445b204f3 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -138,6 +138,7 @@ read_buffer(
return retval;
}
+#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Ensure buffer "buf" is loaded. Does not trigger the swap-exists action.
*/
@@ -154,6 +155,7 @@ buffer_ensure_loaded(buf_T *buf)
aucmd_restbuf(&aco);
}
}
+#endif
/*
* Open current buffer, that is: open the memfile and read the file into
@@ -5609,6 +5611,7 @@ bt_prompt(buf_T *buf)
return buf != NULL && buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'r';
}
+#if defined(FEAT_PROP_POPUP) || defined(PROTO)
/*
* Return TRUE if "buf" is a buffer for a popup window.
*/
@@ -5618,6 +5621,7 @@ bt_popup(buf_T *buf)
return buf != NULL && buf->b_p_bt != NULL
&& buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'o';
}
+#endif
/*
* Return TRUE if "buf" is a "nofile", "acwrite", "terminal" or "prompt"
@@ -5632,6 +5636,7 @@ bt_nofilename(buf_T *buf)
|| buf->b_p_bt[0] == 'p');
}
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
/*
* Return TRUE if "buf" has 'buftype' set to "nofile".
*/
@@ -5640,6 +5645,7 @@ bt_nofile(buf_T *buf)
{
return buf != NULL && buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f';
}
+#endif
/*
* Return TRUE if "buf" is a "nowrite", "nofile", "terminal" or "prompt"