3

I would like the auto-capitalize minor mode not to capitalize mathematical text in AUCTeX and org-mode.

To avoid this, when running in either of these modes, auto-capitalize should only capitalize when the function texmathp returns nil.

The auto-capitalize code is quite messy, so I don't know what is the best place to make this modification so that everything keeps running efficiently.

Many thanks!

3

Auto-capitalize defines the variable auto-capitalize-predicate, which can be used to check whether to enable auto-capitalization based on context.

Try this

(setq auto-capitalize-predicate (lambda () (not (texmathp))))

to turn it off in LaTeX formulas.

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.