comparison lisp/textmodes/flyspell.el @ 105163:716269aba178

(sgml-mode-flyspell-verify): Pass limit args to looking-back to avoid ridiculous slow down in large files (bug#4511).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 23 Sep 2009 23:05:37 +0000
parents afa0e028ba97
children bd2966850aac
comparison
equal deleted inserted replaced
105162:f39abe4431e9 105163:716269aba178
361 361
362 (defun sgml-mode-flyspell-verify () 362 (defun sgml-mode-flyspell-verify ()
363 "Function used for `flyspell-generic-check-word-predicate' in SGML mode." 363 "Function used for `flyspell-generic-check-word-predicate' in SGML mode."
364 (not (save-excursion 364 (not (save-excursion
365 (or (looking-at "[^<\n]*>") 365 (or (looking-at "[^<\n]*>")
366 (ispell-looking-back "<[^>\n]*") 366 (ispell-looking-back "<[^>\n]*" (line-beginning-position))
367 (and (looking-at "[^&\n]*;") 367 (and (looking-at "[^&\n]*;")
368 (ispell-looking-back "&[^;\n]*")))))) 368 (ispell-looking-back "&[^;\n]*"
369 (line-beginning-position)))))))
369 370
370 ;;*---------------------------------------------------------------------*/ 371 ;;*---------------------------------------------------------------------*/
371 ;;* Programming mode */ 372 ;;* Programming mode */
372 ;;*---------------------------------------------------------------------*/ 373 ;;*---------------------------------------------------------------------*/
373 (defvar flyspell-prog-text-faces 374 (defvar flyspell-prog-text-faces