branch: externals/indent-bars
commit e4ab2f88652d4a1c4e26f6664a9ce56c2759b8a2
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>

    Prevent altering the original custom var during inherit
    
    Without copy-sequence, it could be altered.
---
 indent-bars.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/indent-bars.el b/indent-bars.el
index c5628f1b23..e24dc32576 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -766,16 +766,17 @@ returned."
     (if (eq new 'unspecified) old new))
    
    ((and (consp old) (consp new))
-    (let ((n new) (o old) lo)
+    (let* ((old (copy-sequence old))   ; avoid editing old
+          (n new) (o old) last-o)
       (while (and n o)
        (if (and (plistp n) (plistp o) (keywordp (car o)))
            (let ((m (map-merge 'plist o n)))
-             (if lo (setcdr lo m) (setq old m))
+             (if last-o (setcdr last-o m) (setq old m))
              (setq o nil))             ; signify list complete
          (unless (eq (car n) 'unspecified)
            (setcar o (car n))))
-       (setq lo o n (cdr n) o (cdr o))))
-    old)
+       (setq last-o o n (cdr n) o (cdr o)))
+      old))
 
    (t new)))
 

Reply via email to