diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core-commands.c | 32 | ||||
-rw-r--r-- | src/core-commands.h | 3 | ||||
-rw-r--r-- | src/qreg-commands.c | 10 | ||||
-rw-r--r-- | src/qreg-commands.h | 2 | ||||
-rwxr-xr-x | src/symbols-extract.tes | 4 |
5 files changed, 22 insertions, 29 deletions
diff --git a/src/core-commands.c b/src/core-commands.c index e410742..bb731a1 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -630,7 +630,7 @@ teco_state_start_input(teco_machine_main_t *ctx, gunichar chr, GError **error) ['"'] = {&teco_state_condcommand}, ['E'] = {&teco_state_ecommand, .modifier_at = TRUE, .modifier_colon = 2}, - ['I'] = {&teco_state_insert_building, + ['I'] = {&teco_state_insert_plain, .modifier_at = TRUE}, ['?'] = {&teco_state_help, .modifier_at = TRUE}, @@ -2608,6 +2608,13 @@ teco_state_ecommand_exit(teco_machine_main_t *ctx, GError **error) teco_undo_gboolean(teco_quit_requested) = TRUE; } +static void +teco_state_macrofile_deprecated(teco_machine_main_t *ctx, GError **error) +{ + teco_interface_msg(TECO_MSG_WARNING, + "<EM> command is deprecated - use <EI> instead"); +} + static teco_state_t * teco_state_ecommand_input(teco_machine_main_t *ctx, gunichar chr, GError **error) { @@ -2623,9 +2630,10 @@ teco_state_ecommand_input(teco_machine_main_t *ctx, gunichar chr, GError **error .modifier_at = TRUE, .modifier_colon = 1}, ['G'] = {&teco_state_egcommand, .modifier_at = TRUE, .modifier_colon = 1}, - ['I'] = {&teco_state_insert_nobuilding, - .modifier_at = TRUE}, - ['M'] = {&teco_state_macrofile, + ['I'] = {&teco_state_indirect, + .modifier_at = TRUE, .modifier_colon = 1}, + /* DEPRECATED: can be repurposed */ + ['M'] = {&teco_state_indirect, teco_state_macrofile_deprecated, .modifier_at = TRUE, .modifier_colon = 1}, ['N'] = {&teco_state_glob_pattern, .modifier_at = TRUE, .modifier_colon = 1}, @@ -2777,21 +2785,7 @@ teco_state_insert_done(teco_machine_main_t *ctx, const teco_string_t *str, GErro * may be better, since it has string building characters * disabled. */ -TECO_DEFINE_STATE_INSERT(teco_state_insert_building); - -/*$ EI - * [c1,c2,...]EI[text]$ -- Insert text without string building characters - * - * Inserts text at the current position in the current - * document. - * This command is identical to the \fBI\fP command, - * except that string building characters are \fBdisabled\fP. - * Therefore it may be beneficial when editing \*(ST - * macros. - */ -TECO_DEFINE_STATE_INSERT(teco_state_insert_nobuilding, - .expectstring.string_building = FALSE -); +TECO_DEFINE_STATE_INSERT(teco_state_insert_plain); static gboolean teco_state_insert_indent_initial(teco_machine_main_t *ctx, GError **error) diff --git a/src/core-commands.h b/src/core-commands.h index 73257f6..432ec38 100644 --- a/src/core-commands.h +++ b/src/core-commands.h @@ -80,6 +80,5 @@ gboolean teco_state_insert_process_edit_cmd(teco_machine_main_t *ctx, teco_machi ##__VA_ARGS__ \ ) -TECO_DECLARE_STATE(teco_state_insert_building); -TECO_DECLARE_STATE(teco_state_insert_nobuilding); +TECO_DECLARE_STATE(teco_state_insert_plain); TECO_DECLARE_STATE(teco_state_insert_indent); diff --git a/src/qreg-commands.c b/src/qreg-commands.c index a4019a0..51f9149 100644 --- a/src/qreg-commands.c +++ b/src/qreg-commands.c @@ -703,7 +703,7 @@ teco_state_macro_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg, TECO_DEFINE_STATE_EXPECTQREG(teco_state_macro); static teco_state_t * -teco_state_macrofile_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error) +teco_state_indirect_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error) { if (ctx->flags.mode > TECO_MODE_NORMAL) return &teco_state_start; @@ -725,9 +725,9 @@ teco_state_macrofile_done(teco_machine_main_t *ctx, const teco_string_t *str, GE return &teco_state_start; } -/*$ EM - * EMfile$ -- Execute macro from file - * :EMfile$ +/*$ EI indirect + * EIfile$ -- Execute from indirect command file + * :EIfile$ * * Read the file with name <file> into memory and execute its contents * as a macro. @@ -738,7 +738,7 @@ teco_state_macrofile_done(teco_machine_main_t *ctx, const teco_string_t *str, GE * As all \*(ST code, the contents of <file> must be in valid UTF-8 * even if operating in the \(lqdefault ANSI\(rq mode as configured by \fBED\fP. */ -TECO_DEFINE_STATE_EXPECTFILE(teco_state_macrofile); +TECO_DEFINE_STATE_EXPECTFILE(teco_state_indirect); static teco_state_t * teco_state_copytoqreg_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg, diff --git a/src/qreg-commands.h b/src/qreg-commands.h index f6ad82a..e224797 100644 --- a/src/qreg-commands.h +++ b/src/qreg-commands.h @@ -93,6 +93,6 @@ TECO_DECLARE_STATE(teco_state_setqreginteger); TECO_DECLARE_STATE(teco_state_increaseqreg); TECO_DECLARE_STATE(teco_state_macro); -TECO_DECLARE_STATE(teco_state_macrofile); +TECO_DECLARE_STATE(teco_state_indirect); TECO_DECLARE_STATE(teco_state_copytoqreg); diff --git a/src/symbols-extract.tes b/src/symbols-extract.tes index 9a8a270..da9c207 100755 --- a/src/symbols-extract.tes +++ b/src/symbols-extract.tes @@ -6,8 +6,8 @@ 0,2EJ !* FIXME: Memory limiting is too slow *! -:EMQ[$SCITECOPATH]/getopt.tes -EMQ[$SCITECOPATH]/string.tes +:EIQ[$SCITECOPATH]/getopt.tes +EIQ[$SCITECOPATH]/string.tes !* read commandline arguments *! [getopt.p] |