diff options
Diffstat (limited to 'lisp/read.c')
-rw-r--r-- | lisp/read.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/read.c b/lisp/read.c index 283f473..9c70b64 100644 --- a/lisp/read.c +++ b/lisp/read.c @@ -1127,6 +1127,13 @@ LispReadObject(int unintern, read_info *info) collon = 1; string[length++] = ch; symbol = string + 1; + ch = LispGet(); + if (ch == '|') { + quote = ch; + unreadable = 1; + } + else if (ch != EOF) + LispUnget(ch); } else if (ch) { if (islower(ch)) @@ -1220,12 +1227,6 @@ LispReadObject(int unintern, read_info *info) else if (quote == '"') object = LSTRING(string, length); - else if (quote == '|' || (unreadable && !collon)) { - /* Set unreadable field, this atom needs quoting to be read back */ - object = ATOM(string); - object->data.atom->unreadable = 1; - } - else if (collon) { /* Package specified in object name */ symbol[-1] = '\0'; @@ -1236,6 +1237,12 @@ LispReadObject(int unintern, read_info *info) read__stream, read__line); } + else if (quote == '|' || (unreadable && !collon)) { + /* Set unreadable field, this atom needs quoting to be read back */ + object = ATOM(string); + object->data.atom->unreadable = 1; + } + /* Check some common symbols */ else if (length == 1 && string[0] == 'T') /* The T */ |