[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] a conflict with auto-capitalize-mode
From: |
Uwe Brauer |
Subject: |
[AUCTeX-devel] a conflict with auto-capitalize-mode |
Date: |
Fri, 27 Nov 2015 22:28:59 +0000 |
User-agent: |
Gnus/5.13001 (Ma Gnus v0.10) Emacs/25.0.50 (gnu/linux) |
Hello
One of the packages I use in mail, LaTeX files etc is
auto-capitalize-mode written by Kevin Rodgers. Last version is from 2005
and Kevin does not maintain it any longer. The package as its name
indicates, auto-capitalize every word which starts a new sentence. It
also capitalize for example i --> I which is very convenient.
So far it worked well with auctex. However in order that it would not
work in math mode say change
$A_{ij}$ to $A_{Ij}$
Kevin suggested me the following code a long time ago
(add-hook 'LaTeX-mode-hook 'my-set-auto-capitalize)
(defun my-set-auto-capitalize ()
(interactive)
(set (make-local-variable 'auto-capitalize-predicate)
(lambda () (not (texmathp)))))
And when I switched from Xemacs to GNU emacs I first forget all about
it, but today I put it in and run in a problem.
Kevin's solutions works and avoids the unwanted capitalization, however
now at a price:
When I
consider
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray}
\label{eq:test:1}
\int
\end{eqnarray}
\end{document}
Put cursor on eqnarray and run C-u C-c C-e to change it to equation it
gives
\documentclass[12pt]{article}
\begin{equation}
\begin{eqnarray}
\label{eq:test:1}
\int
\end{equation}
\end{document}
Which is unacceptable. Any idea why now that command does not work?
BTW if somebody knows a better solution of auto-capitalization I would
be glad to hear about.
Thanks
Uwe Brauer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-devel] a conflict with auto-capitalize-mode,
Uwe Brauer <=