Commit f4a4c856 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files


Copy the whole tree instead of just copy-sequence.
parent 03d9b139
......@@ -570,14 +570,24 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
;; variables first to the `cc-mode' style before instituting the new
;; style. Only do this once!
(or (assoc "cc-mode" c-style-alist)
(let (copyfunc)
;; use built-in copy-tree if its there.
(if (fboundp 'copy-tree)
(setq copyfunc (symbol-function 'copy-tree))
(setq copyfunc (lambda (tree)
(if (consp tree)
(cons (funcall copyfunc (car tree))
(funcall copyfunc (cdr tree)))
(c-add-style "cc-mode"
(lambda (var)
(let ((val (symbol-value var)))
(cons var (if (atom val) val
(copy-sequence val)))
(cons var (if (atom val)
(funcall copyfunc val)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment