Mon Jan 4 00:11:25 UTC 2010 pix@kepibu.org * Rename some functions to better match CSS terminology diff -rN -u old-Oh, Ducks!/selectors.lisp new-Oh, Ducks!/selectors.lisp --- old-Oh, Ducks!/selectors.lisp 2013-11-19 06:54:21.000000000 +0000 +++ new-Oh, Ducks!/selectors.lisp 2013-11-19 06:54:21.000000000 +0000 @@ -99,15 +99,15 @@ ;#t(lex$ ("#" (?id :identifier))) ;#t(lex$ (?type :identifier)) -(defun find-matching-elements-in-list (selector element-list) +(defun subjects-in-list (selector element-list) (reduce #'nconc - (mapcar (curry #'find-matching-elements selector) + (mapcar (curry #'subjects-of selector) element-list))) -(defgeneric find-matching-elements (selector element) +(defgeneric subjects-of (selector element) (:method (selector (element t)) (flet ((find-in-list (elements) - (mapcar (curry #'find-matching-elements selector) + (mapcar (curry #'subjects-of selector) elements))) (nconc (when (element-matches-p element selector) (list element)) diff -rN -u old-Oh, Ducks!/unify.lisp new-Oh, Ducks!/unify.lisp --- old-Oh, Ducks!/unify.lisp 2013-11-19 06:54:21.000000000 +0000 +++ new-Oh, Ducks!/unify.lisp 2013-11-19 06:54:21.000000000 +0000 @@ -23,7 +23,7 @@ (val (cond ((terminating-implicit-sibling-combinator-p css-specifier) ;; search remaining siblings - (find-matching-elements-in-list + (subjects-in-list css-specifier (rest (member document @@ -38,9 +38,9 @@ ;;; exactly show up all that well. Somebody might assume " b" was the same as ;;; "b" and get confused. ((ignore-errors (element-parent document)) ; bleh. element-parent breaks lhtml nodes - (find-matching-elements-in-list css-specifier (element-children document))) + (subjects-in-list css-specifier (element-children document))) ;; root element includes itself - (t (find-matching-elements css-specifier document))))) + (t (subjects-of css-specifier document))))) (cond ((null val) (error 'unification-failure