Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use a built-in element such as "title" as argument in define-element #5

Open
vindarel opened this issue Dec 12, 2019 · 0 comments

Comments

@vindarel
Copy link

Hello,

I tried Flute (which looks great and easy to use, thanks and well done) and I stumbled across a symbol conflict.

I wanted to define an element which takes "title" as argument, but it is not possible:

(define-element page (title)
  (h (html (h1 title))))

throws:

; in: DEFINE-ELEMENT PAGE
;     (FLUTE:DEFINE-ELEMENT TESTFLUTE::PAGE
;         (TESTFLUTE::TITLE)
;       (FLUTE:H
;         (TESTFLUTE::HTML (TESTFLUTE::H1 TESTFLUTE::TITLE))))
; --> LET LET PROGN DEFUN PROGN SB-IMPL::%DEFUN SB-INT:NAMED-LAMBDA 
; --> FUNCTION BLOCK MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL FUNCTION 
; --> LET SETF LET* LAMBDA FUNCTION 
; ==>
;   (LET ((TESTFLUTE::TITLE
;          (FLUTE:ATTR FLUTE:ATTRS
;                      (ALEXANDRIA.0.DEV:MAKE-KEYWORD 'TESTFLUTE::TITLE))))
;     (PROGN
;      (FLUTE:H
;        (TESTFLUTE::HTML (TESTFLUTE::H1 TESTFLUTE::TITLE)))))
; 
; caught STYLE-WARNING:
;   The variable TITLE is defined but never used.

; file: /tmp/slimeY8QlRC
; in: DEFINE-ELEMENT PAGE
;     (FLUTE:H
;       (TESTFLUTE::HTML (TESTFLUTE::H1 TESTFLUTE::TITLE)))
; --> PROGN FLUTE:HTML 
; ==>
;   (FLUTE:H1 FLUTE:TITLE)
; 
; caught WARNING:
;   undefined variable: FLUTE:TITLE
; 
; compilation unit finished
;   Undefined variable:
;     FLUTE:TITLE
;   caught 1 WARNING condition
;   caught 1 STYLE-WARNING condition

Using img as argument gives the same error, using id is OK (it is not a builtin).

Not being able to use "title" is problematic, being such common :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant