Replace a generalized push with setcdr+cons+cdr.

Generalized variables are supported in push only since Emacs 24.3,
using primitive operations instead allows the code to work in older
versions, too.

The regression was introduced in 3dfd3fa9b1, fixes #46.
master
Fanael Linithien 12 years ago
parent d35b992378
commit ccd68b7eb8
  1. 2
      rainbow-delimiters.el

@ -297,7 +297,7 @@ Intermediate `parse-partial-sexp' results are added to the cache."
(let ((state (parse-partial-sexp from newpos nil nil oldstate)))
(if (/= newpos to)
(if cache-nearest-after
(push (cons newpos state) (cdr cache-nearest-after))
(setcdr cache-nearest-after (cons (cons newpos state) (cdr cache-nearest-after)))
(push (cons newpos state) rainbow-delimiters-parse-partial-sexp-cache)))
(setq oldstate state
from newpos))))

Loading…
Cancel
Save