Why don't major modes just inspect the faces? http://t.co/LGkmcCYQlN -- really interesting answers about Emacs syntax highlighting.