glynnforrest / salt-mode

Emacs major mode for Salt States
GNU General Public License v3.0
22 stars 5 forks source link

Use font-lock functions that are available in 24.4 #15

Closed glynnforrest closed 7 years ago

glynnforrest commented 7 years ago

It doesn't look like (font-lock-flush) is available in 24.4, so the build is breaking now that there are actual tests running: https://travis-ci.org/glynnforrest/salt-mode/builds/249250857#L738

I think (font-lock-defontify) does what you want @joewreschnig, can you confirm?

joewreschnig commented 7 years ago

I'm not sure. I don't think font-lock-defontify guarantees refontification, although it does seem to happen in practice. I'd feel better with (if (fboundp 'font-lock-flush) (font-lock-flush) (font-lock-defontify)) as font-lock-flush is definitely what we want, and everything else is probably broken in at least one subtle way (or there'd have been no need to addfont-lock-flush).

glynnforrest commented 7 years ago

Good point, it'll now use font-lock-flush when available.