# HG changeset patch # User Karl Heuer # Date 877591927 0 # Node ID d8732d6e6aeba1784a8931d9e61436bb5855ea54 # Parent ecb78a6ccd8d76dff9d46e272c515927b65f93d8 (c-initialize-builtin-style): Use existing copy-tree if it's defined. copy-sequence doesn't work; the c-offsets-alist must be copied recursively. Use copy-tree solution given by Simon Marshall. diff -r ecb78a6ccd8d -r d8732d6e6aeb lisp/progmodes/cc-styles.el --- a/lisp/progmodes/cc-styles.el Thu Oct 23 07:31:46 1997 +0000 +++ b/lisp/progmodes/cc-styles.el Thu Oct 23 07:32:07 1997 +0000 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.17 +;; Version: 5.18 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -571,11 +571,14 @@ ;; style. Only do this once! (or (assoc "cc-mode" c-style-alist) (let (copyfunc) - (setq copyfunc (lambda (tree) - (if (consp tree) - (cons (funcall copyfunc (car tree)) - (funcall copyfunc (cdr tree))) - tree))) + ;; 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