3

I'm making a major mode for json (which has no comments), and using SMIE for 'free' indenting.

I've currently got a half-baked grammar called json-grammar, and no rules-function.

Consequently, I'm invoking smie-setup as

(smie-setup json-grammar (lambda (method arg) ()))

However, in a few places I'm calling smie-indent-line, and when I do, smie-indent-line eventually calls comment-normalize-vars

This function asks for a value comment syntax, and insists on having some value. Given that I want to use SMIE for indentation, how can I avoid this problem?

  • Would hacking together a regexp that will never match anything work? (Maybe $; will do) – PythonNut Aug 13 '15 at 14:42
1

You'll probably want to use dummy comment settings. E.g. "#" for comment-start and "\\`.\\`" for comment-start-skip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.