From ccd68b7eb82a1f6db424cb449a99c33daf09d555 Mon Sep 17 00:00:00 2001 From: Fanael Linithien Date: Fri, 17 Oct 2014 16:36:03 +0200 Subject: [PATCH] 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. --- rainbow-delimiters.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el index 0614292..19940e8 100644 --- a/rainbow-delimiters.el +++ b/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))))