Remove get-builtin-element

This commit is contained in:
paku 2024-04-18 13:32:37 +09:00
parent 9b4e206623
commit fb7a549e83
2 changed files with 4 additions and 14 deletions

View file

@ -46,18 +46,14 @@ It's
``` ```
- Improved: - 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 - Bugfix. https://github.com/ailisp/flute/issues/5, https://github.com/ailisp/flute/issues/7
```lisp ```lisp
(define-element dynamic-1 (as) (define-element tag (as)
(funcall as props children)) (funcall as props children))
(define-element dynamic-2 (as) (tag :as #'%span :class "bold" "child")
(funcall (get-builtin-element as) props children))
(dynamic-1 :as #'%span :class "bold" "child")
(dynamic-2 :as 'span :class "bold" "child")
; <span class="bold">child</span> ; <span class="bold">child</span>
``` ```

View file

@ -37,8 +37,7 @@
#:element-prefix #:element-prefix
#:element-children #:element-children
#:user-element-expand-to #:user-element-expand-to
#:h #:h))
#:get-builtin-element))
(in-package #:piccolo/elements) (in-package #:piccolo/elements)
;;; classes ;;; classes
@ -279,8 +278,3 @@
(or (html-element-p node) (fragment-p node))) (or (html-element-p node) (fragment-p node)))
(lambda (node) (lambda (node)
(find-symbol (string node) :piccolo))))) (find-symbol (string node) :piccolo)))))
;;; Utility
(defun get-builtin-element (name)
(find-symbol (string (symbolicate '% name)) :piccolo))