From 941e61178f117eb07bfd801531a05a9bd8112094 Mon Sep 17 00:00:00 2001 From: Andrea Griffini Date: Sat, 4 May 2013 10:07:02 +0200 Subject: [PATCH] fixed detection of multiple objects after . in list --- src/read.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/read.lisp b/src/read.lisp index 05074a4..d5a0c65 100644 --- a/src/read.lisp +++ b/src/read.lisp @@ -118,7 +118,11 @@ (discard-char stream #\.) (if (terminalp (%peek-char stream)) (prog1 (ls-read stream) ; Dotted pair notation - (discard-char stream #\))) + (skip-whitespaces-and-comments stream) + (let ((ch (%peek-char stream))) + (if (or (null ch) (char= #\) ch)) + (discard-char stream #\)) + (error "Multiple objects following . in a list")))) (let ((token (concat "." (read-escaped-until stream #'terminalp)))) (cons (interpret-token token) (%read-list stream))))) -- 1.7.10.4