123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- (defvar c-mode-syntax-table nil "Syntax table in use in C-mode buffers.")
- (defvar c-mode-abbrev-table nil "Abbrev table in use in C-mode buffers.")
- (defvar c-mode-map nil "Keymap used in C mode.")
- (defconst c-indent-level 2 "*Indentation of C statements with respect to containing block.")
- (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-indent 2 "*Extra indent for lines not starting new statements.")
- (defconst c-auto-newline nil "*Non-nil means automatically newline before and after braces,
- and after colons and semicolons, inserted in C code.")
- (defun c-mode nil "\
- Major mode for editing C code.
- Expression and list commands understand all C brackets.
- Tab indents for C code.
- Meta-Control-Q indents all lines within following bracket-grouping.
- Comments are delimited with /* ... */.
- Paragraphs are separated by blank lines only.
- Meta-Control-H puts mark at end of C function and dot before it.
- Delete converts tabs to spaces as it moves back.
- Variables controlling indentation style:
- 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-brace-offset
- Extra indentation for line if it starts with a brace.
- 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.
- 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 "ÃˆÔ ˆ?ƒA Õ ‰ˆÖ×Ø#ˆÖÙØ#ˆÖÚÛ#ˆÖÜÝ#ˆÖÞß#ˆÖàá#ˆÖâã#ˆÖäå#‚B Èæ!ˆç‰ˆè‰ˆéÅ\"ˆ
‰ˆ?ƒ¿ êë ‰ˆì!ˆíîï\"ˆíðñ\"ˆíòó\"ˆíôõ\"ˆíö÷\"ˆíøù\"ˆíúû\"ˆíüý\"ˆíþý\"ˆíÿý\"ˆí�@ ý\"ˆí�A ý\"ˆí�B ý\"ˆí�C �D \")‚à ì!ˆ�E È!ˆ�F P‰ˆ�E Ê!ˆ‰
- ˆ�E Ë!ˆå‰ˆ�E Ì!ˆ�G ‰ˆ�E Í!ˆ�H ‰
ˆ�E Î!ˆ�I ‰ˆ�E Ï!ˆ�J ‰ˆ�E Ð!ˆ�K ‰ˆ�E Ñ!ˆ‰ˆ�L Ó!…K…K�M !‡" [c-mode-map major-mode mode-name nil local-abbrev-table c-mode-abbrev-table c-mode-syntax-table i paragraph-start page-delimiter paragraph-separate indent-line-function comment-start comment-end comment-column comment-start-skip comment-indent-hook parse-sexp-ignore-comments t c-mode-hook kill-all-local-variables make-sparse-keymap define-key "{" electric-c-brace "}" ";" electric-c-semi ":" electric-c-terminator "" mark-c-function "" indent-c-exp "" backward-delete-char-untabify " " c-indent-line use-local-map c-mode "C" define-abbrev-table 0 make-syntax-table set-syntax-table modify-syntax-entry 123 "(}" 125 "){" 91 "(]" 93 ")[" 92 "\\" 47 " 14" 42 " 23" 43 " " 45 61 37 60 62 39 "\"" make-local-variable "^$\\|" "/* " " */" 32 "/\\*+ *" c-comment-indent boundp funcall] 63))
- (defun c-comment-indent nil (byte-code "Šn… l?ƒ Á‚ ÂÃ!ˆnƒ ÄÁ!‚ iT])‡" [comment-column 0 skip-chars-backward " " calculate-c-indent] 10))
- (defun electric-c-brace (arg) "\
- Insert character and correct line's indentation." (interactive "P") (byte-code "ÄˆÄ ?…# l…# ŠÅÆ!ˆn)†#
- ƒ Ç ‚! Ĉ
- ƒU cˆÈ!ˆ
- ƒ? `S‰ˆÇ ˆÈ!‚@ ĈŠƒL Tb‚M ĈÉÊ!)‚V Ĉƒh ŠbˆËÌ !!)‚m ËÌ !!)‡" [insertpos arg c-auto-newline last-command-char nil skip-chars-backward " " newline c-indent-line delete-char -1 self-insert-command prefix-numeric-value] 28))
- (defun electric-c-semi (arg) "\
- Insert character and correct line's indentation." (interactive "P") (byte-code "ˆƒ à !‚ ÄÅ !!‡" [c-auto-newline arg nil electric-c-terminator self-insert-command prefix-numeric-value] 7))
- (defun electric-c-terminator (arg) "\
- Insert character and correct line's indentation." (interactive "P") (byte-code "ňÅ`
- ?…4 l…4 ŠÇ ˆÈÉ!ˆgÊU†2 Ë` \"Ì8†1 Í8†1 Î8))?ƒi cˆÏ
!ˆ…T Ð ?…T `S‰ˆÑ ˆÏ
!ˆŠƒ` Tb‚a ňÒÓ!)‚j ňƒ| ŠbˆÔÕ
- !!)‚� ÔÕ
- !!*‡" [insertpos end arg pps last-command-char nil c-auto-newline beginning-of-line skip-chars-forward " " 35 parse-partial-sexp 3 4 5 c-indent-line c-inside-parens-p newline delete-char -1 self-insert-command prefix-numeric-value] 32))
- (defun c-inside-parens-p nil (byte-code "ÀÁÂ�‡" [nil (byte-code "ŠŒÀ`Á ˆ`\"ˆdbˆÂ`ÃÄ#† efÅU))‡" [narrow-to-region beginning-of-defun scan-lists -1 1 40] 8) ((error (byte-code "‡" [nil] 2)))] 5))
- (defun c-indent-line (&optional whole-exp) "\
- Indent current line as C code.
- Argument means shift any additional lines of grouping
- rigidly with thls line." (interactive "P") (byte-code "ËˆÌ ËËËd`ZÍ ˆ`‰ˆ?†$
=†$ ÎÏ!ƒr
=ƒk ËËŠÍ ˆÐÑ!ˆgÒU‰ˆÓÔ!ˆ`‰ˆÍ ˆÐÑ!ˆÕÖ
-
#…b …b ×Ø!Tbˆi)*‰‚o Ù ‰‚Ê ÐÑ!ˆ<ƒ‚ @‰‚ƒ ˈÎÚ!†™ ÎÛ!…™ ŠÜÝ!ˆÎÞ!)ƒ§ Ý\\]‰‚¨ ˈgßUƒ¸ Z‰‚¹ ˈgàUƒÉ \\‰‚Ê ËˆÐÑ!ˆiZ‰ˆá!ƒî dZ`Vƒê dZb‚ë Ë‚0â `\"ˆjˆdZ`VƒdZb‚ˈ
- …0Š bˆÜÝ!ˆ`‰ˆ bˆãÝ!ˆ`‰ˆ
- V)…0ä
- Ï$-‡" [indent beg end shift-amt pos t star-start c-label-offset c-indent-level c-brace-offset whole-exp nil calculate-c-indent beginning-of-line looking-at "#" skip-chars-forward " " 42 skip-chars-backward "
- " re-search-forward "/\\*[ ]*" match-beginning 0 current-indentation "case[ ]" "[A-Za-z]" forward-sexp 1 ":" 125 123 zerop delete-region forward-line indent-code-rigidly] 60))
- (defun calculate-c-indent (&optional parse-start) "\
- Return appropriate indentation for current line as C code.
- In usual case returns an integer: the column to indent to.
- Returns nil if line starts inside a string, t if in a comment." (byte-code "ŠÈ ˆ`ÆÆÆ
- ƒ
- b‚ É ˆ`W…3 `‰ˆÊ`Ë#‰ˆ A@‰ˆ‚ ˆÌ 8†= Í 8ƒF Í 8‚à ?ƒs bˆÎÏ!ˆgÐUƒ\\ Ë‚p Ñ
- †b e!ˆhÒUƒn ‚p Ó ‚à ÔfÐ\"ƒƒ Tbˆi‚à bˆÑ!ˆhÕ>?ƒ› Ö!ˆ
i\\‚à bˆŠ×Ø!ˆÎÙ!ˆÚÛ!…Ï gÜUƒ¹ ÝØ!‚Ë ÚÞ!ƒÈ ßàá#‚Ë ßâ!ˆ‚£ ˆ`W…× i)†à Ó \\,)‡" [indent-point state parse-start containing-sexp c-argdecl-indent c-continued-statement-indent nil c-indent-level beginning-of-line beginning-of-defun parse-partial-sexp 0 3 4 skip-chars-forward " " 123 c-backward-to-noncomment 41 current-indentation /= (nil 44 59 125 58 123) c-backward-to-start-of-if forward-char 1 "
- " looking-at "#\\|/\\*\\|case[
- ]\\|[a-zA-Z0-9_$]*:" 35 forward-line "/\\*" search-forward "*/" move ":"] 52))
- (defun c-backward-to-noncomment (lim) (byte-code "ÄÄ ?…M ÅÆ
- \"ˆ`‰ˆ`Ç
- \\Y…# ŠÈÉ!ˆÊË!)ƒ. ÌÍ
- Î#‚I Ï ˆÐÑ!ˆÊÒ!ƒC `
- X‰‚I ‰ˆbˆ‚ *‡" [odot stop lim t nil skip-chars-backward "
- " 2 forward-char -2 looking-at "\\*/" search-backward "/*" move beginning-of-line skip-chars-forward " " "#"] 19))
- (defun c-backward-to-start-of-if (lim) (byte-code "hÁUƒ ÂÃ!‚
ĈŠˆ`Xƒ Tb‚ ĈÆÇ!‡" [lim 41 forward-sexp -1 nil beginning-of-line skip-chars-forward " "] 7))
- (defun mark-c-function nil "\
- Put mark at end of C function, dot at beginning." (interactive) (byte-code "ÀˆÁ`!ˆÂ ˆÁ`!ˆÃ ˆÄ ‡" [nil push-mark end-of-defun beginning-of-defun backward-paragraph] 7))
- (defun indent-c-exp nil "\
- Indent each line of the C grouping following dot." (interactive) (byte-code "Áˆ CÁÁÁÁÁÁÁ`Ò
- ŠÓÔ!)ˆŠ ‰ˆm?…. ?…ä
- ‰ˆ ‰ˆ?…K m…J
‰?…È
‰ˆÕ`Ö ˆ`
%‰ˆ
@‰
- ˆ
AA@…s
AA@ÒYƒ€
AA@‰‚� Áˆ×Ø\"@ƒ� Ù ‚‘ Áˆ×Ø
\"@ƒ± ×Ø\"@?ƒ© Ú ‚ª ÁˆÛÔ!‚Ä ×Ü
\"@ƒ¿ ÛÔ!‚Ä
‰ˆ‚<
|