aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1997-10-23 07:50:28 +0000
committerKarl Heuer1997-10-23 07:50:28 +0000
commit82aba9f42f0971d854a6a6df43824794cb726ec7 (patch)
tree35c3623b9dea0b4029c121bb29e08a3687d1fb29
parentc2efc1d098e746fecd1deebfe8a18f94b78863ac (diff)
downloademacs-82aba9f42f0971d854a6a6df43824794cb726ec7.tar.gz
emacs-82aba9f42f0971d854a6a6df43824794cb726ec7.zip
(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>
-rw-r--r--lisp/progmodes/cc-styles.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index 4adb0ac3870..bbdcdcb8ce2 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -7,7 +7,7 @@
7;; 1985 Richard M. Stallman 7;; 1985 Richard M. Stallman
8;; Maintainer: cc-mode-help@python.org 8;; Maintainer: cc-mode-help@python.org
9;; Created: 22-Apr-1997 (split from cc-mode.el) 9;; Created: 22-Apr-1997 (split from cc-mode.el)
10;; Version: 5.18 10;; Version: See cc-mode.el
11;; Keywords: c languages oop 11;; Keywords: c languages oop
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
@@ -572,7 +572,8 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
572 (or (assoc "cc-mode" c-style-alist) 572 (or (assoc "cc-mode" c-style-alist)
573 (let (copyfunc) 573 (let (copyfunc)
574 ;; use built-in copy-tree if its there. 574 ;; use built-in copy-tree if its there.
575 (if (fboundp 'copy-tree) 575 (if (and (fboundp 'copy-tree)
576 (functionp (symbol-function 'copy-tree)))
576 (setq copyfunc (symbol-function 'copy-tree)) 577 (setq copyfunc (symbol-function 'copy-tree))
577 (setq copyfunc (lambda (tree) 578 (setq copyfunc (lambda (tree)
578 (if (consp tree) 579 (if (consp tree)