> >> (defun LaTeX-math-query-replace (from-string to-string)
> >> "math query replace"
> >> (interactive "sFrom: \nsTo: ")
> >> (while
> >> (search-forward from-string)
> >> (if (texmathp)
> >> (query-replace from-string to-string nil
> >> (point) (1+ (match-end 0))))))
> >
> > After a few first trials it looks fine and seems to work as expected.
>
> Aaargh, I found a problem with it now. When typing "M-x
> LaTeX-math-query-replace RET N RET M" at the beginning of the following
> document
>
> \documentclass{article}
> \begin{document}
> \begin{equation}
> N
> \end{equation}
> \end{document}
>
> it matches the "N". However, after typing SPC to have it replaced, the
> function gets trapped in an infinite loop, continuously signalling
> "Replaced 0 occurences". Are there any ideas how to fix this?
Unfortunately I can not reproduce this behaviour. It works as expected
with your sample file.
Try pressing "." instead of " ".
Best regards,
--
Plamen Tanovski
Prager Str. 125
04317 Leipzig
Tel. (03 41) 3 08 57 60
_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex