;ELC ;;; compiled by jwz@thalidomide on Tue Apr 5 00:59:48 1994 ;;; from file /th/jwz/emacs19/lisp/modes/c-mode.el ;;; emacs version 19.10 Lucid (beta11). ;;; bytecomp version 2.23; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar c-mode-abbrev-table nil "\ Abbrev table in use in C mode.") (define-abbrev-table 'c-mode-abbrev-table nil) (defvar c-mode-map nil "\ Keymap used in C mode.") (byte-code " \"################" [c-mode-map make-sparse-keymap set-keymap-name define-key "{" electric-c-brace "}" ";" electric-c-semi "#" electric-c-sharp-sign ":" electric-c-terminator "{" c-insert-braces "" mark-c-function "" indent-c-exp "a" c-beginning-of-statement "e" c-end-of-statement "q" c-fill-paragraph "" c-forward-conditional "" c-backward-conditional "" c-up-conditional "" backward-delete-char-untabify " " c-indent-command] 4) (autoload '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.") (byte-code " ############" [c-mode-syntax-table make-syntax-table modify-syntax-entry 92 "\\" 47 ". 14" 42 ". 23" 43 "." 45 61 37 60 62 38 124 39 "\""] 4) (defvar c-indent-level 2 "\ *Indentation of C statements with respect to containing block.") (defvar c-brace-imaginary-offset 0 "\ *Imagined indentation of a C open brace that actually follows a statement.") (defvar c-brace-offset 0 "\ *Extra indentation for braces, compared with other text in same context.") (defvar c-argdecl-indent 5 "\ *Indentation level of declarations of C function arguments.") (defvar c-label-offset -2 "\ *Offset of C label lines and case statements relative to usual indentation.") (defvar c-continued-statement-offset 2 "\ *Extra indent for lines not starting new statements.") (defvar c-continued-brace-offset 0 "\ *Extra indent for substatements that start with open-braces. This is in addition to c-continued-statement-offset.") (defvar c-auto-newline nil "\ *Non-nil means automatically newline before and after braces, and after colons and semicolons, inserted in C code. If you do not want a leading newline before braces then use: (define-key c-mode-map \"{\" 'electric-c-semi)") (defvar 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.") (byte-code "!!" [boundp c-switch-label-regexp purecopy "case[ '/(]\\|default\\(\\S_\\|'\\)"] 2) (fset 'c-mode #[nil " \n!\n!!P ! !!!!!!!!!!!!" [kill-all-local-variables use-local-map c-mode-map c-mode major-mode "C" mode-name c-mode-abbrev-table local-abbrev-table set-syntax-table c-mode-syntax-table make-local-variable paragraph-start "^$\\|" page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function c-indent-line indent-region-function c-indent-region require-final-newline comment-start "/* " comment-end " */" comment-column 32 comment-start-skip "/\\*+ *" comment-indent-function c-comment-indent parse-sexp-ignore-comments run-hooks c-mode-hook] 2 "\ 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." nil]) (fset 'c-comment-indent #[nil "!‡`y!!iT!!ɪ bx UnªiT ]*" [looking-at "^/\\*" 0 opoint "[ ]*}[ ]*\\($\\|/\\*\\)" search-forward "}" "^#[ ]*endif[ ]*" "^#[ ]*else[ ]*" 7 " " nil comment-column] 2]) (fset 'c-fill-paragraph #[(&optional arg) "yw !`) =y `)#`)y! !i\" yiy`!\"`yw`){!``|))PPb!i`\"*\\b#y`)}!!ebV``\\|dby#y! .!!*" [0 " \n" nil looking-at comment-start-skip first-line comment-start-place calculate-c-indent t re-search-forward "[ ]*/\\*.*\\*/" make-string 32 1 line-width move-to-column calculate-c-indent-within-comment max-prefix-end " *" paragraph-start "\\|^[ /*]*$" paragraph-separate chars-to-delete fill-prefix search-backward "/*" column insert-char 2 search-forward "*/" move fill-paragraph arg -1 "[ ]*\\*/" delete-indentation] 6 "\ Like \\[fill-paragraph] but handle C comments. If any of the current line is a comment or within a comment, fill the comment or the paragraph of it that point is in, preserving the comment indentation or line-starting decorations." "P"]) (fset 'electric-c-brace #[(arg) "\nlxn) c `Z Tb!) b\n!!)\n!!)" [nil insertpos arg " " c-auto-newline c-indent-line newline last-command-char 2 delete-char -1 self-insert-command prefix-numeric-value] 3 "\ Insert character and correct line's indentation." "P"]) (byte-code "MM" [c-insert-brackets #[nil "cc)" [91 93] 1 nil nil] c-insert-braces #[nil "! c )" [123 last-command-char electric-c-brace 1 newline c-indent-line 125] 2 nil nil]] 2) (fset 'electric-c-sharp-sign #[(arg) "xn) !) !!" [" " nil c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\ Insert character and correct line's indentation." "P"]) (fset 'electric-c-semi #[(arg) "\n!\n!!" [c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\ Insert character and correct line's indentation." "P"]) (fset 'electric-c-terminator #[(arg) "` lywgU=\n!ww` W) ` \"888))c  `Z \n\nTb!)\n\nb !!) !!*" [nil end insertpos arg 0 " " 35 last-command-char 58 looking-at c-switch-label-regexp "a-zA-Z0-9_$" beginning-of-defun parse-partial-sexp pps 3 4 5 c-indent-line c-auto-newline c-inside-parens-p newline 2 delete-char -1 self-insert-command prefix-numeric-value] 3 "\ Insert character and correct line's indentation." "P"]) (fset 'c-inside-parens-p #[nil "" [nil (byte-code "` `}db`#efU*" [beginning-of-defun scan-lists -1 1 40] 4) ((error))] 3]) (fset 'c-indent-command #[(&optional whole-exp) " ‰yy`)` W!`wo) V $+xn) " [whole-exp c-indent-line nil end beg shift-amt c-tab-always-indent 0 1 forward-sexp " \n" indent-code-rigidly "#" " " insert-tab] 5 "\ Indent current line as C code, or in some cases insert a tab character. If `c-tab-always-indent' is non-nil (the default), always indent current line. Otherwise, indent the current line only if point is at the left margin or in the line's indentation; otherwise insert a tab. A numeric argument, regardless of its value, means indent rigidly all the lines of the expression starting after point so that this line becomes properly indented. The relative indentation among the lines of the expression are preserved." "P"]) (fset 'c-indent-line #[nil "!d`Zy`= = !w<@!!!!)\\]!! )!u )! ) )gUZgU\\wiZUd\nZ`Vd\nZb `|jd\nZ`Vd\nZb -" [calculate-c-indent nil pos case-fold-search shift-amt beg indent 0 current-indentation t calculate-c-indent-within-comment looking-at "[ ]*#" " " c-switch-label-regexp "[A-Za-z]" forward-sexp 1 ":" c-label-offset "else\\b" "else\\s_" c-backward-to-start-of-if "}[ ]*else" backward-sexp "while\\b" c-backward-to-start-of-do 125 c-indent-level 123 c-brace-offset] 7 "\ Indent current line as C code. Return the amount the indentation changed by."]) (fset 'calculate-c-indent #[(&optional parse-start) "y`b ` W`` #A@l b 8 8 8\n!\ne!#m!ysԏy!)!!Sbۏwby##?l*)\nfU\nTbi\n!h=h=`Zf=`Zfz>h=u\n!y\n!P`*+*hU)mygU`+]*[+b*h> bwgU)\n!1i bwg)=2\\\\\nbu3w!gUymgUu#]`3)!O` W3`V 9ZigU:Z*n;U:1\\;xn!y` X Tbw" [(41 34) forward-sexp -1 0 lim " " nil] 2]] 2) (fset 'c-backward-to-start-of-if #[(&optional limit) " `)o? U?!! Th! S^`WYbR*" [limit beginning-of-defun 1 nil case-fold-search if-level 0 backward-sexp looking-at "else\\b" "if\\b"] 2 "\ Move to the start of the last \"unbalanced\" `if'."]) (fset 'c-backward-to-start-of-do #[(&optional limit) " `)` `ɏ !!hUhUҪ$)`W)4 =ª b+" [limit beginning-of-defun t nil done startpos first next-start (backward-sexp 1) ((error (byte-code "" [fail done] 1))) looking-at "do\\b" succeed forward-sexp 1 125 search-forward ";" 2 fail] 6 "\ If point follows a `do' statement, move to beginning of it and return t. Otherwise return nil and don't move point."]) (fset 'c-beginning-of-statement #[(count) "` `\n$) 8 8 P!x`Zb!)[!V SqW Tq*" [nil state here beginning-of-defun parse-partial-sexp 3 4 looking-at "[ ]*" comment-start-skip " " 2 "\\*/" forward-sentence count 0 c-beginning-of-statement-1 c-end-of-statement-1] 6 "\ Go to the beginning of the innermost C statement. With prefix arg, go back N - 1 statements. If already at the beginning of a statement then go to the beginning of the preceding one. If within a string or comment, or next to a comment (only whitespace between), move by sentences instead of statements." "p"]) (fset 'c-end-of-statement #[(count) " [!" [c-beginning-of-statement count] 2 "\ Go to the end of the innermost C statement. With prefix arg, go forward N - 1 statements. Move forward to end of the next statement if already at end. If within a string or comment, move by sentences instead of statements." "p"]) (byte-code "MM" [c-beginning-of-statement-1 #[nil "`ŏ*" [t first last-begin nil (byte-code "o!\n #`i b" [backward-sexp 1 first re-search-forward "[;{}]" last-begin t nil] 4) ((error (byte-code "! b" [first backward-up-list 1 last-begin] 2)))] 3] c-end-of-statement-1 #[nil "" [nil (byte-code "m`!`b #+i!u" [beg forward-sexp 1 end re-search-forward "[;{}]" t re-search-backward "[;}]"] 4) ((error (byte-code "`!`b #*" [beg backward-up-list -1 end search-forward ";" move] 4)))] 3]] 2) (fset 'mark-c-function #[nil "`! `# " [push-mark end-of-defun nil t beginning-of-defun backward-paragraph] 4 "\ Put mark at end of C function, point at beginning." nil]) (fset 'indent-c-exp #[(&optional endpos) "C` u `)  `}ȏ*`C \n   !)``)#הbxn)`%  8? 8?) y* m? ` W ?  m݉ ``%@AA@AA@YAA@88 888y!݉  W C\" C\" TT8TU ?X 8V A A SiUW B B Ti @ A@!`)ywl ` Y @ @Y @fU @Z`!gU!\n!h> @!1i2\\\\\n! \n! h=b  @) @ @[\n!8= 8 8):!!!!)=\\]gU?ZgUiU@\\liUgAU`y`|j!``)#`%  8? 8?) y)." [nil indent-stack opoint endpos funbeg 1 beginning-of-defun (byte-code "!`)" [backward-up-list 1] 2) ((error (point))) contain-stack case-fold-search restart outer-loop-done inner-loop-done state ostate this-indent last-sexp at-else at-brace at-while last-depth this-point 0 next-depth forward-sexp beg re-search-forward comment-start-skip t " " parse-partial-sexp new-state 3 5 indent-for-comment 4 7 c-indent-line append 6 -1 123 looking-at "else\\W" "while\\b" c-backward-to-noncomment (nil 44 59 125 58 123) c-backward-to-start-of-continued-exp c-continued-statement-offset c-continued-brace-offset c-backward-to-start-of-if current-indentation c-backward-to-start-of-do 44 calculate-c-indent val calculate-c-indent-within-comment c-switch-label-regexp "[A-Za-z]" ":" c-label-offset 125 c-indent-level c-brace-offset 35] 7 "\ Indent each line of the C grouping following point." nil]) (fset 'c-indent-region #[(start end) "bwy !nm`W ‰\n   y!)yڊy` )y` Wҏwo\n\nb!` )\n\n V\nX  W \nb\n\n‰y,‰+" [start " \n" nil 0 copy-marker end t c-tab-always-indent endmark c-indent-line sexpend sexpbeg nextline shift-amt looking-at "[ ]*#" 1 (byte-code "! " [forward-sexp 1 point-marker sexpend] 2) ((error (byte-code "\nb" [nil sexpend nextline] 1))) backward-sexp indent-c-exp] 4]) (defvar c-backslash-column 48 "\ *Minimum column for end-of-line backslashes of macro definitions.") (fset 'c-backslash-region #[(from to delete-flag) "b  Ɠ` WhUux iT]yb  V  \\\\  _ W)b` Wlys` Wy` W) ! y_ Ɖ+" [from c-backslash-column make-marker endmark column to nil delete-flag 92 -1 " " 1 tab-width 0 adjusted window-width c-append-backslash c-delete-backslash] 4 "\ Insert, align, or delete end-of-line backslashes on the lines in the region. With no argument, inserts backslashes and aligns existing backslashes. With an argument, deletes the backslashes. This function does not modify the last line of the region if the region ends right at the start of the following line; it does not modify blank lines at the start of the region. So you can put the region around an entire macro definition and conveniently use this command." "r\nP"]) (byte-code "MM" [c-append-backslash #[(column) "hUu j jc" [nil 92 -1 delete-horizontal-space column "\\"] 2] c-delete-backslash #[nil "u!`Tx`|" [nil -1 looking-at "\\\\" " "] 3]] 2) (fset 'c-up-conditional #[(count) " [\"" [c-forward-conditional count t] 3 "\ Move back to the containing preprocessor conditional, leaving mark behind. A prefix argument acts as a repeat count. With a negative argument, move forward to the end of the containing preprocessor conditional. When going backwards, `#elif' is treated like `#else' followed by `#if'. When going forwards, `#elif' is ignored." "p"]) (fset 'c-backward-conditional #[(count &optional up-flag) " [\n\"" [c-forward-conditional count up-flag] 3 "\ Move back across a preprocessor conditional, leaving mark behind. A prefix argument acts as a repeat count. With a negative argument, move forward across a preprocessor conditional." "p"]) (fset 'c-forward-conditional #[(count &optional up-flag) "Vê\nƪ`  U   #y!ly! \\!\nU`  ZWW\nת!\nyW` )) !  b* \\)  b-" [count 0 forward -1 1 increment re-search-forward re-search-backward search-function opoint nil new up-flag found depth "#[ ]*\\(if\\|elif\\|endif\\)" t looking-at "^[ ]*#[ ]*\\(if\\|elif\\|endif\\)" prev "[ ]*#[ ]*endif" "[ ]*#[ ]*elif" error "No following conditional at this level" "No previous conditional at this level" "No containing preprocessor conditional" push-mark] 5 "\ Move forward across a preprocessor conditional, leaving mark behind. A prefix argument acts as a repeat count. With a negative argument, move backward across a preprocessor conditional." "p"])