It's a silly question, really. I want to do
(position ?; "This is a test; or is it?")
Unfortunately, the font-lock is regex based, so it highlights a part of the code as a comment.
What's the best way to handle this? At the moment, I've got either
(defconst semicolon (aref ";" 0))
(position semicolon "This is a test; or is it?")
or
(position 59 "This is a test; or is it?")
You should escape the semicolon with a backslash:
(position ?\; "This is a test; or is it?")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With