From a2b6b1d99ad9874be0e3e358b00aa4b9bcf7b253 Mon Sep 17 00:00:00 2001 From: paku Date: Wed, 17 Apr 2024 00:53:58 +0900 Subject: [PATCH] Improve get-builtin-element --- README.md | 6 +++--- src/elements.lisp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1f3d368..811da11 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ 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-element` function. + - 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. - Bugfix. https://github.com/ailisp/flute/issues/5, https://github.com/ailisp/flute/issues/7 ```lisp @@ -54,10 +54,10 @@ It's (funcall as props children)) (define-element dynamic-2 (as) - (funcall (get-element as) props children)) + (funcall (get-builtin-element as) props children)) (dynamic-1 :as #'%span :class "bold" "child") -(dynamic-2 :as "span" :class "bold" "child") +(dynamic-2 :as 'span :class "bold" "child") ; child ``` diff --git a/src/elements.lisp b/src/elements.lisp index d86be08..e9c3d8f 100644 --- a/src/elements.lisp +++ b/src/elements.lisp @@ -38,7 +38,7 @@ #:element-children #:user-element-expand-to #:h - #:get-element)) + #:get-builtin-element)) (in-package #:piccolo/elements) ;;; classes @@ -283,5 +283,5 @@ ;;; Utility -(defun get-element (name) - (find-symbol (concatenate 'string "%" (string-upcase name)) :piccolo)) +(defun get-builtin-element (name) + (find-symbol (string (symbolicate '% name)) :piccolo))