Commit 0ffee616 authored by João Távora's avatar João Távora Committed by Chong Yidong
Browse files

Workaround for latex-forward-sexp slowness.

* textmodes/tex-mode.el (latex-forward-sexp): Terminate the loop if
sexp scanning does not move point.

Fixes: debbugs:5734
parent f35ef0ed
2012-08-03 João Távora <joaotavora@gmail.com>
* textmodes/tex-mode.el (latex-forward-sexp): Terminate the loop
if sexp scanning does not move point (Bug#5734).
2012-08-02 Tassilo Horn <tsdh@gnu.org>
 
* textmodes/reftex-vars.el (reftex-default-label-alist-entries):
......
......@@ -1722,9 +1722,12 @@ Mark is left at original location."
"Like `forward-sexp' but aware of multi-char elements and escaped parens."
(interactive "P")
(unless arg (setq arg 1))
(let ((pos (point)))
(let ((pos (point))
(opoint 0))
(condition-case err
(while (/= arg 0)
(while (and (/= (point) opoint)
(/= arg 0))
(setq opoint (point))
(setq arg
(if (> arg 0)
(progn (latex-forward-sexp-1) (1- arg))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment