1

In tex-mode, the font lock mechanism treats characters between « and » as quoted text. This is fine for French and Norwegian, which use the quotation marks «thus».

But in German and Danish the quotation marks are placed »thus«. How do I get Emacs' font lock mechanism to treat characters between » and « as quoted text, rather than the other way round?

(I'm using emacs 24.5.1.)

2

Setting the variable font-latex-quotes to the symbol german should do the trick (unless this is too new for your emacs). The standard value, auto, should work too, however, if the document language can be somehow inferred automatically. See the doc string for font-latex-quotes.

For example, put this after \end{document}:

Local Variables:
font-latex-quotes: german
End:
  • Or did you really mean tex-mode, and not latex-mode? If so, my apologies. I don't know what to do in that case. Also, I think this relies on auc-tex. – Harald Hanche-Olsen Dec 8 '17 at 13:56
  • No, I did mean latex-mode. The point is that both are defined in tex-mode.el, hence the confusion. Anyway, my emacs doesn't recognize font-latex-quotes, unfortunately. Maybe I should install a newer version. – oz1cz Dec 8 '17 at 14:12
  • I installed auctex, and now everything works fine. – oz1cz Dec 8 '17 at 14:22

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.