diff --git a/README.md b/README.md index 811da11..3a84c7d 100644 --- a/README.md +++ b/README.md @@ -46,18 +46,14 @@ It's ``` - Improved: - - Element functions are wrapped in macros for natural indentation. To manipulate them as function objects, prefix '%' to the element name, or use `get-builtin-element` function. + - Element functions are wrapped in macros for natural indentation. To manipulate them directly, prefix '%' to the element name. - Bugfix. https://github.com/ailisp/flute/issues/5, https://github.com/ailisp/flute/issues/7 ```lisp -(define-element dynamic-1 (as) +(define-element tag (as) (funcall as props children)) -(define-element dynamic-2 (as) - (funcall (get-builtin-element as) props children)) - -(dynamic-1 :as #'%span :class "bold" "child") -(dynamic-2 :as 'span :class "bold" "child") +(tag :as #'%span :class "bold" "child") ; child ``` diff --git a/src/elements.lisp b/src/elements.lisp index b9cad5d..12b3454 100644 --- a/src/elements.lisp +++ b/src/elements.lisp @@ -37,8 +37,7 @@ #:element-prefix #:element-children #:user-element-expand-to - #:h - #:get-builtin-element)) + #:h)) (in-package #:piccolo/elements) ;;; classes @@ -279,8 +278,3 @@ (or (html-element-p node) (fragment-p node))) (lambda (node) (find-symbol (string node) :piccolo))))) - -;;; Utility - -(defun get-builtin-element (name) - (find-symbol (string (symbolicate '% name)) :piccolo))