]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/syntax.el
Add new function dom-remove-node
[gnu-emacs] / lisp / emacs-lisp / syntax.el
index ae682ecf73a95335e859798990613fe0c49c88ab..ac509b3465d40db0c37565891dc6c1536a047342 100644 (file)
@@ -274,7 +274,7 @@ Note: back-references in REGEXPs do not work."
 (defun syntax-propertize-via-font-lock (keywords)
   "Propertize for syntax using font-lock syntax.
 KEYWORDS obeys the format used in `font-lock-syntactic-keywords'.
-The return value is a function (with two paremeters, START and
+The return value is a function (with two parameters, START and
 END) suitable for `syntax-propertize-function'."
   (lambda (start end)
     (with-no-warnings
@@ -316,6 +316,9 @@ END) suitable for `syntax-propertize-function'."
                   (unless (eq funs
                               (cdr syntax-propertize-extend-region-functions))
                     (setq funs syntax-propertize-extend-region-functions)))))
+            ;; Flush ppss cache between the original value of `start' and that
+            ;; set above by syntax-propertize-extend-region-functions.
+            (syntax-ppss-flush-cache start)
             ;; Move the limit before calling the function, so the function
             ;; can use syntax-ppss.
             (setq syntax-propertize--done end)