Mercurial > emacs
diff lisp/textmodes/sgml-mode.el @ 96509:0b35188a36dd
(sgml-font-lock-syntactic-keywords):
Use syntax-ppss on a position *before* the char we want to change.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 05 Jul 2008 04:26:11 +0000 |
parents | f4a69fedbd46 |
children | fc3f7f475220 |
line wrap: on
line diff
--- a/lisp/textmodes/sgml-mode.el Fri Jul 04 20:29:10 2008 +0000 +++ b/lisp/textmodes/sgml-mode.el Sat Jul 05 04:26:11 2008 +0000 @@ -292,7 +292,11 @@ '(("\\(<\\)!--" (1 "< b")) ("--[ \t\n]*\\(>\\)" (1 "> b")) ;; Double quotes outside of tags should not introduce strings. - ("\\\"" (0 (if (zerop (car (syntax-ppss))) ".")))) + ;; Be careful to call `syntax-ppss' on a position before the one we're + ;; going to change, so as not to need to flush the data we just computed. + ("\"" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) + (goto-char (match-end 0))) + ".")))) "Syntactic keywords for `sgml-mode'.") ;; internal