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

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

Open
Symbolics opened this issue Jan 21, 2023 · 0 comments
Open

Comments

@Symbolics
Copy link

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?

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