(use-modules (geda page)) (use-modules (geda object)) (use-modules (geda attrib)) ; Removes all components having the attrib NAME=VALUE from PAGE (define (delete-components-by-attrib! page name value) (for-each (lambda (obj) (if (component? obj) (for-each (lambda (attr) (and (string=? (attrib-name attr) name) (string=? (attrib-value attr) value) (let ((attached-attribs (object-attribs obj))) (apply detach-attribs! obj attached-attribs) (apply page-remove! page obj attached-attribs)))) (object-attribs obj)))) (page-contents page)))