Search code examples
common-lispquicklispparenscript

Using quicklisp with parenscript and sigil


I would like to use some ps macros in a .parenscript file. The macros are in a library that will be loaded with quicklisp. I am using sigil to compile the .parenscript file.

I have tried this at the top of the parenscript file:

(lisp
   (progn
      (ql:quickload 'paren6)
      (use-package :paren6)))

but the macro package does not get "used".

Loading the libraries from the command line works:

>sigil --eval "(progn (ql:quickload 'paren6) (use-package :paren6))" sample.parenscript

But it feels clunky, and sigil needs a small hack to prevent it from dumping the output from quickload into the javascript output - indicating that no one else is doing things this way.

I am using sigil because I prefer to build .parenscript -> .js from the command line. Alternatives to sigil will be considered.

What is the best way to indicate a quicklisp dependency for a .parenscript file?


Solution

  • Tracked this one down: Sigil sets *package* to ps except when evaluating lisp forms, where it's left as common-lisp-user so your use-package was affecting the wrong package, and your symbols went wonky.

    Try (use-package 'paren6 'ps)