From b29282e16fc75487428d58c917d0d55cca810f5b Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Thu, 14 Oct 2004 13:46:30 +0000 Subject: [PATCH] Oops. We were handling the case of an OTHERWISE key, but we forget to handle the situation of the key T when used as a normal clause. From Bruno Haible, cmucl-imp, 2004-10-13. --- code/macros.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/macros.lisp b/code/macros.lisp index 30efb7e6b..4918550d4 100644 --- a/code/macros.lisp +++ b/code/macros.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.101 2004/06/29 20:44:40 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.102 2004/10/14 13:46:30 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1307,7 +1307,13 @@ (error "No default clause allowed in ~S: ~S" name case) (push `(t nil ,@(rest case)) clauses))) ((and (eq name 'case)) - (error "T and OTHERWISE may not be used as key designators for ~A" name)))) + (error "T and OTHERWISE may not be used as key designators for ~A" name)) + ((eq (first case) t) + ;; The key T is normal clause, because it's not + ;; the last clause. + (push (first case) keys) + (push `((,test ,keyform-value + ',(first case)) nil ,@(rest case)) clauses)))) ((and multi-p (listp (first case))) (setf keys (append (first case) keys)) (push `((or ,@(mapcar #'(lambda (key) -- GitLab