From 82aba9f42f0971d854a6a6df43824794cb726ec7 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Thu, 23 Oct 1997 07:50:28 +0000 Subject: [PATCH] (c-initialize-builtin-style): Only use copy-tree if it is funcall-able. This is the right patch, and was given by Erik Naggum --- lisp/progmodes/cc-styles.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 4adb0ac387..bbdcdcb8ce 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -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 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to (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) -- 2.20.1