(cc-require 'cc-cmds)
(cc-require 'cc-align)
(cc-require 'cc-menus)
+(cc-require 'cc-guess)
;; Silence the compiler.
(cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs
; '
(require 'cc-fonts) ;)
-;; cc-langs isn't loaded when we're byte compiled, so add autoload
-;; directives for the interface functions.
-(autoload 'c-make-init-lang-vars-fun "cc-langs")
-(autoload 'c-init-language-vars "cc-langs" nil nil 'macro)
-
\f
;; Other modes and packages which depend on CC Mode should do the
;; following to make sure everything is loaded and available for their
(c-clear-found-types)
;; now set the mode style based on default-style
- (let ((style (if (stringp default-style)
- default-style
- (or (cdr (assq mode default-style))
- (cdr (assq 'other default-style))
- "gnu"))))
+ (let ((style (cc-choose-style-for-mode mode default-style)))
;; Override style variables if `c-old-style-variable-behavior' is
;; set. Also override if we are using global style variables,
;; have already initialized a style once, and are switching to a
(c-count-cfss file-local-variables-alist))
(cfs-in-dir-count (c-count-cfss dir-local-variables-alist)))
(c-set-style stile
- (= cfs-in-file-and-dir-count cfs-in-dir-count)))
+ (and (= cfs-in-file-and-dir-count cfs-in-dir-count)
+ 'keep-defaults)))
(c-set-style stile)))
(when offsets
(mapc
abbrev-mode t)
(use-local-map c-mode-map)
(c-init-language-vars-for 'c-mode)
+ (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ;
(c-common-init 'c-mode)
(easy-menu-add c-c-menu)
(cc-imenu-init cc-imenu-c-generic-expression)
abbrev-mode t)
(use-local-map c++-mode-map)
(c-init-language-vars-for 'c++-mode)
+ (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ;
(c-common-init 'c++-mode)
(easy-menu-add c-c++-menu)
(cc-imenu-init cc-imenu-c++-generic-expression)
abbrev-mode t)
(use-local-map objc-mode-map)
(c-init-language-vars-for 'objc-mode)
+ (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ;
(c-common-init 'objc-mode)
(easy-menu-add c-objc-menu)
(cc-imenu-init nil 'cc-imenu-objc-function)
Key bindings:
\\{awk-mode-map}"
+ ;; We need the next line to stop the macro defining
+ ;; `awk-mode-syntax-table'. This would mask the real table which is
+ ;; declared in cc-awk.el and hasn't yet been loaded.
+ :syntax-table nil
(require 'cc-awk) ; Added 2003/6/10.
(c-initialize-cc-mode t)
(set-syntax-table awk-mode-syntax-table)