[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Thu Apr 13 10:47:48 UTC 2006


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv22566

Modified Files:
	lisp-syntax.lisp 
Log Message:
Fixed inheritance hierarchy for vector forms and made `nth-form' not
return invalid values.


--- /project/climacs/cvsroot/climacs/lisp-syntax.lisp	2006/04/13 09:25:41	1.50
+++ /project/climacs/cvsroot/climacs/lisp-syntax.lisp	2006/04/13 10:47:48	1.51
@@ -636,8 +636,8 @@
 
 ;;; parse trees
 (defclass simple-vector-form (list-form) ())
-(defclass complete-simple-vector-form (complete-list-form) ())
-(defclass incomplete-simple-vector-form (incomplete-list-form) ())
+(defclass complete-simple-vector-form (complete-list-form simple-vector-form) ())
+(defclass incomplete-simple-vector-form (incomplete-list-form simple-vector-form) ())
 
 (define-parser-state |#( form* | (lexer-list-state form-may-follow) ())
 (define-parser-state |#( form* ) | (lexer-toplevel-state parser-state) ())
@@ -1190,12 +1190,13 @@
      finally (return rest)))
 
 (defun nth-form (n list)
-  "Returns the nth form in list."
+  "Returns the nth form in list or `nil'."
   (loop for item in list
      count (typep item 'form)
        into forms
      until (> forms n)
-     finally (return item)))
+     finally (when (> forms n)
+               (return item))))
 
 (defun elt-form (list n)
   "Returns the nth form in list."




More information about the Climacs-cvs mailing list