home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
gnu
/
emacs-18.59-bin.lha
/
lib
/
emacs
/
18.59
/
lisp
/
c-mode.elc
< prev
next >
Wrap
Text File
|
1992-10-23
|
12KB
|
175 lines
(defvar c-mode-abbrev-table nil "\
Abbrev table in use in C-mode buffers.")
(define-abbrev-table (quote c-mode-abbrev-table) nil)
(defvar c-mode-map nil "\
Keymap used in C mode.")
(if c-mode-map nil (setq c-mode-map (make-sparse-keymap)) (define-key c-mode-map "{" (quote electric-c-brace)) (define-key c-mode-map "}" (quote electric-c-brace)) (define-key c-mode-map ";" (quote electric-c-semi)) (define-key c-mode-map ":" (quote electric-c-terminator)) (define-key c-mode-map "" (quote mark-c-function)) (define-key c-mode-map "" (quote indent-c-exp)) (define-key c-mode-map "" (quote backward-delete-char-untabify)) (define-key c-mode-map " " (quote c-indent-command)))
(autoload (quote c-macro-expand) "cmacexp" "\
Display the result of expanding all C macros occurring in the region.
The expansion is entirely correct because it uses the C preprocessor." t)
(defvar c-mode-syntax-table nil "\
Syntax table in use in C-mode buffers.")
(if c-mode-syntax-table nil (setq c-mode-syntax-table (make-syntax-table)) (modify-syntax-entry 92 "\\" c-mode-syntax-table) (modify-syntax-entry 47 ". 14" c-mode-syntax-table) (modify-syntax-entry 42 ". 23" c-mode-syntax-table) (modify-syntax-entry 43 "." c-mode-syntax-table) (modify-syntax-entry 45 "." c-mode-syntax-table) (modify-syntax-entry 61 "." c-mode-syntax-table) (modify-syntax-entry 37 "." c-mode-syntax-table) (modify-syntax-entry 60 "." c-mode-syntax-table) (modify-syntax-entry 62 "." c-mode-syntax-table) (modify-syntax-entry 38 "." c-mode-syntax-table) (modify-syntax-entry 124 "." c-mode-syntax-table) (modify-syntax-entry 39 "\"" c-mode-syntax-table))
(defconst c-indent-level 2 "\
*Indentation of C statements with respect to containing block.")
(defconst c-brace-imaginary-offset 0 "\
*Imagined indentation of a C open brace that actually follows a statement.")
(defconst c-brace-offset 0 "\
*Extra indentation for braces, compared with other text in same context.")
(defconst c-argdecl-indent 5 "\
*Indentation level of declarations of C function arguments.")
(defconst c-label-offset -2 "\
*Offset of C label lines and case statements relative to usual indentation.")
(defconst c-continued-statement-offset 2 "\
*Extra indent for lines not starting new statements.")
(defconst c-continued-brace-offset 0 "\
*Extra indent for substatements that start with open-braces.
This is in addition to c-continued-statement-offset.")
(defconst c-auto-newline nil "\
*Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.")
(defconst c-tab-always-indent t "\
*Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.")
(defun c-mode nil "\
Major mode for editing C code.
Expression and list commands understand all C brackets.
Tab indents for C code.
Comments are delimited with /* ... */.
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
\\{c-mode-map}
Variables controlling indentation style:
c-tab-always-indent
Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.
c-auto-newline
Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.
c-indent-level
Indentation of C statements within surrounding block.
The surrounding block's indentation is the indentation
of the line on which the open-brace appears.
c-continued-statement-offset
Extra indentation given to a substatement, such as the
then-clause of an if or body of a while.
c-continued-brace-offset
Extra indentation given to a brace that starts a substatement.
This is in addition to c-continued-statement-offset.
c-brace-offset
Extra indentation for line if it starts with an open brace.
c-brace-imaginary-offset
An open brace following other text is treated as if it were
this far to the right of the start of its line.
c-argdecl-indent
Indentation level of declarations of C function arguments.
c-label-offset
Extra indentation for line that is a label, or case or default.
Settings for K&R and BSD indentation styles are
c-indent-level 5 8
c-continued-statement-offset 5 8
c-brace-offset -5 -8
c-argdecl-indent 0 8
c-label-offset -5 -8
Turning on C mode calls the value of the variable c-mode-hook with no args,
if that value is non-nil." (interactive) (byte-code "ÓÔ Õ!Ö×Ø!ÙÆ!ÚPÙÈ!ÙÉ!Ê ÙË!ÛÙÌ!ÊÙÍ!ÜÙÎ!ÝÙÏ!ÞÙÐ!ßÙÑ!àÙÒ!Êáâ!" [c-mode-map major-mode mode-name local-abbrev-table c-mode-abbrev-table c-mode-syntax-table paragraph-start page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function require-final-newline comment-start comment-end comment-column comment-start-skip comment-indent-hook parse-sexp-ignore-comments nil kill-all-local-variables use-local-map c-mode "C" set-syntax-table make-local-variable "^$\\|" c-indent-line "/* " " */" 32 "/\\*+ *" c-comment-indent run-hooks c-mode-hook] 16))
(defun c-comment-indent nil (byte-code "ÁÂ!