diff options
| -rw-r--r-- | lisp/emacs-lisp/syntax.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index a1b70b18693..6106720f7a5 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el | |||
| @@ -291,6 +291,14 @@ END) suitable for `syntax-propertize-function'." | |||
| 291 | ;; (message "Needs to syntax-propertize from %s to %s" | 291 | ;; (message "Needs to syntax-propertize from %s to %s" |
| 292 | ;; syntax-propertize--done pos) | 292 | ;; syntax-propertize--done pos) |
| 293 | (set (make-local-variable 'parse-sexp-lookup-properties) t) | 293 | (set (make-local-variable 'parse-sexp-lookup-properties) t) |
| 294 | (when (< syntax-propertize--done (point-min)) | ||
| 295 | ;; *Usually* syntax-propertize is called via syntax-ppss which | ||
| 296 | ;; takes care of adding syntax-ppss-flush-cache to b-c-f, but this | ||
| 297 | ;; is not *always* the case, so since we share a single "flush" function | ||
| 298 | ;; between syntax-ppss and syntax-propertize, we also have to make | ||
| 299 | ;; sure the flush function is installed here (bug#29767). | ||
| 300 | (add-hook 'before-change-functions | ||
| 301 | #'syntax-ppss-flush-cache t t)) | ||
| 294 | (save-excursion | 302 | (save-excursion |
| 295 | (with-silent-modifications | 303 | (with-silent-modifications |
| 296 | (make-local-variable 'syntax-propertize--done) ;Just in case! | 304 | (make-local-variable 'syntax-propertize--done) ;Just in case! |