emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rainbow-delimiters ccd68b7eb8 107/188: Replace a generaliz


From: ELPA Syncer
Subject: [nongnu] elpa/rainbow-delimiters ccd68b7eb8 107/188: Replace a generalized push with setcdr+cons+cdr.
Date: Sat, 1 Jan 2022 00:58:57 -0500 (EST)

branch: elpa/rainbow-delimiters
commit ccd68b7eb82a1f6db424cb449a99c33daf09d555
Author: Fanael Linithien <fanael4@gmail.com>
Commit: Fanael Linithien <fanael4@gmail.com>

    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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]