The PPSS cache can never be inserted into in the middle, so testing whether to insert into the middle is unnecessary. rainbow-delimiters-syntax-ppss-run adds all the intermediate results to the front of the cache, so it always leaves the cache in a state where the elements are always exactly rainbow-delimiters-parse-partial-sexp-cache-max-span apart, so there's no gap bigger than rainbow-delimiters-parse-partial-sexp-cache-max-span to insert into. The before change hook always removes all elements until before the point of the change, leaving no gap either. The only way for a gap bigger than rainbow-delimiters-parse-partial-sexp-cache-max-span to arise is the user changing that variable, but that variable an implementation detail, so worrying about it changing is like worrying about (fset #'rainbow-delimiters-syntax-ppss-run #'ignore). All in all, it serves only to make the code more complicated. So remove it.master
parent
ccd68b7eb8
commit
f2404ef0bf
1 changed files with 13 additions and 20 deletions
Loading…
Reference in new issue