Skip to content

Commit

Permalink
Merge pull request #3723 from masatake/readtags--long-option-bug
Browse files Browse the repository at this point in the history
readtags: fix a bug compiling a formatter wrongly if giving --formater long option
  • Loading branch information
masatake authored May 13, 2023
2 parents dbeed62 + 00ceb34 commit ed846e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tmain/readtags-formatter.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if ! ( "${READTAGS}" -h | grep -q -e -F ); then
fi

echo '# FQ' &&
${V} ${READTAGS} -t output.tags -Q '(eq? $kind "function")' -F '(list $name #t)' -l &&
${V} ${READTAGS} -t output.tags -Q '(eq? $kind "function")' --formatter '(list $name #t)' -l &&
echo '# F' &&
${V} ${READTAGS} -t output.tags -F '(if (eq? $kind "function") (list $name #t) #f)' -l &&
echo '# F declarations' &&
Expand Down
6 changes: 3 additions & 3 deletions extra-cmds/readtags-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,9 @@ extern int main (int argc, char **argv)
else if (strcmp (optname, "formatter") == 0)
{
if (i + 1 < argc)
Sorter = compileExpression (argv[++i],
(void * (*)(EsObject *))f_compile,
optname);
Formatter = compileExpression (argv[++i],
(void * (*)(EsObject *))f_compile,
optname);
else
{
fprintf (stderr, "%s: missing formatter expression for --%s option\n",
Expand Down

0 comments on commit ed846e4

Please sign in to comment.