branch: elpa/rainbow-delimiters
commit ccd68b7eb82a1f6db424cb449a99c33daf09d555
Author: Fanael Linithien <[email protected]>
Commit: Fanael Linithien <[email protected]>
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 0614292273..19940e8df2 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))))