;;;###autoload
-(defun c-mode ()
+(define-derived-mode c-mode prog-mode "C"
"Major mode for editing K&R and ANSI C code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
c-mode buffer. This automatically sets up a mail buffer with version
Key bindings:
\\{c-mode-map}"
- (interactive)
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table c-mode-syntax-table)
- (setq major-mode 'c-mode ; FIXME: Use define-derived-mode.
- mode-name "C"
- local-abbrev-table c-mode-abbrev-table
+ (setq local-abbrev-table c-mode-abbrev-table
abbrev-mode t)
(use-local-map c-mode-map)
(c-init-language-vars-for 'c-mode)
(cons "C++" (c-lang-const c-mode-menu c++)))
;;;###autoload
-(defun c++-mode ()
+(define-derived-mode c++-mode prog-mode "C++"
"Major mode for editing C++ code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
c++-mode buffer. This automatically sets up a mail buffer with
Key bindings:
\\{c++-mode-map}"
- (interactive)
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table c++-mode-syntax-table)
- (setq major-mode 'c++-mode ; FIXME: Use define-derived-mode.
- mode-name "C++"
- local-abbrev-table c++-mode-abbrev-table
+ (setq local-abbrev-table c++-mode-abbrev-table
abbrev-mode t)
(use-local-map c++-mode-map)
(c-init-language-vars-for 'c++-mode)
;;;###autoload (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))
;;;###autoload
-(defun objc-mode ()
+(define-derived-mode objc-mode prog-mode "ObjC"
"Major mode for editing Objective C code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
objc-mode buffer. This automatically sets up a mail buffer with
Key bindings:
\\{objc-mode-map}"
- (interactive)
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table objc-mode-syntax-table)
- (setq major-mode 'objc-mode ; FIXME: Use define-derived-mode.
- mode-name "ObjC"
- local-abbrev-table objc-mode-abbrev-table
+ (setq local-abbrev-table objc-mode-abbrev-table
abbrev-mode t)
(use-local-map objc-mode-map)
(c-init-language-vars-for 'objc-mode)
;;;###autoload (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode))
;;;###autoload
-(defun java-mode ()
+(define-derived-mode java-mode prog-mode "Java"
"Major mode for editing Java code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
java-mode buffer. This automatically sets up a mail buffer with
Key bindings:
\\{java-mode-map}"
- (interactive)
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table java-mode-syntax-table)
- (setq major-mode 'java-mode ; FIXME: Use define-derived-mode.
- mode-name "Java"
- local-abbrev-table java-mode-abbrev-table
+ (setq local-abbrev-table java-mode-abbrev-table
abbrev-mode t)
(use-local-map java-mode-map)
(c-init-language-vars-for 'java-mode)
;;;###autoload (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode))
;;;###autoload
-(defun idl-mode ()
+(define-derived-mode idl-mode prog-mode "IDL"
"Major mode for editing CORBA's IDL, PSDL and CIDL code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
idl-mode buffer. This automatically sets up a mail buffer with
Key bindings:
\\{idl-mode-map}"
- (interactive)
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table idl-mode-syntax-table)
- (setq major-mode 'idl-mode ; FIXME: Use define-derived-mode.
- mode-name "IDL"
- local-abbrev-table idl-mode-abbrev-table)
+ (setq local-abbrev-table idl-mode-abbrev-table)
(use-local-map idl-mode-map)
(c-init-language-vars-for 'idl-mode)
(c-common-init 'idl-mode)
;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
;;;###autoload
-(defun pike-mode ()
+(define-derived-mode pike-mode prog-mode "Pike"
"Major mode for editing Pike code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
pike-mode buffer. This automatically sets up a mail buffer with
Key bindings:
\\{pike-mode-map}"
- (interactive)
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table pike-mode-syntax-table)
- (setq major-mode 'pike-mode ; FIXME: Use define-derived-mode.
- mode-name "Pike"
- local-abbrev-table pike-mode-abbrev-table
+ (setq local-abbrev-table pike-mode-abbrev-table
abbrev-mode t)
(use-local-map pike-mode-map)
(c-init-language-vars-for 'pike-mode)
(defvar awk-mode-syntax-table)
(declare-function c-awk-unstick-NL-prop "cc-awk" ())
-(defun awk-mode ()
+;;;###autoload
+(define-derived-mode awk-mode prog-mode "AWK"
"Major mode for editing AWK code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
awk-mode buffer. This automatically sets up a mail buffer with version
Key bindings:
\\{awk-mode-map}"
- (interactive)
(require 'cc-awk) ; Added 2003/6/10.
- (kill-all-local-variables)
(c-initialize-cc-mode t)
(set-syntax-table awk-mode-syntax-table)
- (setq major-mode 'awk-mode ; FIXME: Use define-derived-mode.
- mode-name "AWK"
- local-abbrev-table awk-mode-abbrev-table
+ (setq local-abbrev-table awk-mode-abbrev-table
abbrev-mode t)
(use-local-map awk-mode-map)
(c-init-language-vars-for 'awk-mode)