aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core-commands.c')
-rw-r--r--src/core-commands.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/core-commands.c b/src/core-commands.c
index 9a5c935..f74b5f2 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -2202,51 +2202,6 @@ TECO_DEFINE_STATE_CASEINSENSITIVE(teco_state_escape,
.style = SCE_SCITECO_COMMAND
);
-/*$ EF close
- * [bool]EF -- Remove buffer from ring
- * -EF
- *
- * Removes buffer from buffer ring, effectively
- * closing it.
- * If the buffer is dirty (modified), EF will yield
- * an error.
- * <bool> may be a specified to enforce closing dirty
- * buffers.
- * If it is a Failure condition boolean (negative),
- * the buffer will be closed unconditionally.
- * If <bool> is absent, the sign prefix (1 or -1) will
- * be implied, so \(lq-EF\(rq will always close the buffer.
- *
- * It is noteworthy that EF will be executed immediately in
- * interactive mode but can be rubbed out at a later time
- * to reopen the file.
- * Closed files are kept in memory until the command line
- * is terminated.
- */
-static void
-teco_state_ecommand_close(teco_machine_main_t *ctx, GError **error)
-{
- if (teco_qreg_current) {
- const teco_string_t *name = &teco_qreg_current->head.name;
- g_autofree gchar *name_printable = teco_string_echo(name->data, name->len);
- g_set_error(error, TECO_ERROR, TECO_ERROR_FAILED,
- "Q-Register \"%s\" currently edited", name_printable);
- return;
- }
-
- teco_int_t v;
- if (!teco_expressions_pop_num_calc(&v, teco_num_sign, error))
- return;
- if (teco_is_failure(v) && teco_ring_current->dirty) {
- g_set_error(error, TECO_ERROR, TECO_ERROR_FAILED,
- "Buffer \"%s\" is dirty",
- teco_ring_current->filename ? : "(Unnamed)");
- return;
- }
-
- teco_ring_close(error);
-}
-
/*$ ED flags
* flags ED -- Set and get ED-flags
* [off,]on ED