Wait you're loading image files directly using the lisp loader? This sounds risky
Lisp
You could use the c pre-processor to remove the comments. It might be a good idea to use the cpp anyway as it will also expand macros and what not for you which may be difficult to do otherwise.
Thanks for your response. One of the constraints is that it needs to be an entirely Common Lisp solution; external tools or C libraries via FFI can't be part of the solution.
You're right that macros or other C constructs can complicate the picture. Whether or not that's an issue depends on the assumptions that tools writing XPM files make. At this point I'm willing to just get past the comments issue and then see how far that gets me.
This one has a readtable with C-style /* */
comments: https://github.com/y2q-actionman/with-c-syntax (found on awesome-cl)
Thanks, that looks promising, I will take a closer look.