aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-18 02:12:00 +0000
committerRichard M. Stallman1997-07-18 02:12:00 +0000
commit31b2af0a3b7616408a361a93313050d181fc1266 (patch)
tree39a2a49061ba21fc85111a8689ebb9e2fff882b1
parent640012115a9b8519fcfb327ea708f07c5d17b72a (diff)
downloademacs-31b2af0a3b7616408a361a93313050d181fc1266.tar.gz
emacs-31b2af0a3b7616408a361a93313050d181fc1266.zip
(c-initialize-builtin-style): Use copy-sequence
instead of c-copy-tree. (c-copy-tree): Function deleted.
-rw-r--r--lisp/progmodes/cc-styles.el23
1 files changed, 2 insertions, 21 deletions
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index d9943b39236..c9f08cd74ff 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.12 10;; Version: 5.13
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.
@@ -561,8 +561,7 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
561 (lambda (var) 561 (lambda (var)
562 (let ((val (symbol-value var))) 562 (let ((val (symbol-value var)))
563 (cons var (if (atom val) val 563 (cons var (if (atom val) val
564 (c-copy-tree val) 564 (copy-sequence val)))
565 ))
566 ))) 565 )))
567 '(c-backslash-column 566 '(c-backslash-column
568 c-basic-offset 567 c-basic-offset
@@ -579,24 +578,6 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
579 ;; c-mode-common-hook or {c,c++,objc,java}-mode-hook. 578 ;; c-mode-common-hook or {c,c++,objc,java}-mode-hook.
580 (c-set-style c-site-default-style)))) 579 (c-set-style c-site-default-style))))
581 580
582(defun c-copy-tree (tree)
583 "Make a copy of TREE.
584If TREE is a cons cell, this recursively copies both its car and its cdr.
585Contrast to copy-sequence, which copies only along the cdrs. With second
586argument VECP, this copies vectors as well as conses."
587 (if (consp tree)
588 (let ((p tree) result)
589 (while (consp p)
590 (setq result (cons (if (consp (car p))
591 (c-copy-tree (car p))
592 (car p))
593 result))
594 (setq p (cdr p)))
595 (if (null p)
596 (nreverse result)
597 (nconc (nreverse result) p)))
598 tree))
599
600(defun c-make-styles-buffer-local () 581(defun c-make-styles-buffer-local ()
601 "Make all CC Mode style variables buffer local. 582 "Make all CC Mode style variables buffer local.
602If you edit primarily one style of C (or C++, Objective-C, Java) code, 583If you edit primarily one style of C (or C++, Objective-C, Java) code,