# HG changeset patch # User Richard M. Stallman # Date 874643428 0 # Node ID 5a9f21b9c5b62f428a3692236254e72dbf461294 # Parent 3e0041620fc20ff0eab4999df89e3bc3f270e191 (c-initialize-builtin-style): Copy the whole tree instead of just copy-sequence. diff -r 3e0041620fc2 -r 5a9f21b9c5b6 lisp/progmodes/cc-styles.el --- a/lisp/progmodes/cc-styles.el Fri Sep 19 04:27:56 1997 +0000 +++ b/lisp/progmodes/cc-styles.el Fri Sep 19 04:30:28 1997 +0000 @@ -570,14 +570,24 @@ ;; variables first to the `cc-mode' style before instituting the new ;; style. Only do this once! (or (assoc "cc-mode" c-style-alist) - (progn + (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))) + tree)))) (c-add-style "cc-mode" (mapcar (function (lambda (var) (let ((val (symbol-value var))) - (cons var (if (atom val) val - (copy-sequence val))) + (cons var (if (atom val) + val + (funcall copyfunc val) + )) ))) '(c-backslash-column c-basic-offset