Update of /project/climacs/cvsroot/climacs In directory clnet:/tmp/cvs-serv11885
Modified Files: lisp-syntax.lisp lisp-syntax-swine.lisp Log Message: More fixes regarding handling of quoted forms.
--- /project/climacs/cvsroot/climacs/lisp-syntax.lisp 2006/09/15 22:34:24 1.116 +++ /project/climacs/cvsroot/climacs/lisp-syntax.lisp 2006/09/16 10:30:37 1.117 @@ -1565,6 +1565,12 @@ (defmethod form-operator (syntax (form list-form)) (first-form (rest (children form))))
+(defmethod form-operator (syntax (form complete-quote-form)) + (first-form (rest (children (second (children form)))))) + +(defmethod form-operator (syntax (form complete-backquote-form)) + (first-form (rest (children (second (children form)))))) + (defgeneric form-operands (syntax form) (:documentation "Returns the operands of `form' as a list of tokens. Returns nil if none can be found.") @@ -1698,6 +1704,12 @@
(define-form-predicate comment-p (comment))
+(defgeneric form-at-top-level-p (form) + (:documentation "Return NIL if `form' is not a top-level-form, + T otherwise.") + (:method ((form t)) + (typep (parent form) 'form*))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Useful functions for modifying forms based on the mark. @@ -2013,7 +2025,8 @@ (loop for (first . rest) on children if (formp first) do - (cond ((< (start-offset first) offset (end-offset first)) + (cond ((and (< (start-offset first) offset) + (<= offset (end-offset first))) (return (if (null (children first)) nil (form-before-in-children (children first) offset)))) --- /project/climacs/cvsroot/climacs/lisp-syntax-swine.lisp 2006/09/15 22:34:24 1.9 +++ /project/climacs/cvsroot/climacs/lisp-syntax-swine.lisp 2006/09/16 10:30:37 1.10 @@ -1424,7 +1424,8 @@ (funcall fn syntax (if useful-token (start-offset (fully-quoted-form token)) - (if (form-quoted-p token) + (if (and (form-quoted-p token) + (form-incomplete-p token)) (start-offset token) (offset mark))) (if useful-token