changeset 20147:481af10544cc

(c-initialize-builtin-style): Only use copy-tree if it is funcall-able. This is the right patch, and was given by Erik Naggum <erik@naggum.no>
author Karl Heuer <kwzh@gnu.org>
date Thu, 23 Oct 1997 07:50:28 +0000
parents d7ea5d1fa91b
children 988eef7dba1b
files lisp/progmodes/cc-styles.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-styles.el	Thu Oct 23 07:49:25 1997 +0000
+++ b/lisp/progmodes/cc-styles.el	Thu Oct 23 07:50:28 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.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -572,7 +572,8 @@
   (or (assoc "cc-mode" c-style-alist)
       (let (copyfunc)
 	;; use built-in copy-tree if its there.
-	(if (fboundp 'copy-tree)
+	(if (and (fboundp 'copy-tree)
+		 (functionp (symbol-function 'copy-tree)))
 	    (setq copyfunc (symbol-function 'copy-tree))
 	  (setq copyfunc (lambda (tree)
 			    (if (consp tree)