Commit 82aba9f4 authored by Karl Heuer's avatar Karl Heuer
Browse files

(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>
parent c2efc1d0
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;; 1985 Richard M. Stallman ;; 1985 Richard M. Stallman
;; Maintainer: cc-mode-help@python.org ;; Maintainer: cc-mode-help@python.org
;; Created: 22-Apr-1997 (split from cc-mode.el) ;; Created: 22-Apr-1997 (split from cc-mode.el)
;; Version: 5.18 ;; Version: See cc-mode.el
;; Keywords: c languages oop ;; Keywords: c languages oop
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -572,7 +572,8 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to ...@@ -572,7 +572,8 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
(or (assoc "cc-mode" c-style-alist) (or (assoc "cc-mode" c-style-alist)
(let (copyfunc) (let (copyfunc)
;; use built-in copy-tree if its there. ;; 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 (symbol-function 'copy-tree))
(setq copyfunc (lambda (tree) (setq copyfunc (lambda (tree)
(if (consp tree) (if (consp tree)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment