aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xdoc/grosciteco.tes2
-rwxr-xr-xdoc/tedoc.tes2
-rw-r--r--fallback.teco_inibin2141 -> 2141 bytes
-rw-r--r--lib/lexer.tes2
-rw-r--r--lib/lexers/woman.tes2
-rw-r--r--lib/session.tesbin3180 -> 3180 bytes
-rw-r--r--src/core-commands.c32
-rw-r--r--src/core-commands.h3
-rw-r--r--src/qreg-commands.c10
-rw-r--r--src/qreg-commands.h2
-rwxr-xr-xsrc/symbols-extract.tes4
-rw-r--r--tests/testsuite.at6
12 files changed, 29 insertions, 36 deletions
diff --git a/doc/grosciteco.tes b/doc/grosciteco.tes
index 5548f1c..f9565b5 100755
--- a/doc/grosciteco.tes
+++ b/doc/grosciteco.tes
@@ -3,7 +3,7 @@
0,2EJ !* FIXME: Memory limiting is too slow *!
-:EMQ[$SCITECOPATH]/getopt.tes
+:EIQ[$SCITECOPATH]/getopt.tes
!* Process command-line options *!
[optstring]t: M[getopt]"F (0/0) '
diff --git a/doc/tedoc.tes b/doc/tedoc.tes
index 1f13e54..b148691 100755
--- a/doc/tedoc.tes
+++ b/doc/tedoc.tes
@@ -3,7 +3,7 @@
0,2EJ !* FIXME: Memory limiting is too slow *!
-:EMQ[$SCITECOPATH]/getopt.tes
+:EIQ[$SCITECOPATH]/getopt.tes
@[format_header]{
FD--S .,(:L"S.|Z')@Xa I^J
diff --git a/fallback.teco_ini b/fallback.teco_ini
index 7919c34..72c13f7 100644
--- a/fallback.teco_ini
+++ b/fallback.teco_ini
Binary files differ
diff --git a/lib/lexer.tes b/lib/lexer.tes
index 2969184..4e3e1b5 100644
--- a/lib/lexer.tes
+++ b/lib/lexer.tes
@@ -29,7 +29,7 @@
[_ 1ENQ[$SCITECOPATH]/lexers/*.tes ]_ J
<:L;R
0X.[filename] 4R .U.p <-A-^^/"= 1; ':R;> .,Q.pX.[name]
- EMQ.[filename]
+ EIQ.[filename]
:@EU[lexer.auto]{
:M[lexer.test.Q.[name]]"S :M[lexer.set.Q.[name]] ]_ '
}
diff --git a/lib/lexers/woman.tes b/lib/lexers/woman.tes
index 6265e60..01b19d5 100644
--- a/lib/lexers/woman.tes
+++ b/lib/lexers/woman.tes
@@ -22,5 +22,5 @@
10,1#4ESSETYCARETPOLICY
0EJ-1"> 32ESSTYLESETFONTQ[lexer.woman.font] :M[color.init] '
- 1:EN*Q*.tec"S EMQ*.tec '
+ 1:EN*Q*.tec"S EIQ*.tec '
}
diff --git a/lib/session.tes b/lib/session.tes
index 3048e9e..845db25 100644
--- a/lib/session.tes
+++ b/lib/session.tes
Binary files differ
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]
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 776fc41..dddb1f0 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -300,10 +300,10 @@ AT_SETUP([Command line opener])
AT_DATA([data.123], [0123456789
9876543210
])
-AT_CHECK([[$SCITECO -e "@EM'^EQ[\$SCITECOPATH]/opener.tes' M[opener] -EF .-13\"N(0/0)'" +2,3 data.123]], 0, ignore, ignore)
-AT_CHECK([[$SCITECO -e "@EM'^EQ[\$SCITECOPATH]/opener.tes' M[opener] -EF .-11\"N(0/0)'" data.123:2]], 0, ignore, ignore)
+AT_CHECK([[$SCITECO -e "@EI'^EQ[\$SCITECOPATH]/opener.tes' M[opener] -EF .-13\"N(0/0)'" +2,3 data.123]], 0, ignore, ignore)
+AT_CHECK([[$SCITECO -e "@EI'^EQ[\$SCITECOPATH]/opener.tes' M[opener] -EF .-11\"N(0/0)'" data.123:2]], 0, ignore, ignore)
# `-S` stops processing of special arguments
-AT_CHECK([[$SCITECO -e "@EM'^EQ[\$SCITECOPATH]/opener.tes' M[opener] -EF EJ-2\"N(0/0)'" -S +1 data.123]], 0, ignore, ignore)
+AT_CHECK([[$SCITECO -e "@EI'^EQ[\$SCITECOPATH]/opener.tes' M[opener] -EF EJ-2\"N(0/0)'" -S +1 data.123]], 0, ignore, ignore)
AT_CLEANUP
AT_BANNER([Regression Tests])