diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-12-12 06:19:44 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-12-12 06:19:44 -0800 |
commit | 05df976289805d6405397d098ec07c08d3ecf66a (patch) | |
tree | 691e923a0f7d84be1502f0a8266e885a6549914b /eval.c | |
parent | 6fbedee8d28ed964ef6b9eb8b01fd0911d99c9ff (diff) | |
download | txr-05df976289805d6405397d098ec07c08d3ecf66a.tar.gz txr-05df976289805d6405397d098ec07c08d3ecf66a.tar.bz2 txr-05df976289805d6405397d098ec07c08d3ecf66a.zip |
Improve unbound function warning.
* eval.c (do_expand): Do not use the "unbound function"
warning if the operator position isn't a symbol which
can have a function binding.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3909,7 +3909,11 @@ static val do_expand(val form, val menv) if (form_ex == form && args_ex == args) { if (!lookup_fun(menv, sym) && !special_operator_p(sym)) - eval_warn(last_form_expanded, lit("unbound function ~s"), sym, nao); + eval_warn(last_form_expanded, + if3(bindable(sym_ex), + lit("unbound function ~s"), + lit("~s appears in operator position")), + sym, nao); return form; } |