• Dmitry Gutov's avatar
    Use a separate syntax-ppss cache for narrowed buffers · 827db6b5
    Dmitry Gutov authored
    * lisp/emacs-lisp/syntax.el (syntax-ppss-wide):
    New variable, to contain the data from `syntax-ppss-last' and
    `syntax-ppss-cache'.
    (syntax-ppss-cache, syntax-ppss-last): Remove.
    (syntax-ppss-narrow, syntax-ppss-narrow-start): New variables.
    (syntax-ppss-flush-cache): Flush both caches.
    (syntax-ppss--data): Return the appropriate last result and
    buffer cache for the current restriction.
    (syntax-ppss, syntax-ppss-debug): Use it (bug#22983).
    827db6b5
syntax.el 27.8 KB