I'm trying to make a font lock hook to replace strings of text for a mathmatical notation plugin.
So I'm thinking " / " (note the spaces) will turn into " ÷ ", but "/" won't. (It's a package mainly for R statistical language.)
I'm playing with the examples from the manual and I can't even get that to work lol. I was trying to get the word FIXIT to change font color.
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\<\\(FIXIT\\):" 1
font-lock-warning-face t)))))
I don't even fully understand the syntax since I'm just getting used to lisp. Does it use a RegEx to identify strings? and if so, what RegEx engine.
I was hoping it would change the font color, but it didnt... but again, that was just me playing with it trying to understand it, not the end goal. The end result would be the first thing I mentioned to change math symbols (" / " into " ÷ ")
prettify-symbols-mode
.prettify-symbols-mode
for this but for certain items I need something more powerful, asprettify-symbols-mode
only allows one symbol. So if I need to replace a string of symbols,p-s
mode only allows one (as far as i know.) I also would like to italicize variables as is generally done in mathematical notation (ie: x )