Skip to content

Top level macro usage produces SIMPLE-WARNING: undefined variable #95

Open
@Symbolics

Description

@Symbolics

Title says it all. For example this macro:

(defmacro defplot (name &body spec)
  "Define a plot NAME. Returns an object of PLOT class bound to a symbol NAME.  Adds symbol to *all-plots*."
  `(progn
     (defparameter ,name (%defplot ',name ,@spec))
     (setf (gethash (plot-name ,name) *all-plots*) ,name)
     ,name))	

When executed like this:

(vega:defplot online-bar-chart `(:mark :bar
                                 :data ,online
                                 :encoding (:x (:field source :type "nominal"      :title "Online resource")
                                            :y (:field count  :type "quantitative" :title "Percentage preference"))))

Produces the warning. The variable is actually defined, and the warning isn't issued at neither a SBCL REPL nor with slime, so I'm thinking it might be something with the interaction with common-lisp-jupyter. The notebook on github also shows the same behaviour and is a good way to reproduce the warning.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions