comparison lisp/cc-mode/cc-styles.el @ 189:489f57a838ef r20-3b21

Import from CVS: tag r20-3b21
author cvs
date Mon, 13 Aug 2007 09:57:07 +0200
parents b405438285a2
children 850242ba4a81
comparison
equal deleted inserted replaced
188:e29a8e7498d9 189:489f57a838ef
5 ;; Authors: 1992-1997 Barry A. Warsaw 5 ;; Authors: 1992-1997 Barry A. Warsaw
6 ;; 1987 Dave Detlefs and Stewart Clamen 6 ;; 1987 Dave Detlefs and Stewart Clamen
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.
14 14
15 ;; GNU Emacs is free software; you can redistribute it and/or modify 15 ;; GNU Emacs is free software; you can redistribute it and/or modify
568 ;; Dynamically append the default value of most variables. This is 568 ;; Dynamically append the default value of most variables. This is
569 ;; crucial because future c-set-style calls will always reset the 569 ;; crucial because future c-set-style calls will always reset the
570 ;; variables first to the `cc-mode' style before instituting the new 570 ;; variables first to the `cc-mode' style before instituting the new
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 (progn 573 (let (copyfunc)
574 ;; use built-in copy-tree if its there.
575 (if (fboundp 'copy-tree)
576 (setq copyfunc (symbol-function 'copy-tree))
577 (setq copyfunc (lambda (tree)
578 (if (consp tree)
579 (cons (funcall copyfunc (car tree))
580 (funcall copyfunc (cdr tree)))
581 tree))))
574 (c-add-style "cc-mode" 582 (c-add-style "cc-mode"
575 (mapcar 583 (mapcar
576 (function 584 (function
577 (lambda (var) 585 (lambda (var)
578 (let ((val (symbol-value var))) 586 (let ((val (symbol-value var)))
579 (cons var (if (atom val) val 587 (cons var (if (atom val)
580 (copy-sequence val) 588 val
589 (funcall copyfunc val)
581 )) 590 ))
582 ))) 591 )))
583 '(c-backslash-column 592 '(c-backslash-column
584 c-basic-offset 593 c-basic-offset
585 c-cleanup-list 594 c-cleanup-list