diff --git a/hy_base/odoo.hy b/hy_base/odoo.hy index a4c0b47..d439439 100644 --- a/hy_base/odoo.hy +++ b/hy_base/odoo.hy @@ -17,7 +17,6 @@ " Odoo XML macros " -(require [odoo.addons.hy_base.xml [*]]) (import [odoo.addons.hy_base.xml [*]]) (defmacro if-python2 [python2-form python3-form] diff --git a/hy_base/xml.hy b/hy_base/xml.hy index 34d8f80..211abde 100644 --- a/hy_base/xml.hy +++ b/hy_base/xml.hy @@ -43,24 +43,3 @@ (setv children (or (if text [text] children) [])) {"tag" tag "attrs" (or attrs {}) "children" children} ) - -(defmacro xmlnc [&rest args] - "XMLNode with default children, not attributes" - (cond [(= (len args) 1) (setv tag (first args) attrs {} children [])] - [(= (len args) 2) (setv tag (first args) attrs {} children (last args))] - [(= (len args) 3) (setv tag (first args) attrs (get args 1) children (last args))]) - `{"tag" ~tag "attrs" ~attrs "children" ~children}) - -(defmacro xmlna [&rest args] - "XMLNode with default attributes, not children" - (cond [(= (len args) 1) (setv tag (first args) attrs {} children [])] - [(= (len args) 2) (setv tag (first args) attrs (last args) children [])] - [(= (len args) 3) (setv tag (first args) attrs (get args 1) children (last args))]) - `{"tag" ~tag "attrs" ~attrs "children" ~children}) - -(defmacro xmlnt [&rest args] - "XMLNode with no child but maybe some text" - (cond [(= (len args) 1) (setv tag (first args) attrs {} text "")] - [(= (len args) 2) (setv tag (first args) attrs {} text (last args))] - [(= (len args) 3) (setv tag (first args) attrs (get args 1) text (last args))]) - `(xmln ~tag ~attrs [~text]))