diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-12-16 23:19:31 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-12-16 23:19:31 -0800 |
commit | 0c5016a7f39a6a70018949da90f3b9737bf945de (patch) | |
tree | 2adf23155ec3684d04296a100a218f456a2c7afc /lib.c | |
parent | 030ce483baef93392d54a4aec90bfa7b5906bc53 (diff) | |
download | txr-0c5016a7f39a6a70018949da90f3b9737bf945de.tar.gz txr-0c5016a7f39a6a70018949da90f3b9737bf945de.tar.bz2 txr-0c5016a7f39a6a70018949da90f3b9737bf945de.zip |
* lib.c (intern): fix the previous diagnostic bug once more with more
feeling.
* parser.l (grammar): Recognize package prefixes in symbol tokens.
Got rid of special rule for handling lone colon.
* parser.y (sym_helper): Catch undefined package as a parsing
error rather allowing intern function to throw exception.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2561,9 +2561,10 @@ val intern(val str, val package) if (nullp(package)) { package = user_package; } else if (stringp(package)) { - package = find_package(str); - if (!package) - uw_throwf(error_s, lit("intern: ~s no such package"), str, nao); + val p = find_package(package); + if (!p) + uw_throwf(error_s, lit("intern: ~s no such package"), package, nao); + package = p; } type_check (package, PKG); |