aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-styles.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index cbe89033b1c..4adb0ac3870 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.17 10;; Version: 5.18
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.
@@ -571,11 +571,14 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
571 ;; style. Only do this once! 571 ;; style. Only do this once!
572 (or (assoc "cc-mode" c-style-alist) 572 (or (assoc "cc-mode" c-style-alist)
573 (let (copyfunc) 573 (let (copyfunc)
574 (setq copyfunc (lambda (tree) 574 ;; use built-in copy-tree if its there.
575 (if (consp tree) 575 (if (fboundp 'copy-tree)
576 (cons (funcall copyfunc (car tree)) 576 (setq copyfunc (symbol-function 'copy-tree))
577 (funcall copyfunc (cdr tree))) 577 (setq copyfunc (lambda (tree)
578 tree))) 578 (if (consp tree)
579 (cons (funcall copyfunc (car tree))
580 (funcall copyfunc (cdr tree)))
581 tree))))
579 (c-add-style "cc-mode" 582 (c-add-style "cc-mode"
580 (mapcar 583 (mapcar
581 (function 584 (function