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!

Constantine
  • 9,072
  • 1
  • 34
  • 49
scaramouche
  • 1,772
  • 10
  • 24

1 Answers1

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.

Constantine
  • 9,072
  • 1
  • 34
  • 49