[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/parsetexi/parser.c (process_remai
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): catch an unknown command that is an unresolved alias earlier. |
Date: |
Wed, 01 Mar 2023 10:30:41 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new c22cde3142 * tp/Texinfo/XS/parsetexi/parser.c
(process_remaining_on_line): catch an unknown command that is an unresolved
alias earlier.
c22cde3142 is described below
commit c22cde3142088de7aca1e1ecb52dfac5a3c4c873
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Mar 1 16:30:32 2023 +0100
* tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
catch an unknown command that is an unresolved alias earlier.
---
ChangeLog | 5 +++++
tp/Texinfo/XS/parsetexi/parser.c | 23 ++++++++---------------
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7f461fca41..c77ccf2e16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-01 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
+ catch an unknown command that is an unresolved alias earlier.
+
2023-03-01 Patrice Dumas <pertusus@free.fr>
An alias referring to another alias at definition time is resolved
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 5cdd5a2e91..d10a27175e 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1816,7 +1816,14 @@ process_remaining_on_line (ELEMENT **current_inout, char
**line_inout)
if ((!cmd && command)
/* command marked as unknown, normally a registered user-defined command
that was set as @alias-ed but has not been defined since */
- || (command_data(cmd).flags & CF_UNKNOWN))
+ || (command_data(cmd).flags & CF_UNKNOWN)
+ /* Alias command that did not resolve to a non alias command.
+ This is possible only if the command read was already an alias
+ resolving to cmd and not to a non alias command. In turn,
+ this is possible if there was an error at the time of alias
+ definition (because the alias was defined recursively).
+ */
+ || (command_data(cmd).flags & CF_ALIAS))
{
ELEMENT *paragraph;
char *unknown_cmd;
@@ -2197,20 +2204,6 @@ process_remaining_on_line (ELEMENT **current_inout, char
**line_inout)
{
current = handle_brace_command (current, &line, cmd);
}
- else
- {
- /* this can only happen if cmd is a user defined alias
- as all the other types of command are either expanded
- (user-defined macro) or are one of the types handled just above
- (including user-defined index and definfoenclose commands).
- This cmd is not resolved into a non alias command because
- the command read was already an alias resolving to cmd
- and not to a non alias command because there was an error at
- the time of alias definition (because the alias was defined
- recursively).
- */
- line_error ("unknown command `%s'", command_name(cmd));
- }
}
/* "Separator" character */
else if (*line != '\0' && strchr ("{}@,:\t.\f", *line))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): catch an unknown command that is an unresolved alias earlier.,
Patrice Dumas <=