bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5734: 23.1.94; (forward-sexp N) at the very end of large latex-mode


From: Chong Yidong
Subject: bug#5734: 23.1.94; (forward-sexp N) at the very end of large latex-mode buffer takes time proportional to N
Date: Thu, 25 Mar 2010 15:17:12 -0400

> start with `emacs -Q'
> M-x eval-expression RET (insert (make-string 100000 ?a)) RET
> M-x eval-expression RET (latex-mode)                     RET
> M-x eval-expression RET (forward-sexp 200)               RET
> M-x eval-expression RET (forward-sexp 500)               RET
> M-x eval-expression RET (forward-sexp (point-max))       RET

> In some versions of emacs this does not happen, notably my earlier
> Carbon Emacs "GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version
> 1.6.0) of 2009-07-26 on gs674-seijiz.local" after loading some lisp
> libraries (don't know which), like the ones I have bellow (autopair,
> yasnippet).

I can reproduce this slowness even on Emacs 22.3.  It arises because
tex-mode wants to be able to signal an error if point is in a containing
expression that ends prematurely, so it does a bit of backtracking.
(This is the `skip-syntax-backward' call in latex-forward-sexp-1).

I'm not sure what the best way to fix this is, though.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]