Mercurial > hg > xemacs-beta
diff lisp/cc-mode/cc-styles.el @ 171:929b76928fce r20-3b12
Import from CVS: tag r20-3b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:47:52 +0200 |
parents | 85ec50267440 |
children | 2d532a89d707 |
line wrap: on
line diff
--- a/lisp/cc-mode/cc-styles.el Mon Aug 13 09:47:00 2007 +0200 +++ b/lisp/cc-mode/cc-styles.el Mon Aug 13 09:47:52 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.11 +;; Version: 5.12 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -27,11 +27,6 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -(eval-when-compile - (load-file "./cc-align.el")) - -(require 'cc-vars) -(require 'cc-align) (defconst c-style-alist @@ -553,35 +548,37 @@ -;; Dynamically append the default value of most variables. This is -;; crucial because future c-set-style calls will always reset the -;; variables first to the `cc-mode' style before instituting the new -;; style. Only do this once! -(or (assoc "cc-mode" c-style-alist) - (progn - (c-add-style "cc-mode" - (mapcar - (function - (lambda (var) - (let ((val (symbol-value var))) - (cons var (if (atom val) val - (copy-tree val) - )) - ))) - '(c-backslash-column - c-basic-offset - c-cleanup-list - c-comment-only-line-offset - c-electric-pound-behavior - c-hanging-braces-alist - c-hanging-colons-alist - c-hanging-comment-starter-p - c-hanging-comment-ender-p - c-offsets-alist - ))) - ;; the default style is now GNU. This can be overridden in - ;; c-mode-common-hook or {c,c++,objc,java}-mode-hook. - (c-set-style c-site-default-style))) +(defun c-initialize-builtin-style () + ;; Dynamically append the default value of most variables. This is + ;; crucial because future c-set-style calls will always reset the + ;; variables first to the `cc-mode' style before instituting the new + ;; style. Only do this once! + (require 'cl) + (or (assoc "cc-mode" c-style-alist) + (progn + (c-add-style "cc-mode" + (mapcar + (function + (lambda (var) + (let ((val (symbol-value var))) + (cons var (if (atom val) val + (copy-tree val) + )) + ))) + '(c-backslash-column + c-basic-offset + c-cleanup-list + c-comment-only-line-offset + c-electric-pound-behavior + c-hanging-braces-alist + c-hanging-colons-alist + c-hanging-comment-starter-p + c-hanging-comment-ender-p + c-offsets-alist + ))) + ;; the default style is now GNU. This can be overridden in + ;; c-mode-common-hook or {c,c++,objc,java}-mode-hook. + (c-set-style c-site-default-style)))) (defun c-make-styles-buffer-local () "Make all CC Mode style variables buffer local. @@ -615,10 +612,6 @@ (make-variable-buffer-local 'c-special-indent-hook) (make-variable-buffer-local 'c-indentation-style)) -(if c-style-variables-are-local-p - (c-make-styles-buffer-local)) - - (provide 'cc-styles) ;;; cc-styles.el ends here