home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1994-09-10 | 135.2 KB | 4,200 lines
Sat Sep 10 13:27:11 1994 Barry A. Warsaw (warsaw@anthem.nlm.nih.gov) * Public Release of 4.85. Wed Sep 7 18:41:29 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-mode-fsf-menu, c-mode-map, c++-mode-map, objc-mode-map): use a better feature test to figure out how to set the menu title string. Tue Sep 6 13:49:46 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-search-uplist-for-classkey): in `class' keyword verification section, only skip forward for ?> template char if a matching ?< char was found previous to search-start. This eliminates false match of template base classes. Thu Sep 1 22:30:23 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-submit-bug-report): updated var list * cc-mode.el (c-mode-fsf-menu, c-mode-map, c++-mode-map, objc-mode-map): do a better job of getting the menu title string appropriate for the mode being edited in. Bogus, but necessary. XEmacs is better in this respect. * cc-mode.el (c-search-uplist-for-classkey): Lele patch for objc-mode * cc-mode.el (c-search-uplist-for-classkey): avoid "invalid search bound" error * cc-mode.el (c-beginning-of-statement-1): skip special modifier chars in all cases, not just in "no balanced expr found" case. * cc-mode.el (c-guess-basic-syntax): CASE 9: generalize and collect common code for finding position after conditional statements, and check for `while' statement of a `do' loop. In that case, skip over the trailing semi. Wed Aug 31 22:20:47 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-progress-init, c-progress-update, c-progress-fini): use a marker for end (and be sure to free it!) so that as indentation occurs, % can't go above 100. * cc-mode.el (c-mode-map): check on feature (fboundp 'add-menu) for FSF 19 (which doesn't have it). * cc-mode.el (c-progress-info, c-progress-init, c-progress-update, c-progress-fini): new vars/defuns for better long indentation progress reporting (c-indent-exp, c-indent-region): use new progress reporting Tue Aug 30 21:57:37 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-guess-basic-syntax): CASE 6F, go forward 1 char from b-o-s of containing-sexp bufpos to find proper relpos of an arglist-cont. * cc-mode.el (c-offset-alist-default): statement-case-open default offset is zero (c-skip-case-statement-forward): new function (c-guess-basic-syntax): CASE 15: use c-skip-case-statement-forward in proper places to find the real relpos of statement's inside switch case/default bodies. CASE 15D: remove special handling when looking at c-conditional-key. * cc-mode.el (c-offsets-alist, c-cleanup-list, c-mode-menu, c-mode-map, c-symbol-key, c-indent-line, c-popup-menu): make sure ObjC is properly documented. * cc-mode.el (c-least-enclosing-brace): new function (c-enclosing-brace, c-guess-basic-syntax): renamed c-enclosing-brace to c-most-enclosing-brace (c-indent-defun): handle opening braces not in column 1 * cc-mode.el (c-beginning-of-statement-1): skip over statement mod characters that don't preceed an open paren. Fri Aug 26 17:42:24 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-guess-basic-syntax): be careful to check for c-access-key non-nil before calling (looking-at c-access-key). For C, this is nil. * cc-mode.el (c-beginning-of-statement-1): swapped CASE 3 and 4, so that conditional statements are picked up properly * cc-mode.el (c-guess-basic-syntax): CASE 15D, calculate relpos from boi of beginning of statement prior to indent-point, unless we're looking at a conditional key * cc-mode.el (c-mode-map, c++-mode-map, objc-mode-map): change test of 'FSF in c-emacs-features to an fboundp set-keymap-parent test Thu Aug 25 13:31:31 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-just-after-func-arglist-p, c-guess-basic-syntax, c-lineup-objc-method-args-2): more objc patches from Lele Wed Aug 24 21:06:05 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-indent-command): with optional arg, shift-amt had wrong sign * cc-mode.el (c-lineup-arglist): better handling of comments preceding arg lists * cc-mode.el (c-guess-basic-syntax): swapped CASE 6A and 6B so that empty arglists with close paren on separate line are properly recognized. * cc-mode.el (c-mode-menu, c-emacs-features, c-mode-map, c-common-init): remove dependency on string "Lucid" in emacs-version. Use features based means where such descrimination is necessary. Tue Aug 23 18:43:28 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-fill-paragraph): merge with c-mode.el uses fill-region-as-paragraph * cc-mode.el (c-offsets-alist-default, c-offsets-alist, c-hanging-braces-alist, c-electric-brace, c-guess-basic-syntax): added syntactic symbol statement-case-open for statement-case-intro's that contain an open brace. * cc-mode.el (c-lineup-math): watch for equal signs in literals * cc-mode.el (c-beginning-of-statement-1): CASE5 and CASE 6, better pick up of label's with potential embedded colons (scope operators). Mon Aug 22 22:28:03 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-hanging-comment-ender-p): new variable (c-fill-paragraph): looks at c-hanging-comment-ender-p to see if */ should be left on its own line. c-mode.el behavior is default value t, but there have been *many* requests for nil's behavior. Wed Aug 17 23:05:01 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-recognize-knr-p, c-common-init): fix the way this var is made buffer local Tue Aug 16 20:05:49 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-recognize-knr-p, c-mode, c++-mode, objc-mode): make it so c-recognize-knr-p is settable from c-mode-common-hook. Thu Aug 11 20:40:06 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-recognize-knr-p): new variable (c-offsets-alist-default, c-offsets-alist, c-guess-basic-syntax): changed syntactic symbol c++-funcdecl-cont to ansi-funcdecl-cont (c-mode, c++-mode, objc-mode): use new c-recognize-knr-p variable (c-guess-basic-syntax): use new c-recognize-knr-p variable; swap CASE 5B.2 and 5B.3. Wed Aug 10 17:54:53 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-offsets-alist, c-read-offset, c-set-offset): can accept variable symbols as offsets. (c-get-offset): can now accept ++ and -- symbols, which evaluate to 2* positive and negative c-basic-offset. Thu Aug 4 15:29:43 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-guess-basic-syntax): case 9C added small performance improvment to c-in-literal call Wed Aug 3 17:37:30 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-beginning-of-statement-1): use c-in-literal-cache, and limit backscanning in CASE 5 to known, non-literal position. * cc-mode.el (c-in-literal, c-guess-basic-syntax): caching of last literal result Tue Aug 2 20:18:10 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-guess-basic-syntax): CASE 15D, calculate 'statement relpos as the beginning-of-statement relative to indent-point. * cc-mode.el (c-beginning-of-statement-1): CASE 4, check for conditional keywords which could be followed by a balanced paren expr. I.e. while(foo) Tue Jul 26 15:55:21 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c++-mode-syntax-table, objc-mode-syntax-table): give CR same syntax as newline, for selective-display. Fri Jul 22 18:42:38 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-electric-star): fixed indentation problem when a star is not preceded by a slash. * cc-mode.el (c-indent-defun): removed condition-case inside unwind-protect. All error conditions are properly handled at other levels of the code. Thu Jul 21 22:34:19 1994 Barry A. Warsaw, ITB <warsaw@anthem> * cc-mode.el (c-class-key, c-search-uplist-for-classkey): greatly simplified, this constant now contains a regexp that only matches valid `class' keywords, in the C++ sense. It now ignores any template, extern, static, etc. keywords. Tue Jul 19 09:53:37 1994 Barry A. Warsaw (warsaw@anthem.nlm.nih.gov) * Public Release of 4.35. Sun Jul 17 18:29:51 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-syntax): Lele Gaifax's patch to fix an Objc problem... "this patch, applied to 4.32, will correct a little bug in ObjC mode. Currently objc-mode fails to recognize a continued arglist, as it guesses every such construct is a continued method call." Fri Jul 15 13:48:39 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-search-uplist-for-classkey): don't get fooled by the following C construct: struct shmid_internal shmconv( register int s) { int foo = 1; } Tue Jul 12 14:36:10 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-parse-state): in body of `something bad happened' part, don't use beginning-of-defun to find "real" bod since based on some coding styles, this could loop us all the way back to bob. E.g.: int foo() { int a = 7; { foobar(); }} int foo() { int a = 7; { foobar(); }} Instead use scan-lists and be more robust about crossing unbalanced close braces. Now even antisocial coding styles like the above can be quickly parsed correctly. * cc-mode.el (c-parse-state): small but important fix in `something bad happened' test. make sure that placeholder close brace ends up before indent point, otherwise we didn't cross it. Thu Jul 7 13:56:08 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-parse-state): in `something bad' section, placeholder will always be just after any close brace so we need to 1- from it to check for ?}. Also, we probably don't need to check for placeholder-1 being nil. Thu Jun 30 21:03:55 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-switch-label-key): a paren can follow the `case' keyword without any intervening whitespace. * cc-mode.el (c-beginning-of-statement-1): when skipping over unary ops, remember that whitespace could be intermixed before the paren * cc-mode.el (c-electric-brace): added brace-list-intro and brace-list-entry to list of hangables (c-hanging-braces-alist): added docstring for b-l-i and b-l-e hangability * cc-mode.el (c-beginning-of-statement-1): CASE 6: be sure to ignore switch labels too. * cc-mode.el (c-lineup-arglist-intro-after-paren): new lineup function to conform to GNU style. (c-style-alist): for style GNU, arglist-intro set to c-lineup-arglist-intro-after-paren and arglist-close set to c-lineup-arglist to conform to BOCM GNU style. Wed Jun 29 00:48:56 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-syntax): installed this patch: In ObjC mode 4.6 the tests 6D and 6E in c-guess-basic-syntax need to be swapped. Otherwise what is a continued method call line will be recognized as a 'arglist-cont-nonempty. Swapping these test will not interfere with the normal behaviour of cc-mode, since the test for the method call is surrounded with a test on (eq major-mode 'objc-mode). Emanuele (lele) Gaifax | ...calling Emacs convenient, of course, is lele@nautilus.sublink.org | like calling oxygen useful -- Rens Troost * cc-mode.el (c-mark-function): new implementation based on c-parse-state. I think this should work much better for people. Tue Jun 28 23:57:42 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-just-after-func-arglist-p): partial fix for this bug: class foo { foo() : // member-init-intro a (0), // topmost-intro-cont??? b (0) // member-init-cont {} }; note that if there is a comment after foo(), its still broken. But that probably won't happen too often... * cc-mode.el (c-lineup-arglist): don't limit skippages forward over syntactic ws to eol. Mon Jun 27 18:25:42 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-parse-state): when looking to see if `something bad happened', and guaranteeing that the char-after placeholder is = to ?}, make sure that char-after placeholder is less than point-max (i.e. char-after placeholder returns non-nil). * cc-mode.el (c-electric-star): should not re-indent line if introducing a comment not on a comment-only line Thu Jun 23 17:54:49 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-inside-bracelist-p): when finding an enum, check to be sure its not a type descriptor on a return value of a func (i.e. skip-chars-forward for not semi or open paren). Wed Jun 22 19:23:43 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-parse-state): when trying to find out if "something bad happened" be sure to check for crossing a close *brace* and not a close paren or square bracket. Only crossing a close brace indicates badness. Mon Jun 20 00:32:46 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-set-offset): initial contents of prompt is the last syntactic symbol on the syntactic analysis list -- the most likely symbol that the user wants to change. Fri Jun 17 22:25:41 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-arglist): fixed problem of skipping too many close parens when finding the relpos of arglist-close. * cc-mode.el (c-guess-basic-syntax): CASE 6F fixed incorrect relpos * cc-mode.el (c-guess-basic-syntax): CASE 8B and CASE 8C: when an otherwise brace-list-entry or brace-list-intro is found to start with an open brace, the line is given brace-list-open syntax instead (c-inside-bracelist-p): fix small bug in recognizing open brace at brace-list-intro line, and infinite loop problem. * cc-mode.el (c-inside-bracelist-p): more accurate handling of nested aggregates. Now uses brace-state as provided by c-parse-state. Tue Jun 14 22:25:09 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-forward-conditional): break infinite loop when finding commented out conditionals Mon Jun 13 17:40:08 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-submit-bug-report): Use new interface for reporter.el 2.x Fri Jun 10 13:42:02 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-submit-bug-report): remove defun-prompt-regexp from the list of vars if it is not boundp (i.e. v18) Thu Jun 9 14:15:00 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-syntax): repaired all CASE numbers * cc-mode.el (c-offsets-alist-default): added syntactic symbols objc-method-intro objc-method-args-cont objc-method-call-cont. (c-offsets-alist): added descriptions for above new syntactic symbols (objc-mode-hook) (objc-mode-abbrev-table) (objc-mode-map) (objc-mode-syntax-table) (objc-mode): added for Objective-C support (c-objc-method-key): new regexp desribing an ObjC method intro. (c-electric-slash): objc-mode understands // comments (c-fill-paragraph): objc-mode understands // comments (c-beginning-of-statement-1): added CASE 7 for objc-mode (c-in-objc-method-def-p): checks to see if inside an Objective-C method definition. (c-just-after-func-arglist-p): check for Objective-C method def (c-guess-basic-syntax): many modifications to look for Objective-C syntactic symbols: CASE 3.5, CASE 4G, CASE 4I, CASE 5E. (c-lineup-objc-method-call) (c-lineup-objc-method-args): new custom lineup functions for Objective-C methods. (c-submit-bug-report): look for ObjC mode Mon Jun 6 19:47:19 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-style-alist): another fix to Ellemtel style. Since the style guide recommends braces around the body of all case statements, statement-case-intro should be 0, letting statement-block-intro of the following line pick up the proper indentation * cc-mode.el (c-style-alist): Ellemtel style should have c-hanging-braces-alist for substatement-open be before and after Thu Jun 2 23:09:16 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-strict-syntactics-p): changed to c-strict-syntax-p (c-guess-basic-syntactics): changed to c-guess-basic-syntax (c-add-syntactics): changed to c-add-syntax (various): use new function and variable names Wed Jun 1 15:46:19 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: bumping to version 4 in anticipation of objc-mode support Tue May 31 23:51:08 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-strict-semantics-p): changed to c-strict-syntactics-p (c-echo-semantic-information-p): changed to c-echo-syntactic-information-p (c-semantics): changed to c-syntactic-context (c-guess-basic-semantics): changed to c-guess-basic-syntactics (c-show-semantic-information): changed to c-show-syntactic-information (cc-mode.el): other internal changes to make terminology consistent * cc-mode.el (c-guess-basic-semantics): CASE 14.E, if defun opening brace is not at boi, its because its hung on right side so we need a different relpos * cc-mode.el (c-guess-basic-semantics): CASE5, various. Extend the notion of arglists to bracket lists, i.e. [...] * cc-mode.el (c-search-uplist-for-classkey): when skipping over commas after classkey's watch out for inheritance lists... * cc-mode.el (c-beginning-of-statement-1): ignore labels and access keys Tue May 24 22:04:15 1994 Barry A. Warsaw, ITB (warsaw@anthem) * Public Release 3.349 * cc-mode.el (c-search-uplist-for-classkey): break out of infinite loop when finding `struct' keyword in arglist Mon May 23 15:43:07 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-electric-brace): we need to recalculate semantics if, when re-indenting the preceding line, point changes. If this happens, the relpos for semantics is invalid. Thu May 19 22:27:55 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-style-alist): updated the various styles to set the correct values for substatement-open (c-style-alist): added dynamic setting of default style. The way this works may or may not be a feature? Wed May 18 22:07:15 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-backward-to-start-of-if): fix to correctly handle `else-if' clauses, which should be skipped when looking for the matching if. * cc-mode.el (c-search-uplist-for-classkey): don't get confused by a single struct type arg in a function's arglist * cc-mode.el (c-beginning-of-statement-1): on backward-sexp failure, skip over funny chars and whitespace only when just before a paren (c-search-uplist-for-classkey): watch out for comma ending struct arg declarations which doesn't leave us in a class definition. * cc-mode.el (c-mode-map): fix the setting of mode-popup-menu for Lemacs 19.10. Menu must have a title string. * cc-mode.el (c-style-alist): changes to Ellemtel style: substatement sets its offset to 3, substatement-open sets its offset to 0. Given by: <qhslali@aom.ericsson.se> Lars Lindberg. Tue May 17 22:46:22 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-beginning-of-statement-1): when backward-sexp fails and doing backward-up-list, and before skipping over noise characters, skip over any preceding syntactic whitespace: --------------V if ( ! backup_dev || sep1 != ':' || ) * cc-mode.el (c-beginning-of-statement-1): fixed small infinite loop in CASE5 test when barrier char is in literal. * cc-mode.el (c-guess-basic-semantics): CASE 13: don't limit the search backwards for the beginning of statement * cc-mode.el (c-beginning-of-statement-1): completely rewritten to properly account for cpp macros and statement barrier characters (e.g. { } ;) in literals. Mon May 16 20:21:12 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-inside-bracelist-p): must check that enum keyword truly introduces a bracelist and not that it is a type identifier for a declaration. I.e. match: enum foo { /* ... */ } but not: enum foo bar; Thu May 12 22:52:12 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): CASE 4A.2 watch out for enum keywords in K&R argdecl lists. These don't open enum definitions, but they are declarations instead. E.g.: ret_stat (rpt_stat, filename, pcode) enum xrpt_status_codes rpt_stat; char filename[]; enum xpippop_codes pcode; { * cc-mode.el: (c-C-conditional-key) (c-C++-conditional-key): new regexps which describe conditionals in the two supported languages. This is necessary because `try' and `catch' blocks are defined as substatements equivalent to `while', `for', etc., in C++ only (c-mode) (c++-mode): set c-conditional-key, which is now buffer-local, to either c-C-conditional-key or c-C++-conditional-key. * cc-mode.el (c-parse-state): when we discover that an open brace we thought specified the bod, actually isn't the bod, we backup and search for another potential bod. This is necessary so that open braces in column zero that aren't really defun opening braces don't trip us up. Our test for invalid bod is if we cross over an unbalanced close brace. * cc-mode.el (c-guess-basic-semantics): CASE 4G, in c-mode, fix recognition of the last line in the following construct: typedef int (*foobar) /* if I break this into 2 lines ...*/ (int foo, char *bar); extern foobar really; /* this is incorrectly indented */ Tue May 10 16:42:13 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-indent-region): fixed a bug where comment-only lines were being skipped. Wrapped an unwind-protect around mark copying so we can't leak marks. * cc-mode.el (c-emacs-feature): use variables emacs-major-version and emacs-minor-version if they exist Fri May 6 21:09:58 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-style-alist): small changes to the Ellemtel style: inline-open and topmost-intro-cont are changed to 0 offset. * cc-mode.el (c-hanging-braces-alist): added (substatement after) so that braces will hanging on substatement blocks Thu May 5 22:48:23 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-math): can now line up equals signs even if the equals isn't at boi. E.g., it can now handle: float a = 1.0, b = 7, c = 9; * cc-mode.el (c-comment-start-regexp): new buffer-local variable which describes how comments start. This improves generality for C-like modes with different comment intro styles. * cc-mode.el (c-indent-via-language-element): renamed to c-indent-line for better backwards compatibility, i.e. awk-mode Tue Apr 26 16:17:29 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-parse-state): make sure we ignore any bogus beginning-of-defun bufpos's when we're searching back 2 bods * cc-mode.el (c-search-uplist-for-classkey): after finding what looks like a class header, search for both a semi (denoting a fwd decl), and an equals (denoting a struct init). Thu Apr 21 21:12:26 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c-electric-brace) (c-electric-semi&comma) (c-electric-colon) (c-indent-command) (c-indent-exp) (c-indent-region) (c-indent-via-language-element): eliminated extraneous optional arguments, i.e. lim and bod * cc-mode.el (c-adaptive-block-open): obsolete (c-offsets-alist-default) (c-electric-brace): added substatement-open syntactic symbol (c-hanging-braces-alist): added ability to hang substatement-open braces. (c-style-alist): changed defaults of block-open to substatement-open * cc-mode.el (c-safe): use Dan LaLiberte's version impl. workaround for an FSF 19.22 bug Tue Apr 19 15:15:41 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-mode-map): put c-macro-expand on C-c C-e * cc-mode.el: (c-mode-map) (c-common-init): put in code to conform to Lucid 19.10's popup menu convention of using mode-popup-menu variable Fri Apr 15 23:09:59 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-indent-defun): handle buffer-read-only errors better * cc-mode.el (c-lineup-math): also lines up multi-line equal signs * cc-mode.el (c-guess-basic-semantics): replaced calculation of literal which must have gotten accidentally removed some time ago. * cc-mode.el (c-1bit-il): removed since it appears to be identical to c-in-literal, and thus obsolete. * cc-mode.el (c-search-uplist-for-classkey): programmatically ignore the `class' keyword inside template arg lists (c-enclosing-brace) (c-narrow-out-enclosing-class): new helper functions (c-guess-basic-semantics): fixed recognition of 'defun-open CASE 4A.4, CASE 13.A, 'block-close CASE 13.B, 'defun-block-intro CASE 14.E Thu Apr 14 18:42:00 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-parse-state): record containing paren, but not balanced paren sexps * cc-mode.el (c-guess-basic-semantics): fixed a regression problem in recognizing the difference between an inline-close and a nested class-close * cc-mode.el: (c-parse-state) (c-guess-basic-semantics) (c-search-uplist-for-classkey): massive rewrite of all parsing components. c-parse-state now uncovers the brace nesting level of the construct from (bod 2) to point and the other two defuns use this information to make scooting around brace levels much quicker and more accurate. Thu Apr 7 14:34:28 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-electric-brace): can now specify `hanginess' on close braces Thu Mar 31 15:10:09 1994 Barry A. Warsaw, ITB (warsaw@anthem) * Public release: 3.304 * cc-mode.el (c-search-uplist-for-classkey): class relpos should be at the 'boi of where c-class-key gives us a match. This is because its too hard to make c-class-key match the typedef keyword on: typedef struct Foo { so its easier to make this fix instead. Fri Mar 25 20:34:18 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c-forward-syntactic-ws) (c-backward-syntactic-ws): minor speed ups achieved by calling forward-comment with a huge number so we don't have to return to the lisp loop after just 1 comment. * cc-mode.el (c-search-uplist-for-classkey): added another speedup where syntactic whitespace is skipped before doing a re-search-forward. This requires however that the buffer be narrowed during the r-s-f because of the definition of c-class-key which matches \\` or empty-string-at-bod. It would be better to use \\`\\|\\= to match empty-string-at-point, but that's not defined for v18, and doesn't seem to work anyway, at least in Lemacs. (c-search-uplist-for-classkey): after finding a match for c-class-key, skip non-semicolons up to brace point. If a semi is found, we're looking at a forward declaration, not a class definition. Thu Mar 24 18:43:38 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): do not limit calls to c-search-uplist-for-classkey to just c++-mode since even in C we can have nested structs and unions. (c-search-uplist-for-classkey): now returns a vector instead of a cons cell (c-guess-basic-semantics): modifications for new c-s-u-f-c return value * cc-mode.el: (c-inside-bracelist-p) (c-guess-basic-semantics): when looking for an enum brace-list, c-beginning-of-statement could leave us at point-min, which could contain an intervening comment, so you need to call c-forward-syntactic-ws. Wed Mar 23 23:22:37 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-search-uplist-for-classkey): another fix for infinite loops that can occur when indenting inside the second of multiple nested classes. This should also speed things up by further limiting the region being searched. Tue Mar 22 23:12:58 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-mark-function): worked around call to backward-paragraph, which didn't work and wasn't the right semantics anyway. Movement should be by beginning-/end-of-defun. * cc-mode.el (c-indent-exp): restructure the unwind-protect call to ensure that the `end' marker is always removed on any error condition. (c-indent-exp): find any open brace that occurs after point, ignoring lexical whitespace, including newlines. * cc-mode.el (c-inside-bracelist-p): in the first goto-char, goto containing-sexp, not 1- c-s, otherwise, it will not properly recognize bracelists with comments on the end of the line. The following c-beginning-of-statement will properly consume any preceding whitespace. Mon Mar 21 22:01:25 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-search-uplist-for-classkey): must handle nil return value from scan-lists. * cc-mode.el (c-search-uplist-for-classkey): fix problem of infinite loops when there are balanced expressions between (bod 2) and the indent-point that aren't picked up by bod because they don't match defun-prompt-regexp. We skip over this noise with scan-lists. * cc-mode-18.el: don't hack c-emacs18-common-hook onto c-mode-common-hook anymore. tell users to put it on their c-mode-common-hook themselves. * cc-mode.el (c-search-uplist-for-classkey): end-of-defun can fail Fri Mar 18 21:38:31 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-search-uplist-for-classkey): new performance tuned version. Here are some numbers: hitting tab at the end of an 11k function, with an 8k function just before it was giving me 2.637sec for c-indent-command, and 1.784sec for c-s-u-f-c alone. Now I'm getting 0.972sec for c-i-c and 0.180sec for c-s-u-f-c. An order of magnitude improvement in c-s-u-f-c. These are un-bc'd times. Other bottlenecks must exist in c-i-c... * cc-mode.el: added an eval-when-compile to pick up the reporter-* symbols when byte-compiling. Thu Mar 17 20:56:04 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-electric-colon): do scope-operator clean up immediately after self-insert-command so that subsequent indentation and hanging calculations will be performed correctly Tue Mar 15 23:29:16 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-search-uplist-for-classkey): adjust for the fact that c-class-key now match 1 character before the `c' in "class". goto-char 1+ foundp to get to the proper character starting the class definition. * cc-mode.el (c-read-offset): new helper function for c-set-offset (c-set-offset): sanity check OFFSET argument both interactively and non-interactively. This seems to trip up many novices. * cc-mode.el (c++-mode-map): fixed binding for c-scope-operator. It is now on C-c : Fri Mar 11 23:45:51 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode-18.el (c-emacs18-il): applied patch contributed by SAKAI Kiyotaka(ksakai@mtl.t.u-tokyo.ac.jp) to fix infinite loop bug. * cc-mode.el (c-fill-paragraph): removed last 2 c-mode.el dependencies * cc-mode.el (c-guess-basic-semantics): CASE 8C: after moving to placeholder, which is bos, move over any conditional statments if looking at c-conditional-key. Otherwise the following code indents incorrectly: main() { while (cin >> float) cout << float << float; // This should not be this far over but beneath << } * cc-mode.el (c-indent-exp): put an unwind-protect around the sanity checks so that point is restored on error * cc-mode.el (c-class-key): another fix to recognize keyword `class' at beginning-of-buffer. (c-guess-basic-semantics): if class opening brace is not the last non-whitespace on a line, the narrow-to-region narrowing out of enclosing class will not have the proper begin point. Make sure the region does not contain the class opening brace. * cc-mode.el (c-indent-region): fixed error signal when indenting region not containing balanced sexp. e.g. at the top level: int i, j, k; * cc-mode.el (c-class-key): another fix to recognize nested class but not the word 'class' in a template declaration Thu Mar 10 23:32:37 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-beginning-of-statement-1): sped up about 8x by removing an unnecessary (I think) call to c-backward-syntactic-ws and a duplicate call to c-in-literal. By using elp, I think these were the real time hogs in c-b-o-s-1 which was the biggest hog in c-guess-basic-semantics. Wed Mar 9 22:15:26 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-arglist): added a (beginning-of-line) call before the (backward-up-list 1) call in the special case for arglist-intro and arglist-cont-nonempty. Without this, indentation would be different when point was at the beginning and end of line. E.g.: main() { if ((BuddyRec* buf = (BuddyRec*)(bufs[message_bufs++] = ::new unsigned char[MessageBufSize])) == 0) { } } On the "== 0) {" line. * cc-mode.el (c-indent-exp): try to be smarter about finding the beginning of the balanced expression to indent. Gives results closer to old indent-c-exp behavior. * cc-mode.el (c-submit-bug-report): moved the require of reporter to after the y-or-n-p question. Shortened the package name so it will fit on the Subject line better. Mon Mar 7 17:39:45 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-skip-conditional): new function. factorized duplicate code (c-guess-basic-semantics): fixed statement-cont relpos calculation in a continued statement following an else clause. CASE 8A and 8D changed to use c-skip-conditional. Mon Feb 28 18:23:36 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-conditional-key): not sufficient to wrap conditional keywords in \\<...\\> since this will false hit a keyword followed by an underscore, which technically isn't a keyword. An example is "do_table" which incorrectly gets marked as a `do' keyword. Fri Feb 25 23:01:45 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): swapped CASE 7A and 7B so that we properly indentify a brace-list-close of an empty brace list. * cc-mode.el (c-style-alist): added the "Ellemtel" style which implements the coding style defined in "Programming in C++, Rules and Recommendations, Erik Nyquist and Mats Henricson, Ellemtel, ftp from euagate.eua.ericsson.se". * cc-mode.el: (c-point) (c-indent-defun): only check the value of defun-prompt-regexp if it is boundp (so v18 doesn't break) Thu Feb 24 23:34:08 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-electric-brace): fixed bug in temporary newline insertion when auto-newline is off. If a temp newline was not inserted, don't try to delete it later on. * cc-mode.el (c-set-offset): changed the minibuffer prompt. "Langelem" => "Syntactic symbol", and put in a brief message so that people won't quote the symbol (as some novices have been doing). * cc-mode.el (c-guess-basic-semantics): CASE 4B.1, check for member init colon preceding point even after doing a forward-char -1. Need to skip over constructor parameter list that span multiple lines, with the member init colon hanging on the last of those line. CASE 4D.1. added a backward-sexp call to handle member-init-cont's which are paren-lists broken across multiple lines. * cc-mode.el (c-inhibit-startup-warnings-p): new variable, used in c-emacs-features (c-emacs-features): rewrote feature extraction logic to be based on version numbers. This more closely reflects the current state of affairs of the main Emacs flavors. There is sanity checking and warning messages built-in too, to help inform the user if there are known problems. Mon Feb 21 18:13:53 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): swap case 4A.2 and 4A.3 so that brace-lists are checked before inline-open's, otherwise enums inside of classes are not recognized properly. * cc-mode.el (c-backslashify-current-line): use kill-region instead of kill-line so we don't have to use the kill-lines-magic hack. * cc-mode.el (c-beginning-of-statement-1): do not register last-begin when looking at a case/default label, otherwise statement-cont lines after a case label will not be associated with the correct beginning-of-statement Fri Feb 18 16:13:27 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-arglist): must handle arglist-intro lines just like arglist-cont-nonempty lines in the calculation of containing-sexp in the let* statement. (c-lineup-arglist): do not hard-code offset to 2 if at the end, we are still looking at the eol. I don't know why that was there... * cc-mode.el (c-guess-basic-semantics): CASE 4I, topmost-intro-cont's relpos must be the boi of the beginning-of-statement, otherwise multiple t-i-c lines get marching indentation. Thu Feb 17 23:53:16 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-set-style): changed the sense of the optional argument. Now, style changes modify the global variables by default, except when a non-nil second argument is given. Only then are buffer-local versions of the variables made. * cc-mode.el (c-lineup-arglist): fixed calculation of containing-sexp for the following code: main() { if( someFunction(someArg, anotherArg) && someOtherFunction(someArg, anotherArg)) doThis(); } * cc-mode.el (c-class-key): fixed class recognizing regexp so that it doesn't falsely match the word `class' in a template function declaration, e.g.: template<class T> int A<T>::foo( * cc-mode.el (c-mode-map): moved c-indent-defun to C-c C-q. This should be its final resting place (c-lineup-math): new optional custom indent function, not used by default. * cc-mode.el (c-mode-map): moved c-indent-defun from C-M-x to C-c C-i. RMS says C-M-x is reserved. Wed Feb 16 23:06:15 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-mode-syntax-table): change : back to default (. == punctuation) syntax class since c-label-key is busted when its (_ == symbol) * cc-mode.el (c-lineup-runin-statements): new lineup function for people who hang the first statement after the open brace. (c-offsets-alist-default): added comment about alternative indentation style for `statement' Mon Feb 14 15:53:30 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-point): when defun-prompt-regexp is non-nil, b-o-d doesn't leave us at the brace, so we need to skip it as noise. * cc-mode.el (c-indent-defun): if defun-prompt-regexp is non-nil, beginning-of-defun won't leave us at the open brace, so we must skip over defun-prompt-regexp... its noise. Fri Feb 11 20:49:19 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): CASE 14.C, when looking for a ?: construct, and checking for not looking at a :: scope operator, make sure we do this comparison at indent-point, instead of the first non-blank line in the block * cc-mode.el (c-guess-basic-semantics): CASE 8C: if first stream-op is on a separate line (i.e. not on the `cout' line), it should be indented like a statement-cont, not a stream-op. Relpos in this case is boi of the first preceding non-syntactic-ws line * cc-mode.el: (c-backward-to-start-of-if) (c-backward-to-start-of-do) (c-guess-basic-semantics): It is not enough to search test for looking-at "keyword\\b" since this will not catch "keyword_thing", which is a valid symbol and not a keyword. There is no equivalent of \\b that matches at the end of a word-or-symbol string. For now, I changed the looking-at's to "keyword\\b[^_]" which seems to work. There are probably instances of "keyword\\>" that are broken too, but we'll hit them as they occur, since I'm not sure they are broken. Thu Feb 10 23:30:11 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-populate-syntax-table): only put c-mode/c++-mode common syntax entries into syntax table. (c++-mode-syntax-table): colon (:) gets symbol class * cc-mode.el: (c-mode-hook) (c++-mode-hook) (c-mode-common-hook): added defvars for completeness. Wed Feb 9 17:48:21 1994 Barry A. Warsaw, ITB (warsaw@anthem) * Public release: 3.229 * cc-mode.el (c-electric-braces): when calculating the initial semantics of the open brace, we only need to insert a temporary newline if there is non-whitespace preceding the brace, on the same line. * cc-mode.el (c-guess-basic-semantics): CASE 4I, don't add `inclass' semantics to the list since the relpos already has any inclass offset added in. Otherwise we get inclass offsets added twice. * cc-mode.el (c-guess-basic-semantics): fixed small problem introduced in version 3.235. when skipping lexical whitespace, we must skip [ \t\n]. newline wasn't getting skipped. Tue Feb 8 22:05:48 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c-offsets-alist) (c-offsets-alist-default): added `friend' syntactic symbol for recognition of C++ friend declarations. Default offset is 0. (c-guess-basic-semantics): recognize C++ friend declarations, and add `friend' syntactic symbols as a modifier. * cc-mode.el (c-guess-basic-semantics): when narrowing out enclosing class, and calculating start of region to narrow to, do not skip all syntactic ws, just lexical whitespace (change c-forward-syntactic-ws call to skip-chars-forward). Otherwise, you could skip into the middle of a C comment block and not figure out that what you're looking at is a `c' syntactic symbol. * cc-mode.el: (c-offsets-alist) (c-offsets-alist-default) (c-guess-basic-semantics): added defun-block-intro syntactic symbol which controls indentation for the first line in a top-level defun, analogous to statement-block-intro. (CASE 14.E) * cc-mode.el (c-indent-defun): catch any errors that occur in c-indent-exp and make sure point is restored and the temporary mark is destroyed. * cc-mode.el: (c-untame-characters) (c-backscan-limit) (c-tame-insert) (c-tame-comments) (c-emacs18-fsws) (c-emacs18-bsws) (c-emacs18-il): moved these defuns and vars to cc-mode-18.el file. (c-mode-map): do not install Emacs 18-only bindings (c-populate-syntax-table): do not install Emacs 18-only syntax table entries (c-insert-and-tame): renamed to c-insert-special-chars and make this call only self-insert-command. Don't worry about Emacs 18 compatibility. (c-mark-function) (c-common-init): Don't worry about Emacs 18 compatibility. (c-emacs19-accurate-fsws): renamed to c-forward-syntactic-ws. Don't worry about Emacs 18 compatibility. (c-emacs19-accurate-bsws): renamed to c-backward-syntactic-ws. Don't worry about Emacs 18 compatibility. (c-8bit-il): renamed to c-in-literal. Don't worry about Emacs 18 compatibility. (c-submit-bug-report): remove reporting of c-backscan-limit and c-untame-characters since these are for Emacs 18 only. Wed Feb 2 00:00:40 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-arglist): add kludge for arglist-cont-nonempty to get correct indentation. (c-guess-basic-semantics): CASE 5D: arglist-cont-nonempty's relpos needs to be boi of containing-sexp paren. this is good for + offset, but bad for c-lineup-arglist, so add the kludge described above. Tue Feb 1 22:14:35 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-inside-bracelist-p): enum keyword could be preceded by a typedef keyword * cc-mode.el (c-comment-region): removed as obsolete, use comment-region instead. Put the new comment-region function in, but commented out. * cc-mode.el (c-default-macroize-column): changed to c-backslash-column. Default value changed to 48 from 78. This is merged from c-mode.el (c-macroize-region): changed to c-backslash-region for c-mode.el merge. Mon Jan 31 22:57:05 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): CASE 8B.3: instead of try-block-open, which is now gone, put statement-cont, block-open on semantics list. Eventually I may call a recognition hook, and/or exceptions probably fall through to here. * cc-mode.el (c-guess-basic-semantics): CASE 5E. go to beginning of statement before looking getting relpos, so that we properly pick up nested argument lists. * cc-mode.el (c-common-init): better setting up of Lucid menubar (use mode-name as menu bar title) (c-popup-menu): use mode-name in menu title * cc-mode.el (c-keep-region-active): shouldn't check for interactive-p in tests (c-submit-bug-report): don't keep region active. * cc-mode.el (c-keep-region-active): no-op for FSF 19 (c-set-style) (c-beginning-of-statement) (c-end-of-statement) (c-up-conditional) (c-backward-conditional) (c-forward-conditional) (c-popup-menu): added a call to c-keep-region-active (c-tame-comments) (c-indent-command) (c-indent-exp) (c-indent-defun) (c-indent-region) (c-macroize-region) (c-comment-region): removed call to c-keep-region-active Sun Jan 30 20:22:09 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-mode-map): remapped c-toggle-hungry-state to C-c C-d so it would not interfer with standard C-c C-h key prefix help mapping Fri Jan 28 22:16:29 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-switch-label-key): fixed what can occur between the `case' keyword and the colon. Its any amount of whitespace, followed by a single, non-whitespace character, followed by any number of other characters. Thu Jan 27 21:15:57 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-fill-paragraph): much better for C++ style comments. 1. does not munge up font-lock regions by inserting/deleting the intended fill-prefix. 2. does not assume that leading whitespace before // is spaces, *but* fill-prefix must be consistent for every line in the region. * cc-mode.el (c-mode-menu): moved this higher up in file * cc-mode.el (c-end-of-statement): simple paren mismatch in call to c-beginning-of-statement * cc-mode.el (c-guess-basic-semantics): CASE 2, skip over any preceding blank lines that can occur before the comment. This fixes comment indentation for the second and following paragraphs in a multi-paragraph C block comment region with no leading stars. (c-lineup-C-comment): don't assume relpos is at the beginning of the line (even though it usually is). * cc-mode.el (c-switch-label-key): simplify description of what can follow a 'case' tag * cc-mode.el: Use copy-alist instead of c-copy-sequence * cc-mode.el (c-common-init): fix the way c-mode-menu is added to the Lucid menubar so existing menubars aren't clobbered * cc-mode.el (c-copy-sequence): workaround for FSF 19.22 bug in copy-sequence Wed Jan 26 22:38:20 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-comment): renamed from c-indent-for-comment (c-lineup-comment): call c-comment-indent when a comment-only line's indentation is at or to the right of comment-column. (c-guess-basic-semantics): when a comment-only line's indentation is at or to the right of comment-column, only 'comment-intro is on the semantics list since the comment does not indent relative to a non-comment line would get indented. * cc-mode.el (c-lineup-arglist): now correctly handles arglist-close langelems (i.e. closing parens in an arglist) * cc-mode.el (c-offsets-alist-default): new constant containing unchanging default settings for langelems (c-offsets-alist): value is set as a distinct copy of c-offsets-alist-default. (c-set-style): if 'c-offsets-alist is found in style, first reset the value of this variable to c-offses-alist-default, then change only those langelems that differ. * cc-mode.el (c-style-alist): changed defconst to defvar. removed comments from c-mode merge * cc-mode.el (c-indent-region): minor format change * cc-mode.el (c-indent-region): merged in RMS's latest c-indent-region. Added a skip of blank lines before the current line is indented. Recalculate beginning-of-defun lim inside of top-level while loop so that back-parsing is further restricted properly, speeding indentation calculation. Tue Jan 25 18:01:01 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-fill-paragraph): small fix to RMS's paren level typo * cc-mode.el (c-fill-paragraph): fixed (hopefully) obvious parenthesis level typo * cc-mode.el (c-fill-paragraph): added RMS's new C++ aware version (c-mode-map): put back the binding of M-q to c-fill-paragraph Mon Jan 24 22:52:53 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-update-modeline): typo: use c-hungry-delete-key * cc-mode.el (c-auto-hungry-string): minor-mode-alist variable (c-common-init): auto-hungry designation string happens on minor-mode-alist now (c-update-modeline): sets the c-auto-hungry-string * cc-mode.el (c-electric-semi&comma): only re-indent line when c-auto-newline is non-nil * cc-mode.el (c-mode-menu): new Lucid menu variable for popup and menubar (c-popup-menu): command for popping up a menu in Lemacs (c-mode-map): FSF 19's menu initialization stuff is moved to here. Add binding for Lemacs to put c-popup-menu on button 3. (c-common-init): put c-mode-menu on buffer-local menubar for Lucid Fri Jan 21 22:36:03 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c-up-block) (c-down-block): removed. backward-up-list and down-list do the job already * cc-mode.el: (cc-mode.el) comment improvements (c-mode-map): a few merges from lemacs, but commented out for now. (c-insert-brackets) (c-insert-braces): taken from lemacs, but commented out for now (cc-mode.el): menus added from FSF emacs. Still need menus for lemacs. Fri Jan 14 18:59:57 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-mode.el): fixed typo on make-obsolete-variable * cc-mode.el (cc-mode.el): added all make-variable-obsolete calls Thu Jan 13 23:25:57 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): CASE 8A substatement. relpos is boi of placeholder * cc-mode.el (c-beginning-of-statement-1): skip back over syntactic ws before checking bobp in while condition Wed Jan 12 14:24:11 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-mode.el): only v19 has the make-obsolete calls * cc-mode.el (c-guess-basic-semantics): CASE 8B.3 now returns a try-block-open, but exceptions aren't yet fully supported. * cc-mode.el (c-beginning-of-statement): when in a comment, or looking at the beginning of a comment, only call forward-sentence if not called interactively. Thus programmatically, this function always goes back to the real beginning-of-statement. * cc-mode.el (cc-mode.el): changes to comments at top of file * cc-mode.el: (c-common-init) (c-style-name) (c-set-style): removed c-style-name, and no longer put style name on minor mode list * cc-mode.el: (c-set-style) (c-style-alist): vastly verbosified docstrings Tue Jan 11 23:50:45 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-offsets-alist): vastly verbosified docstring. (cc-mode.el): LANGELEM in docstrings are changed to "syntactic element symbols" for clarity (?!) * cc-mode.el: (c-electric-colon) (c-offsets-alist) (c-macroize-region) (c-block-comments-indent-p) (c-untame-characters) (c-toggle-auto-state) (c-toggle-hungry-state) (c-macroize-region): minor docstring mods * cc-mode.el (c-electric-colon): minor docstring mod (c-submit-bug-report): removed c-auto-hungry-initial-state from reported var list * cc-mode.el (c-offsets-alist): improve the docstrings for brace-list-* langelems * cc-mode.el (c-auto-hungry-initial-state): obsolete variable, use c-auto-newline and c-hungry-delete-key variables instead (c-mode) (c++-mode): run-hooks is now the last thing (c-set-auto-hungry-state) (c-make-region-active): removed (c-keep-region-active): is now a defun (c-update-modeline) (c-calculate-state): added (c-toggle-auto-state) (c-toggle-hungry-state) (c-toggle-auto-hungry-state): simplified vastly. also, docstrings now explain what the features do. * cc-mode.el (cc-mode.el): added an fset of c++-beginning-of-defun for lemacs 19.9 lossage * cc-mode.el (c-cleanup-list): improved docstring, when do clean ups take place? * cc-mode.el (c-cleanup-list): minor docstring typo fix * cc-mode.el (cc-mode.el): changed FSFmacs to FSF Emacs * cc-mode.el: added my name to 1993 and 1994 copyrights Mon Jan 10 22:10:11 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-set-offset): conversion of offset to a number in the interactive list glom section was missing negative numbers due to the leading minus sign * cc-mode.el (c-beginning-of-statement-1): on error, skip backwards over +!~ in addition to other chars skipped Sat Jan 8 03:20:49 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-electric-pound): fixed after-functionality positioning when point is at bolp before # is installed * cc-mode.el (c-guess-basic-semantics): CASE 13, inline-close relpos should be boi of the beginning-of-statement relpos * cc-mode.el (c-beginning-of-statement-1): only do the skip-chars-backwards in the failure of the condition-case statement. also, add the `-' character to the list of skippage Fri Jan 7 23:27:20 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-beginning-of-statement-1): do not let backward scanning stop inside a literal. use c-in-literal to stop this, which really catches only preprocs * cc-mode.el (c-guess-basic-semantics): CASE 13, block-close relpos should be boi of relpos to catch "} else {" constructs * cc-mode.el: (c-forward-conditional) (c-indent-region) (c-beginning-of-inheritance-list) (c-backward-to-start-of-do) (c-backward-to-start-of-if): removed unused let-bound variables as per output of byte compiler * cc-mode.el: better messages about the necessary makunbounds Thu Jan 6 18:52:51 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-beginning-of-statement-1): recognize "else if" clauses (c-guess-basic-semantics): CASE 8A recognizes "else if" clauses Mon Jan 3 23:01:58 1994 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: upped the copyright notice date * cc-mode.el (c-beginning-of-statement-1): before calculating last-begin, skip over any bogus characters like *&:. for the following situations: if(::foo(), if(.0123, if(&blatz, if(*bar, * cc-mode.el (c-guess-basic-semantics): CASE 8A. do and else clauses aren't followed by a paren list, so we should only skip forward over 1 sexp in those cases. Wed Dec 29 18:06:12 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-lineup-multi-inher): skip syntactic ws if there is only a comment on the end of the line containing the opening colon * cc-mode.el (c-guess-basic-semantics): CASE 5C, don't check for c-conditional-statement, since only "for" can have multiple substatements * cc-mode.el (c-guess-basic-semantics): CASE 8: added colon to list of characters that don't continue a statement, all other cases will be caught later on (I hope). * cc-mode.el (c-guess-basic-semantics): rewrote and re-arranged CASE 5 subcases to correctly identifiy for-list substatements, etc. looks like paren-lists now work pretty well. Tue Dec 28 16:36:06 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): fixed CASE 5C to use new semantics for c-beginning-of-statement. * cc-mode.el (c-beginning-of-statement-1): make sure searching stops correctly at conditional statements (if/while,...etc) so that substatements are properly recognized * cc-mode.el (c-beginning-of-statement): make sure we're left at or after lim * cc-mode.el: (c-electric-brace) (c-electric-slash) (c-electric-star) (c-electric-semi&comma) (c-electric-colon): let-bind c-echo-semantic-information-p to nil to shut up information printing in inappropriate places * cc-mode.el (c-guess-basic-semantics): fixes to CASE 8 for new semantics of c-beginning-of-statement. Added a test of placeholder != containing-sexp in top-level test. CASE 8D, progn => save-excursion so correct statement start can be found * cc-mode.el: (c-beginning-of-statement) (c-end-of-statement): minor clean up. removed my old c-beginning-of-statement -- we'll go with FSF's and fix it as need bee Mon Dec 27 23:25:17 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c-beginning-of-statement) (c-end-of-statement): add another optional argument, lim (c-guess-basic-semantics): corrected to use new arg list for the above * cc-mode.el: (c-beginning-of-statement) (c-end-of-statement): check for argument == nil (optional arg not supplied) * cc-mode.el: (c-beginning-of-statement) (c-end-of-statement): make arg optional * cc-mode.el (c-beginning-of-statement, et al): try using BOCM's version to see if it works any better * cc-mode.el (c-set-style): put a space in front of c-style name (c-common-init): only hack on c-style-name once! * cc-mode.el: provide cc-mode, not c-mode * cc-mode.el (c-style-name): new variable, buffer local (c-common-init): hack on c-style-name to the minor-mode alist (c-set-style): set c-style-name variable for minor-mode * cc-mode.el (c-conditional-key): added "switch" (c-guess-basic-semantics): renumbered CASE 8 subcases, no substantive changes. (c-guess-basic-semantics): added dummy CASE 8B.3 to generate an error. I don't know what constructs fall through this case. * cc-mode.el (c-symbol-key): put this back in and fixed all the other -key's to use it * cc-mode.el (c-set-auto-hungry-state): small typo in check for force-mode-line-update * cc-mode.el: use force-mode-line-update where appropriate * cc-mode.el: added autoload directives Wed Dec 22 20:52:32 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-inside-bracelist-p): fixed a bug when no spaces were between the = char and open brace in an aggregate list * cc-mode.el (c-switch-label-key): fixed to recognize negative numbers * cc-mode.el: (c-forward-into-nomenclature) (c-backward-into-nomenclature): new commands, but as yet unbound * cc-mode.el (c-guess-basic-semantics): CASE 7C: look for block-open modifier Tue Dec 21 22:55:21 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): CASE 7 improved but nested brace-lists are still not perfect. Do I need to add another langelem??? blech. * cc-mode.el (c-inside-bracelist-p): new function to calculate whether we're inside a brace list or not (c-guess-basic-semantics): use c-inside-bracelist-p where appropriate * cc-mode.el (c-guess-basic-semantics): CASE 7B's (brace-list-close) relpos is not boi of bo-stmt, instead its boi of containing-sexp * cc-mode.el (c-offsets-alist): added brace-list-close, brace-list-intro, brace-list-entry (c-guess-basic-semantics): added logic to recognize brace-list-open new langelems * cc-mode.el (c-hanging-braces-alist): docstring addition: brace-list-open (c-offsets-alist): added brace-list-open (c-electric-brace): added logic to hang brace-list-open's (c-guess-basic-semantics): added logic to recognize brace-list-open's * cc-mode.el (c-mode-map): removed binding to undefined c-match-paren * cc-mode.el (c-semantics): new variable (c-indent-via-language-element): use globally advertised c-semantics variable now. (c-offsets-alist): better docstring, describes c-semantics * cc-mode.el (c-adaptive-block-open): new function, but block-open doesn't use it by default yet (c-guess-basic-semantics): moved M2 (block-open) test into body of defun instead of at the end -- to many special case tests Mon Dec 20 17:55:38 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-indent-command): guarantee that c-tab-always-indent == nil has the same semantics as in BOCM * cc-mode.el (cc-mode.el): pulled in bocm's beginning-of-statement, end-of-statement and related defuns, but I still need to make a pass through them. (c-up-conditional) (c-backward-conditional) (c-forward-conditional): yanked in verbatim from c-mode.el (c-backslash-region): fset from c-macroize-region. also, we're leaving c-backslash-column commented out. use c-default-macroize-column instead. * cc-mode.el (c-fill-paragraph): removed, use filladapt instead (c-comment-indent): adopted from c-mode.el, but fixed to handle C++ comments * cc-mode.el (c-mode.el): moved some defuns and defmacros around. no substantive changes * cc-mode.el (c-symbol-key): obsolete, use \\s_ syntax class instead (c-protection-key): new defconst (c-case-statement-key): renamed to c-switch-label-key * cc-mode.el (c-lineup-streamop): search for stream operator, be careful of singular less than, greater than symbol. Fri Dec 17 21:42:27 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed semantics for c-macroize-region and c-comment-region * cc-mode.el (c-guess-basic-semantics): don't put block-open on semantics list if other brace open symbols are already there Thu Dec 16 20:49:34 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-emacs-features): minor docstring change * cc-mode.el (c-set-offset): new optional add-p arg. when non-nil, require-match on completion is inhibited and new langelem symbols can be added to the c-offsets-alist. (c-guess-basic-semantics): CASE 7C has been extended to properly recognize conditional's substatements. CASE 7D now handles continued statements. CASE 7A now recognizes only func local class opening braces, which means 7C + M2 will catch substatement block-opens. (c-offsets-alist): added substatement langelem * cc-mode.el (c-strict-semantics-p): default value to nil for debugging purposes (c-guess-basic-semantics): block-open langelem is now a relpos-less langelem because it is really a modifier on the basic langelem of the line. Specifically: Case M2 added; CASE 7A.2 now places just a statement-cont langelem on semantics; CASE 13.B is completely removed. (c-offsets-alist): block-open default offset is now 0. Mon Dec 13 15:29:26 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): now it does the the test for c++-mode to save a potential funcall in c-mode. (c-search-uplist-for-class): fixed bug where c-in-literal test was testing end-point of parse-partial-sexp, not the classkey search begin point. Thu Dec 9 19:02:25 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-mode-map): fixed FSF call to set-keymap-parent * cc-mode.el (c++-mode-map): JWZ contributed a better way to share keymaps for v18 using nconc (c-populate-map): obsolete, move all define-keys into c-mode-map if statement * cc-mode.el (c-emacs-features): for Emacs 19's, add a flavor member to distinguish between FSF19 and Lucid19. (c++-mode-map): for Emacs 19's, inherit c++-mode-map from c-mode-map. Handle FSF/Lucid properly and handle GNU18 the hard way. Wed Dec 8 22:43:02 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-down-block): changed call of c-beginning-of-block to c-up-block * cc-mode.el: (c-populate-map) (c-populate-syntax-table): new funcs to consolatate setting these structures (c-mode-map) (c++-mode-map): get as close as we can with BOCM's mappings, but there are still some inconsistencies I need to clean up Tue Dec 7 23:52:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-set-style): added functionality (c-macro-expand): added autoload (documentation and docstrings): updated many places (c-set-offset): better interactive spec (c-fill-paragraph): stolen from c-mode, but not looked at yet (cc-mode.el): added fset compatibility with c-mode NOTE: THERE ARE STILL SOME FUNCTIONS I HAVEN'T MOVED HERE YET. Mon Dec 6 15:46:30 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c-guess-basic-semantics): CASE 5D is only a statement-cont if the beginning-of-statement is not bound by continued-sexp * cc-mode.el: fixed a coupble of cc-emacs-features to c-emacs-features Fri Dec 3 23:05:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-mode.el): changed all symbols from cc-<thing> to c-<thing>, except where both c-<thing> and c++-<thing> are needed: c++-mode-abbrev-table, c++-mode-map, c++-mode-syntax-table, (c-mode-common-hook): new common hook name (c-mode-map): don't add c-scope-operator. Thu Dec 2 00:59:34 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-guess-basic-semantics): CASE 7B, its possible that the line that placeholder points to does not contain the first streamop. This can be the case if the streamop line follows an `if' clause. Wed Dec 1 23:35:44 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-macroize-region): simplified so begin/end semantics are identical to cc-comment-region. (cc-backslashify-current-line): do not (forward-char -1) if eol == bol. Also, must let-bind kill-lines-magic to nil so that blank line, with only a \ on it will not consume the newline character Mon Nov 29 22:50:30 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-indent-region): only generate an error on non-open paren/brace when shutup-p is nil * cc-mode.el: (cc-uncomment-region) (cc-comment-region): combined into 1 function, bound to C-c C-c and behavior analogous to cc-macroize-region. (cc-up-block) (cc-down-block): new commands, bound to C-c C-u and C-c C-d respectively. * cc-mode.el (cc-indent-exp): don't indent line with cc-indent-via-language-element if line is blank * cc-mode.el (cc-electric-brace): use (boundp 'blink-paren-function) as emacs version test, not cc-emacs-features. The latter breaks on Emacs18's with the syntax patch * cc-mode.el (cc-guess-basic-semantics): fixed the comment-intro regexp to ignore newlines. (spaces and tabs only) Fri Nov 26 19:01:34 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-search-uplist-for-classkey): fixed two small bugs. first, the cdr of foundp should be cc-point boi to catch any template prefix on the class key (remember we're searching backwards now -- maybe we should search forward, eh?). Also, we have to set donep to (not foundp) so that the search ends when we haven't found any classkey * cc-mode.el (cc-guess-basic-semantics): CASE 13.D make sure we're not looking at a globally scoped function call * cc-mode.el (cc-guess-basic-semantics): arglist-close should relpos boi of containing-sexp (cc-change-semantic-symbol-offset): fixed setqcdr typo (cc-offsets-alist): arglist-close default is now + * cc-mode.el (cc-beginning-of-statement): fix problem when crossing a paren level (i.e. the cc-safe forward-sexp call fails). just move back a space and keep going. (cc-guess-basic-semantics): expand CASE 5C test and CASE 5E relpos calculation Wed Nov 24 22:54:31 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-safe): added this macro back in -- it seems to be useful (cc-beginning-of-statement): really improved this a lot. we only go back a sexp if we aren't already at the beginning of indentation. This is now a more generally useful function since it seems to do the right thing under all circumstances. (cc-guess-basic-semantics): lots of changes to use the new cc-b-o-s function. All known indentations after hanging braces are now fixed. This includes case 4D.5, CASE 7, CASE 12, and CASE 13.F. Are there others? * cc-mode.el (cc-offsets-alist): added knr-argdecl offset (cc-change-semantic-symbol-offset): allow addition of new langelem symbols with universal arg (cc-guess-basic-semantics): added recognition of subsequent knr-argdecl langelems in cc-c-mode only * cc-mode.el (cc-electric-brace): in brace-else-brace cleanup, I forgot to insert the new "} else {" string after deleting the old string! * cc-mode.el: (cc-back-block) (cc-safe-uplist) (cc-safe-downlist): obsolete (cc-search-uplist-for-classkey): completely rewritten for speed. it now uses re-search-backwards limited to two bod's back. Orders of magnitude faster when operating towards the end of a large file. In fact exec time is not buffer size dependent anymore (but like everything else, it is bod dependent of course). (cc-guess-basic-semantics): fixed cases 4, 7, and 12 to work with the new cc-search-uplist-for-classkey Tue Nov 23 22:41:41 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-guess-basic-semantics): fixed case 4F. if a class-close is found, it should indent relative to the class declaration, not the opening brace (i.e. the cdr of inclass-p, not the car) * cc-mode.el (cc-guess-basic-semantics): fix CASE 12's determination of the type of langelem that a brace closes. * cc-mode.el (cc-c++-mode-syntax-table): switched A/B comment styles as per Paul Smith's FSFmacs patch (cc-1bit-il): switched A/B comment styles as per Paul Smith's FSFmacs patch * cc-mode.el (cc-search-uplist-for-classkey): only search when in a C++ buffer. C buffers have no enclosing class! * cc-mode.el (cc-electric-pound): oops, forgot to prefix-numeric-value arg on the self-insert-command * cc-mode.el (cc-mark-function): must funcall the second call to push-mark since v18 only accepts 2 arguments, not the 3 of v19. (cc-electric-brace): fix the blink-paren-function/-hook mismatch for v18 vs. v19. (cc-point): added the (,@ nil) form as a workaround for v18's backquote bug. Doesn't seem to hurt us for v19 so I left it in for everyone. Mon Nov 22 23:29:19 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-guess-basic-semantics): CASE 12, always return boi of the line that containing-sexp is on, not just for block-close langelem * cc-mode.el (cc-search-uplist-for-classkey): make backward searching slightly more efficient by stopping when char under search-start is a close brace * cc-mode.el (cc-label-key): new constant, change all concat'd label regexps to use this new constant (cc-guess-basic-semantics): fix case 13.D to not accidentally code a statement that follows a label as a ?: construct * cc-mode.el (cc-indent-command): fixed behavior when cc-tab-always-indent was nil. should now be like old behavior (CASE 1) * cc-mode.el (cc-emacs-features): improve documentation * cc-mode.el (cc-point): retain quoted symbol semantics on argument but don't use dangerous `eval' to get an eq ready symbol * cc-mode.el (cc-indent-exp): better error messages so people don't get as confused * cc-mode.el (cc-beginning-of-statement): much more robust movement across balanced expressions now correctly finds the beginning of statements for very complex forloops and more. We now no longer assume that expressions begin and end on a single line. (cc-guess-basic-semantics): CASE 5C is expanded to correctly locate multi-line mathematical paren groupings. Also, CASE 5E now returns boi at the beginning-of-statement for any arglist-cont. * cc-mode.el: (cc-electric-brace) (cc-electric-slash) (cc-electric-star) (cc-electric-semi&comma) (cc-electric-colon) (cc-change-semantic-symbol-offset): changed docstrings to more accurately describe defuns' behavior * cc-mode.el (cc-indent-exp): calculate bod before doing the forward-sexp since unindented open parens in col0 lower down will mess this calculation up. Sat Nov 20 21:53:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-submit-bug-report): typo on cc-hanging-colons-alist * cc-mode.el: (cc-keep-region-active) (cc-make-region-active): split this into a macro (the former) and a defun (the latter). This way we can check for interactivity as expected, but still cut down on the number of bc warnings. * cc-mode.el: (cc-setup-comment-indent-variable) (cc-keep-region-active): make these defuns so that the .elc file won't be editor version specific. The trade off is that the byte compiler will complain * cc-mode.el (cc-lineup-C-comments): limit re-search-forward to eol, not eol-1... why did we do this? * cc-mode.el: (cc-electric-brace) (cc-electric-semi&comma) (cc-electric-colon): re-indent the line even if cc-auto-newline is nil, just don't add any newlines * cc-mode.el (cc-offsets-alist): multi-line strings should be shoved against the left side margin * cc-mode.el (cc-setup-comment-indent-variable): new macro to cut down on byte compiler warnings * cc-mode.el (cc-case-statement-key): should now recognize character constants as arguments to case statement * cc-mode.el (cc-keep-region-active): support for FSFmacs and don't lay down calls to variables that don't exist (cc-submit-bug-report): variable typos * cc-mode.el: fixed order of macro expansions. defmacro's must appear before their first use -- this is probably why cc-point was busted in compiled code Fri Nov 19 18:44:54 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-guess-basic-semantics): added some minimal recognition of template continuation lines. Probably not so great. (cc-guess-basic-semantics): fixed top-level decl continutation lines (cc-guess-basic-semantics): fixed ?: constructs * cc-mode.el: (cc-c++-mode) (cc-c-mode): setq'ing of comment-start/-end must happen *after* cc-common-init for those values to retain their proper settings (cc-indent-exp): add optional SHUTUP-P argument to suppress operational messages. (c++-indent-exp): removed this commented out function. I think the byte-compiled, simplified cc-indent-exp is fast enough! (cc-indent-region): stolen from c-mode and fixed. (cc-beginning-of-inheritance): backscanning must stop when we're looking at a cc-class-key (cc-guess-basic-semantics): inher-intro and inher-cont should not have inclass langelem added since their relpos offsets already contain any inclass offset Thu Nov 18 23:06:37 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (cc-change-semantic-symbol-offset): new command * cc-mode.el (cc-guess-basic-semantics): added recognition of 'block-open braces following a full statement (yup they are legal) * cc-mode.el (cc-lineup-C-comments): added to support old cc-C-block-comments-indent-p behavior * cc-mode.el: removed the multi-line preprocessor stuff. its just too much of a hack right now * cc-mode.el: some limited support for multi-line macros and such Wed Nov 17 23:29:41 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed all byte-compiler warnings. did a pass through the comments and docstrings. macro-ized a few more defuns * cc-mode.el (cc-indent-exp): a slow, but moderately useful interrim solution. * cc-mode.el (cc-point): another small fix to the macro to get byte compilation to work * cc-mode.el (cc-point): small fix to macro expansion. must eval position so that 'sym idiom still works * cc-mode.el: added cc-keep-region-active to all appropriate interactive defuns * cc-mode.el (cc-point): made this a macro so things should be much quicker when byte compiled * cc-mode.el (cc-electric-brace): insert any after-brace newlines after all cleanups have taken place * cc-mode.el (cc-electric-colon): semantic information can only be accurately retrieved on the line with colon for label, case-label, and access-key. member-init-intro and inher-intro must be gathered from the following line. * cc-mode.el: (cc-electric-start) (cc-electric-slash): use cc-indent-via-language-element instead of cc-indent-line Tue Nov 16 23:04:59 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-electric-colon): deleted * cc-mode.el (cc-electric-brace): inhibit blinking any close paren until we've done all our magic, then just call blink-paren-function manually * cc-mode.el (cc-guess-basic-semantics): CASE 4 was missing a call to cc-backward-syntactic-ws which broke arglist indentations * cc-mode.el (cc-beginning-of-statement): catch multi-line function calls by going backward over balanced () sexps * cc-mode.el: had to add all the lineup functions from c++-syntax.el * cc-mode.el: continued if/while/do/else/for statements now work again * cc-mode.el: 1. a good shot at cc-electric-colon 2. added cc-scope-operator bound onto C-c C-; * cc-mode.el: everything is rewritten and tested except c++-electric-colon and c++-indent-exp Thu Nov 11 21:24:06 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: got rid of glaring byte-compiler reported problems. * cc-mode.el: The bulk of the rename work has been done. The entire mode has been renamed CC-Mode. The file has been renamed cc-mode.el, and all symbols have changed from c++-<thing> to cc-<thing>. In addition, all known remaining c-mode dependencies have been eliminated. There is still much work to be done. Tue Nov 9 22:26:06 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: rough attempt at syntactic analysis. more to come Mon Nov 1 03:25:12 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-search-uplist-for-classkey): restore point if no enclosing class is found Sun Oct 31 19:14:59 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c++-narrow-out-enclosing-class) (c++-search-uplist-for-classkey): new defuns (c++-point): added 'boe and 'eoe positions Fri Oct 29 22:42:35 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: totally screwed up indentation. we're going to have to back out the last few mods. URG! * cc-mode.el (c++-indent-exp): special case of looking at ?{, should not add c-indent-level since this is only for C statements wrt containing block and not block opening paren * cc-mode.el (c++-calculate-indent): undid split from previous revision. now case 3A always returns 0. Any additional top-level brace offset gets applied in c++-indent-line and c++-indent-exp (although the later does not yet work). * cc-mode.el (c++-calculate-indent): needed to split case 3A into 2 parts since bobp does not get the same indent as a top-level opening paren Wed Oct 27 14:28:16 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-common-init): don't set the auto-hungry state here since the mode hook has not been run yet. (c++-mode) (c++-c-mode): set the auto-hungry state for the buffer after the mode hook has been run Wed Oct 20 18:46:53 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-mode-map): do NOT define C-m and C-j, so as to retain the standard default settings for these keybindings Mon Oct 11 16:32:02 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-calculate-indent): in CASE 3C, when checking for hanging member init colon, but not scope operator, we didin't check for double colons when looking at the preceding-char. Now look at char before point and char 2 before point. If both are colons, we're looking at a scope operator. Fri Oct 1 13:21:00 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-common-init): changed the test for comment-indent-function to checking for boundp of the variable instead of c++-emacs-features since Emacs 18 with syntax patches is (8bit v19) but does not have the variable bound. Wed Sep 29 21:08:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-backward-to-start-of-if): better error message for else with no if * cc-mode.el (c++-calculate-indent): test case 3H, when taking the current-column, must subtract out the inclass-shift so it doesn't get added twice. inclass-shift is implicit in current-column. Tue Sep 28 23:11:04 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-mode-syntax-table): don't be as harsh on FSF * cc-mode.el: (c++-cleanup-list) (c++-hanging-member-init-colon) (c++-auto-hungry-initial-state) (c++-auto-hungry-toggle) (c++-mode): use the terminology "valid" instead of "legal" to define acceptable values as per RMS's conventions. * cc-mode.el (c++-c-mode): improve the docstring re: running the hook * cc-mode.el (c++-indent-exp): use c++-cont-indent to calculate continued statement indentation amount. remove large part of hackery here so lets watch and see if anything got broken, but I think c++-c-i should do the trick for all constructs * cc-mode.el (c++-indent-defun): better, quicker implementation of this defun * cc-mode.el (c++-electric-pound): better implementation of previous patch * cc-mode.el (c++-electric-pound): only align pound to left column if there isn't one already there. This lets people enter ## as cpp concat command * cc-mode.el (c++-electric-semi): renamed c++-electric-semi&comma to implement }, and }; cleanups (c++-cleanup-list): added list-close-comma to allow cleanups of }, constructs. * cc-mode.el: cleaned up some comments * cc-mode.el (c++-common-init): new function to provide one entry point for all common initializations of the mode. (c++-mode) (c++-c-mode): use c++-common-init to do the common stuff, then do mode specific stuff. * cc-mode.el (c++-calculate-indent): complete fix for proper indentation of base classes in a multiple inheritance declaration. (c++-baseclass-key): new constant defining regexp for base class defs * cc-mode.el: partial fix for multi-inher lines Mon Sep 27 19:15:51 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-backward-to-start-of-if): give a more informative message if an unbalanced if/else was found * cc-mode.el (c++-compound-offset): fixed a bug when looking at "typedef enum", this wasn't registering as an enum start. (c++-indent-exp): fixed indentation of comma separated compound statements by using the function c++-compound-offset to calculate offset instead of just using the variable c-continued-statement-offset * cc-mode.el (c++-mode): compatibility with old style comment-indent-hook and new style comment-indent-function * cc-mode.el: (c++-indent-line) (c++-calculate-indent): improved calculate in let-body for open-paren and top-open-paren values, using car-safe and cdr-safe (c++-indent-line): fix typo bug when looking at open brace. (c++-indent-line): apply TOPLEVEL c-brace-offset when brace is at top level wrt class, or real top level. * cc-mode.el (c-brace-offset): moved here from c-mode.el (c++-mode): for vars c-brace-offset and c++-block-close-brace-offset, both can now take list values. describe these in the mode's docstring. (c++-indent-exp) (c++-indent-line) (c++-calculate-indent): when looking at an open brace, apply c-brace-offset depending on top-level-ness of the opening brace. Fri Sep 24 22:05:21 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-indent-exp): when inside a class definition, if we are looking at an open brace, we apply c-continued-brace-offset instead of just zero. this allows users to indent the opening brace of an inline function body. * cc-mode.el (c++-calculate-indent): when inside a class definition, if we are looking at an open brace, we apply c-continued-brace-offset instead of just zero. this allows users to indent the opening brace of an inline function body. * cc-mode.el (c++-calculate-indent): removed the commented out text which used to test for null state. we never hit null state from c++-parse-state anymore. * cc-mode.el (c++-emacs19-accurate-bsws): new function which skips syntactic whitespace w/o treating cpp macros as comments syntactically. (c++-emacs18-bsws): renamed from c++-backwards-syntactic-ws (c++-lemacs-pre19-8-bsws): renamed from c++-backwards-syntactic-ws-1 (c++-emacs18-il): renamed from c++-in-literal (c++-8bit-il): renamed from c++-in-literal-8-bit (c++-1bit-il): renamed from c++-in-literal-1-bit Changed the way compatibility is fset into the function symbols c++-backward-syntactic-ws and c++-in-literal. Tue Aug 10 16:44:26 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: minor cosmetic comment typo Thu Jul 29 00:18:00 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: consensus was to nuke c++-insert-header Mon Jul 12 20:37:27 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-mode.el): updated the comments at the top of the file * cc-mode.el (c++-calculate-indent): removed test for null state during initial parse from beginning-of-defun to indent-point. this is obsolete now. Fri Jul 2 22:42:03 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-mode-map): removed bindings to obsolete functions c++-beginning-of-defun and c++-end-of-defun. (c++-electric-terminator) (c++-in-literal) (c++-in-literal-8-bit) (c++-in-literal-1-bit) (c++-point) (c++-indent-defun): changed all references of obsolete functions c++-beginning-of-defun and c++-end-of-defun to beginning-of-defun and end-of-defun respectively. * cc-mode.el: (c++-match-header-strongly) (c++-defun-header-strong-struct-equivs) (c++-defun-header-strong) (c++-defun-header-weak) (c++-beginning-of-defun) (c++-end-of-defun): removed as obsolete. there are better and cheaper ways of accomplishing the same functionality. * cc-mode.el (c++-electric-brace): I missed a few calls to c++-indent-line. Added bod argument to remaining few. * cc-mode.el (c++-calculate-indent): removed logic dealing with (null state) and placed an error call there in anticipation of removal of header strong matching stuff. I want to be sure there's no way to get to this code (c++-electric-brace): added bod argument to calls to c++-indent-line so the correct bod is found, not the newly created one with the just inserted open brace. * cc-mode.el: (c++-indent-command) (c++-tab-always-indent) (c++-hanging-braces) (c++-mode): changed the not-nil-or-t language to read "other than nil or t" Thu Jul 1 17:40:53 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el (c++-backward-to-start-of-if): changed c++-backward-sexp call to backward-sexp now that parse-sexp-ignore-comments is handled correctly. Wed Jun 30 17:03:00 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c++-forward-sexp) (c++-backward-sexp): removed because these are obsoleted by the correct implementation for setting parse-sexp-ignore-comments. (c++-mode): improved idiom for setting up local vars Mon Jun 28 15:47:13 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: (c++-cleanup-list) (c++-mode) (c++-fast-backward-syntactic-ws-1) (c++-calculate-indent) (c++-in-literal) (c++-in-literal-8-bit) (c++-in-literal-1-bit) (c++-at-top-level-p) (c++-backward-to-start-of-do) (c++-backward-to-start-of-if) (c++-uncomment-region): install RMS's suggested doc string fixes based on last public release. Wed Jun 23 13:58:52 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: hacking on syntax entry must be mode specific in -ws functions. ie in c++-c-mode, hack c++-c-mode-syntax-table and for c++-mode hack only c++-mode-syntax-table. Mon Jun 21 21:40:15 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: should not skip-chars-backward in ws-2, let forward-comment handle that Fri Jun 18 21:31:24 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: another refinement to addition offset given to open brace lines in c++-indent-exp. Check for not at top level wrt class before adding c-indent-level. * cc-mode.el: another fix to c++-indent-exp for member init lists * cc-mode.el: fixed c++-indent-exp when comments follow a continued statement * cc-mode.el: a fix to c++-indent-exp where c-brace-offset is < 0 * cc-mode.el: fixed some comment spelling errors which were fixed (but *not* reported!) by FSF * cc-mode.el: fixed a problem where default_answer("boof: glorp"); was being incorrectly matched to a default: statement Thu Jun 17 21:52:21 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: update language to accurately reflect state of Lemacsen and FSFmacsen Wed Jun 16 22:27:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed indentation when base class declaration is on a separate line then the derived class intro header. * cc-mode.el: 1. cleaned up the way closing block braces are adjusted in c++-indent-line. 2. also extended c++-block-close-brace-offset to allow list value so the following style can be easily supported: foo(a) { if(a) { asasdfsdf; } } Previously, there was no way to adjust the closing brace into column zero. Tue Jun 15 22:04:43 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: use c-continued-statement-offset instead of c-indent-level to indent comma separated arg decl lists * cc-mode.el: bind C-m to newline-and-indent * cc-mode.el: much simplification on c++-fast-backward-syntactic-ws-2 to work with new forward-comment semantics * cc-mode.el: don't skip up past compound statement if we're in a member init list * cc-mode.el: fixed a bug in the translation of CASE 3 to cond stmt * cc-mode.el: 1. cleaned up the spaghetti if's in CASE3 of c++-calculate-indent, by converting all if's to a single cond statement -- I *hope* I got it right! 2. Added indentation, via c-indent-level of multi-line, comma-separated, compound statements/declarations, with correction for enum and static array inits. y Mon Jun 14 21:54:38 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: merged in submitted patch to fix a possible bug which rears its ugly head in FSFmacs19. I haven't verified it so the fix only happens in FSFmacs Thu Jun 3 22:42:44 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: try to conform to GNU cosmetic style Tue Jun 1 14:58:00 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: better to make a copy of the syntax table so we don't screw up text mode's syntax table! Fri May 28 22:20:57 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed the bug in c++-electric-brace where entering an open brace while point is at bol and c++-auto-newline is nil did not indent the brace. Tue May 25 18:37:21 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: some cosmetic differences to c++-emacs-features Mon May 24 23:23:05 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: take out bogus defun c++-emacs-features * cc-mode.el: be really really smart about figuring out c++-emacs-features * cc-mode.el: we must use a different c++-in-literal for GNU19's 1-bit solution Wed May 19 14:19:20 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: better c++-emacs-features deciphering Tue May 18 15:13:39 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: no c++-mode-maintainer Fri May 14 22:05:02 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: can't yet make c++-indent-exp work in weird situation (see bug reports) * cc-mode.el: make sure we check for default: in the same place we check for case: labels in CASE 4 of c++-calculate-indent Tue May 11 21:41:13 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: a little better documentation * cc-mode.el: fixed the compat cond when setting c++-backward-syntactic-ws * cc-mode.el: fixed the string-match call in c++-emacs-features Mon May 10 18:20:42 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: check for forward-comment first * cc-mode.el: fixed syntax errors in previous mod * cc-mode.el: attempt to port between all known flavors of emacsen Thu Apr 22 21:16:15 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: ask user if they want to submit a bug report before actually doing it * cc-mode.el: quick fix for when the ? part of a ?: construct is a negative number Wed Apr 21 19:53:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: use new interface to reporter.el Mon Apr 19 20:41:48 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: uuencode when sending to ftpmail * cc-mode.el: c++-mailer is obsolete now * cc-mode.el: modify c++-submit-bug-report to use reporter package, and require it. * cc-mode.el: updated some documentation about getting c++-mode Fri Apr 16 15:36:39 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: in c++-indent-exp, during the logic which evaluates special adjustments in the line's indentation, the sequential ifs should be a cond statement since the conditions should be mutually exclusive * cc-mode.el: updated mail-server (getting the mode) comments Fri Apr 2 15:35:10 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-backward-to-start-of-if wasn't taking into account "if" clauses in intervening comments. Needed to add a c++-backward-syntactic-ws Thu Apr 1 23:08:37 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: cleaned up (I hope) all docstrings related to auto-hungry features * cc-mode.el: modified c++-class-key to recognize typedef in addition to extern * cc-mode.el: fixed c++-electric-star handling of stars inside C block comments but not part of comment line head (i.e. stars embedded inside C block comment lines not at 'boi, don't re-indent line) Thu Mar 18 18:49:42 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fix infinite loop in c++-fast... in the following situation \n #define x \ -----------^ hit return here * cc-mode.el: wrap temporary binding of # to comment syntax in c++-fast-... in an unwind-protect to ensure that it gets reset on any exit Thu Mar 11 15:36:26 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed indentation of block comments after first /* line in c++-indent-exp Wed Mar 10 18:50:29 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-in-literal-quick wasn't checking for inside a string Fri Mar 5 20:00:17 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed regexps for case labels... I hope Thu Mar 4 23:00:30 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: updated copyright date * cc-mode.el: c++-c-mode uses c-mode-abbrev-table * cc-mode.el: in c++-fast-backward-syntactic-ws, check for lim<point *after* lim has be let bound Wed Mar 3 20:25:17 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: forgot to add basic inclass-shift Tue Mar 2 20:11:48 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: handle underscores in c++-inher-key * cc-mode.el: inclass-shift is now calculated by multiplying inclass-depth with the sum of c-indent-level and c-brace-imaginary-offset. Usually at least one of these c vars is zero. Also, precompute inclass-unshift * cc-mode.el: 1. fixed bogus end-of-buffer error when lim>=(point) 2. extended c++-class-key to include optional "extern" keyword * cc-mode.el: 1. extended c++-class-key to handle template definitions 2. made MI-regexp in c++-calculate-indent into the global constant c++-inher-key so it doesn't need to be concat'd every entry into the loop. * cc-mode.el: fixed small infinite loop introduced in previous patch * cc-mode.el: fixed c++-indent-exp when a multi-line C block comment caused calculation of state to be wrong. Now, when calculating line-end, we first check to see of eol is in a C comment, and if so, we scan forward until we find the end of the block comment. this algorithm might break if there is code on the same line, but after the closing */ of a comment. this is to bizarre to support * cc-mode.el: no longer rely on # being of syntax class comment for really patched emacses, except for convenience when in c++-fast-backward-syntactic-ws. Also, in this method, go into a loop checking for cpp directives since its possible that a directive has a comment on the end of the line: #include <foo.h> /* opening a block comment here * which isn't closed until here */ Finally, fix c++-in-literal-quick to handle new syntax class of # Mon Mar 1 23:32:40 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: no longer rely on # being of syntax class for really patched emacses * cc-mode.el: c++-macroize-region will now take any prefix arg instead of just a negative arg. Tue Feb 16 20:30:37 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: don't use _ as word constituent, instead fix regexps * cc-mode.el: give _ word constituent syntax class so indentation of case_ and like symbols will work properly. forward-word will gobble underscores in symbols so that's the trade off for taking the easy way out. Fri Feb 12 16:40:35 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-backward-to-start-of-if was necessitated because backward-sexp call was bombing out in new syntax, on single quote in preceding C++ comment line. use c++-backward-sexp to properly handle this and change all references of c-backward... to c++-backward. Thu Feb 11 18:33:50 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: should only bind parse-sexp-ignore-comments to t if c++-is-really-fixed-p Sat Feb 6 00:04:45 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: in c++-comment-indent, if previous line contains a comment only line that is to the left of comment-column, indent the line to comment-column Fri Feb 5 23:41:34 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed K&R C arg decl with keyword struct in line * cc-mode.el: fixed c++-indent-command to follow documentation. previous the following situation was broken: c++-tab-always-indent == nil and: ... { foo; ^------- point was here * cc-mode.el: use Ken Laprade's patch for format vs symbol-name print of c++-special-indent-hook * cc-mode.el: check for (not (c++-in-parens-p)) when deciding whether we're looking at a continuation line or not to avoid bad indentation of continued lines such as: if( !tnode->expanded_p() && docobj->hasChild_p() && docobj->tocLevel() < xmaxTocDepth ) * cc-mode.el: fixed anchor of comment only lines in c++-indent-exp * cc-mode.el: anchor comment only lines to (current-column) if the comment is at, or to the right of, comment-column. * cc-mode.el: c++-continued-member-init-offset works for line with just single colon line, where member inits follow on subsequent lines: ff::ff () : xxx (0), yyy (0) { * cc-mode.el: don't add c-continued-statement-offset if looking at a class's opening brace * cc-mode.el: fixed c++-indent-exp wrt stream ops * cc-mode.el: fixed another small problem with nested class indentation * cc-mode.el: another fix for nested class indentation when looking at the line after an access specifier. we needed to substract one level of indentation Tue Feb 2 21:27:52 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: modifications to better indent nested classes Fri Jan 29 22:31:07 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: in c++-forward/backward-sexp, only let bind parse-sexp-ignore-comments to t if emacs is fixed (not really fixed) Wed Jan 27 22:48:56 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: some previous fix (don't know when) broke MI continuation line indentation. This fixes that problem by making sure we're not looking at MI-regexp * cc-mode.el: commented out bogus part * cc-mode.el: commented out bogus top level continuation indentations Mon Jan 25 23:34:52 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed minor bug with c++-submit-bug-report which manifests only on unpatched emacses * cc-mode.el: fixed small bug in c++-submit-bug-report manifesting in unpatched emacses Thu Jan 21 23:38:34 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-indent-exp must let-bind parse-sexp-ignore-comments to t for the whole duration * cc-mode.el: hack for c++-indent-sexp continued statement offsets... are there repercussions??? * cc-mode.el: fixed c++-cont-indent free variable * cc-mode.el: partial fix of continuation lines at top level Wed Jan 20 23:39:40 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: 1. remove infinite loop from c++-in-literal 2. get rid of messages note that c++-in-literal-quick is broken wrt to old emacs patches Wed Jan 13 22:57:51 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-end-of-defun needed to let-bind parse-sexp-ignore-comments to t * cc-mode.el: better c++-in-literal-quick * cc-mode.el: 1. cosmetic cleanups of code 2. a pass through c++-mode docstring and all variables * cc-mode.el: another hack on the comments at the top of the file * cc-mode.el: a documentation pass * cc-mode.el: changed name of c++-backward-over-syntactic-ws to just c++-backward-syntactic-ws to more closely resemble new lemacs builtin function name. * cc-mode.el: fixed c++-syntax-mode-table to work with patched lemacs Sat Jan 9 05:08:25 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: put # back as a comment-style * cc-mode.el: comment about new bc and backward-syntactic-ws * cc-mode.el: better syntax specifications for new patched lemacs Thu Jan 7 22:22:53 1993 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added c++-backward-sexp and c++-forward-sexp which are bound to M-C-f and M-C-b and work better than their non-c++-mode counterparts since they let-bind parse-sexp-ignore-comments to t. Thu Dec 31 22:17:36 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: use the really, really, up-to-date syntax patch for Lemacs 19 Tue Dec 29 01:22:19 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: removed extraneous commented out code * cc-mode.el: need to ensure that c-mode is loaded in * cc-mode.el: fixed a problem inside member init lists, where the first member (on the colon line) has its args continued * cc-mode.el: fix bug when indenting a line at level zero which begins at the beginning of buffer Wed Dec 23 23:20:05 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fix for c++-indent-exp so that it properly indents c block comments Fri Dec 18 16:15:12 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: greater improvements on c++-b-o-w-s performance Thu Dec 17 23:29:18 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: another run at optimizing c++-backward-over-syntactic-ws based on information gleaned from calc.el experience * cc-mode.el: c++-backward-over-syntactic uses beginning-of-defun instead of point-min as minimum distance to scan back Wed Dec 16 21:52:41 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: check for brace insertion at not-quite-end-of-line (ie eol, ignoring any trailing ws) * cc-mode.el: allow c++-backscan-limit to be nil Fri Dec 11 16:26:05 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: in electric terminator, don't just check for eolp to determine if terminator should electrify. also look for hanging whitespace which may look like eolp, even though it isn't: fooo();......\n ^------^ undiscovered ws---| Thu Dec 10 22:59:25 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: simple fix in calculate indent so forward-char 1 at end of buffer won't throw an error Wed Dec 9 17:55:17 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: error in default value for c++-untame-characters. needed to negate the check for c++-emacs-is-fixed-p * cc-mode.el: fixed problems in electric-(star|slash) when inserting as first character in a buffer. * cc-mode.el: don't treat double-colon as member init when member defun is split across two lines at the scope operator. eg: HereIsAReallyLongClassName ::HereIsAReallyLongClassName( const WithALongConstructorArgument& ) : andItsFirstMemberInit( 7 ) {} * cc-mode.el: added some thanks to the documentation Tue Dec 8 23:57:27 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: better c++-submit-bug-report that works with all known mailers Mon Dec 7 16:26:51 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed calculation of multiple member-inits where double colons can appear inside initing parens * cc-mode.el: improved documentation for c++-special-indent-hook Sat Dec 5 02:52:04 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: handled member init lists with first embedded colon foo() : foo, foo, foo, foo, ^--- this should probably be indented to ^--- here (under colon) but that's really hard and of minimal use. * cc-mode.el: finally figured out that "questionable member init" indentation section. It occurs when you have the following style: foo(...) : foo(9), blat(10), clob(3) Note the colon hanging on the previous line. Steve Vinoski is correct, we should not subtract a level of indentation from the shift since inclass-shift takes care of it. * cc-mode.el: seems like a fix for some close parens not getting outdented when c++-paren-as-block-close-p is t. DOES ANYTHING ELSE BREAK???? Fri Dec 4 22:11:27 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed continued expression in a simple if statement where there is a comment between the if and the simple statement. Thu Dec 3 23:38:27 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: cleaned up some documentation * cc-mode.el: fixed c++-indent-exp for stream operators Tue Dec 1 18:01:45 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-backward-over-syntactic-ws should always be given a backlimit in c++-calculate-indent. * cc-mode.el: in previous fix for c++-c-i, it is possible that containing-sexp is nil, so use (goto-char (or containing-sexp bod)) * cc-mode.el: enhancements to c++-calculate-indent so that it doesn't assume that class opening brace starts in column zero. * cc-mode.el: c++-submit-bug-report now reports whether emacs is patched Mon Nov 30 23:39:13 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed K&R C arg decl indentations * cc-mode.el: cosmetic changes * cc-mode.el: removed old c++-bosw which was too slow anyway Fri Nov 27 20:18:12 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed comment indentation for new c++-comment-only-line-offset semantics, and also simplified electric-star and electric-slash. They no longer call c++-electric-terminator. Fri Nov 13 22:42:04 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: some documentation improvements * cc-mode.el: fixed erroneous newline insertion on member init colons when c++-auto-newline is off. * cc-mode.el: fixed buggy regexp which would fail on this situation: int foo( // foo int arg1, // arg1 int arg2 last line gets indented wrong because of the spaces b/w the foo( and the comment * cc-mode.el: 1. alphabetized varlist in c++-dump-state 2. improved portability of c++-submit-bug-report for mailers other than vm. * cc-mode.el: use comment-start-skip instead of hard-coded comment regexp * cc-mode.el: 1. added c++-emacs-is-fixed-p to check for a patched emacs 2. automatically set c++-untame-characters to nil if patched * cc-mode.el: fixed comment-line indent calculation. now c++-calculate-indent does no comment-line calculations, its all handled in c++-indent-line and c++-indent-sexp * cc-mode.el: slight documentation fixup * cc-mode.el: vastly improved c++-comment-only-line-offset to provide ability to determine column-zero offsets * cc-mode.el: attempt to speed up c++-backward-over-syntactic-ws Thu Nov 12 16:45:30 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: 1. some experimental performance enhancements (not working really great) 2. in c++-at-top-level-p, check for null containing-sexp before in-parens Tue Nov 3 20:46:19 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: removed the variable c++-class-member-indent and replaced all occurances with c-indent-level. it caused very bad things when c-indent-level != c++-class-member-indent * cc-mode.el: c++-match-paren must set parse-sexp-ignore-comments to t Fri Oct 2 22:31:14 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: perhaps optimization on skipping backwards over c++ literal comment Tue Sep 29 00:19:22 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: replaced code accidently removed during last bug fix Mon Sep 28 22:44:51 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed default[ \t]*: indentation bug * cc-mode.el: continuation indentation problem should now work correctly. c++-in-function-p search from containing-sexp or point * cc-mode.el: added c++-in-function-p defun to be used when checking if we're in a function. Continuations inside a function * cc-mode.el: fixed the LCD Archive Entry syntax * cc-mode.el: removed c++-fill-C-comment, function is unused anywhere Tue Sep 1 21:02:17 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: 1. compatibility code for loading into a patched emacs 2. also a *slightly* improved c++-backward-over-syntactic-ws. This function needs a drastic overhaul -- I bet its the main performance pig now that emacs is patched. Fri Aug 28 22:07:39 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: final cleansing before posting Thu Aug 27 16:41:30 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added GNU copyright info * cc-mode.el: standard header and many comment changes Wed Aug 26 23:40:46 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: cleaned up documentation * cc-mode.el: yet again, better documentation about untame characters * cc-mode.el: better documentation on c++-untame-characters * cc-mode.el: added some documentation to the front of the file to describe untame characters * cc-mode.el: default value for c++-untame-characters is now just single tick, the most troublesome character Thu Aug 20 19:29:00 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: only check for inside template spec if looking at c++-class-key * cc-mode.el: attempted to address keyword "class" appearing inside a template specification: template<class Foo> Foo& Bar<Foo>::doit( void ){}; template<class Foo, class Blat> Foo& Bar<Foo>::doit( void ){}; Tue Aug 11 14:06:02 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: updated docstring for c++-at-top-level-p Mon Aug 10 22:19:52 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-c-mode's mode-name is "C" * cc-mode.el: style 1-3 is default for c++-C-block-comments-indent-p Thu Aug 6 19:47:36 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed auto-indenting of C block comment style 3 Wed Aug 5 21:25:39 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: another patch to docstring * cc-mode.el: another docstring change * cc-mode.el: qualify doc string change of previous revision * cc-mode.el: improved (hopefully) the docstring for var c++-untame-characters * cc-mode.el: more optimizations by passing bod to c++-at-top-level-p * cc-mode.el: parameterized c++-class-key and c++-access-key the first is class\|struct\|union the second is public\|protected\|private * cc-mode.el: fixed (c++-at-top-level-p t) so it won't get fooled by struct declarations. * cc-mode.el: fixed c++-at-top-level-p so it won't get fooled by struct declarations Tue Aug 4 20:59:29 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed docstring for c++-tab-always-indent Wed Jul 29 14:50:46 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: this branch combines C and C++ modes for inclusion into emacs 19 Tue Jul 28 19:28:29 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed documentation for c++-C-block-comments-indent-p Mon Jul 27 15:13:36 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed indentation of member init list after a multiline member init call Thu Jul 23 19:59:45 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed c++-electric-pound when inserting # at beginning of buffer * cc-mode.el: simple fix for *some* sequence continuation lines Wed Jul 22 13:28:54 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed (c++-at-top-level-p t) so it wouldn't return non-nil if keyword class appears in arglist * cc-mode.el: added to c++-calculate-indent a check if we're at the bobp Tue Jul 21 21:59:27 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: new function c++-calculate-c-indent-within-comment used instead of calculate-c-indent-within-comment (from c-mode). Supports 4 styles of C block comments. Also, new variable c++-C-block-comments-indent-p to control which style(s) to use. * cc-mode.el: fixed c++-indent-exp to handle public/private/protected with friends * cc-mode.el: fixed indentation for the following style: class foo { friend class bar; public: foo(); private: }; Mon Jul 20 20:22:58 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: 1. added c++-paren-as-block-close-p to control whether a closing paren is treated as a closing brace. 2. also added c++-block-close-brace-offset to bug list of variables * cc-mode.el: added a c++-c-mode-syntax-table NOTE: patch in previous version DOES work * cc-mode.el: rewrite of c++-at-top-level-p for c mode (doesn't work) Fri Jul 17 20:14:30 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: change syntax table entry to support lemacs 19 syntax table extension WARNING: this may change Thu Jul 16 19:35:21 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed comment-only lines in c++-indent-exp * cc-mode.el: patch to c++-indent-exp to make it work consistently with manual tabbing * cc-mode.el: better c++-(un)comment-region functions as supplied by enami Wed Jul 15 18:07:13 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: C mode entry point, including a properly working c++-(un)comment-region * cc-mode.el: use c++-backward-over-syntactic-ws in another appropriate location in c++-calculate-indent Tue Jul 14 21:33:04 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: implemented Brian Kennedy's patches for { if style seems to be clean now * cc-mode.el: regexp to correctly pickup '\\' character constant * cc-mode.el: new regexp to match even number of backslashes followed by a quote for c++-in-literal matching of string terminators Mon Jul 13 18:25:21 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: better fix to c++-at-top-level-p for limiting backsearching of class/struct * cc-mode.el: another patch to c++-at-top-level-p, but now slower * cc-mode.el: Igor Metz's patch to fix c++-uncomment-region for Emacs 19 derivatives since zap-to-char now works differently Fri Jul 10 22:02:26 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: in c++-fill-C-comment, its cleaner to use let-bind fill-prefix itself instead of saving its value and later restoring it. * cc-mode.el: c++-at-top-level-p never returns non-nil if inside the parens of an arg decl list for a function. Also cleaned up c++-at-top-level-p's docstring for new functionality * cc-mode.el: 1. added usage notes to top of file 2. another fix for indentation of member init lists in nested classes * cc-mode.el: fixed member init continuation lines * cc-mode.el: fixed emtpy-defun-braces cleanup when at top level wrt enclosing class * cc-mode.el: fixed nested class member init list indentation Thu Jul 9 21:54:08 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added c++-class-member-indent to varlist in bug submission * cc-mode.el: nested classes! added a variable c++-class-member-indent to handle indentation of class members relative to their enclosing class * cc-mode.el: new c++-at-top-level-p function for nested class definitions (does not work though) * cc-mode.el: optimized by changing all references to c++-in-comment-p and c++-in-open-string-p to use memq and c++-in-literal. This should overall reduce the number of calls to c++-in-literal, a time consuming defun. * cc-mode.el: c++-electric-star will now re-indent the line when typed as the first character on a line of a C block style comment continuation * cc-mode.el: fix to c++-at-top-level-p to ignore struct/class declarations inside a defun which are not definitions: void foo() { struct blah; // we are not now (c++-at-top-level-p t) The function is still not perfect so we really need to rethink this algorithm. * cc-mode.el: collapse all c++-point-* commands into a single c++-point command with an argument Wed Jul 8 19:40:14 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed parse-start setq in c++-calculate-indent Tue Jul 7 22:03:41 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: pasing => parsing * cc-mode.el: grammer -> grammar in comment * cc-mode.el: implemented c++-backward-over-syntactic-ws with help of Tor Lillqvist <tml@tik.vtt.fi> and replaced all occurances of c++-backward-over-cpp-directives and c++-skip-backward-to-noncomment. Mon Jul 6 21:25:17 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: colon and semi-colon are no longer electric inside of literals * cc-mode.el: it is possible that c++-beginning-of-defun with c++-match-header-strong equal to nil will incorrectly find the beginning of defun. if this happens, c++-parse-state will return a null state so we can check for this and then let* bind c++-match-header-strongly to t. Then we re-calculate the beginning of the c++ defun. Seems to work around the (char-after ...) bug * cc-mode.el: swap back to another use of c++-parse-state * cc-mode.el: 1. don't inherit syntax table from c-mode. Initialize completely from in this file 2. wrote c++-parse-state to centralize parsing of syntactic context Tue Jun 30 21:39:23 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed a bug in brace-else-brace cleanup where insertion of new (non-else) brace could possibly go way back to clean up old else brace constructs. * cc-mode.el: use new c++-cleanup-list to replace c++-cleanup-brace-else-brace-p and c++-cleanup-empty-defun-braces-p, and to implement new cleanup on close semi. * cc-mode.el: fixed c++-electric-pound behavior for # directives in a level of nesting for alignleft behavior * cc-mode.el: c++-cleanup-empty-defun-braces-p only for defun braces (not for empty if braces for example) * cc-mode.el: only do the extra c++-indent-line in c++-electric-brace if hanging braces is turned off Wed Jun 24 20:07:00 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added a c++-indent-line in the c++-electric-brace to fix non-hanging brace error message. * cc-mode.el: added function c++-skip-backwards-over-cpp-directives for improved indentation around # lines. Tue Jun 23 19:35:27 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed stream op positioning when first >> or << is on the next continued line of the statement. * cc-mode.el: hacking the mode line should only occur in c++-mode defun, when the mode line is a list, otherwise, if people use the obsolete string-only form, their mode line will be made invalid. * cc-mode.el: fixed indentation of lines not at top level, which follow preprocessor directive lines. Fri Jun 19 21:46:58 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed bug when access specifier line has a comment at the end of it * cc-mode.el: simplified all point-marks to use (point-marker) Thu Jun 18 15:10:04 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed c++-electric-pound by using insert-before-markers * cc-mode.el: 1. added c++-electric-pound command and bound it to # 2. also added c++-electric-pound-behavior to control how # behaves. Currently only supported behavior is alignleft, but eventually I will support nested behavior as well. 3. changed the way c++-electric-delete and c++-insert-command work on # lines. delete is never hungry in the whitespace b/w # and directive, and tab only inserts in this area as well. * cc-mode.el: added c++-delete-function variable and made c++-electric-delete use this variable Wed Jun 17 22:29:12 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added c++-special-indent-hook and bug reporting of this variable * cc-mode.el: support for lining up >> and << * cc-mode.el: added c++-matching-paren as contrib'd by Gnanasekaran Swaminathan Mon Jun 15 21:07:29 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed c++-indent-command when looking at a blank line and c++-tab-always-indent is nil * cc-mode.el: another fix to c++-indent-command for c++-tab-always-indent == nil * cc-mode.el: made c++-indent-command behavior when c++-tab-always-indent is nil consistent with documentation Thu Jun 11 22:44:47 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added a test to see if c++-auto-newline actually inserts the newline doing the auto-fill Wed Jun 10 19:10:31 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed indentation of first member function after an access specifier inside a class definition Tue Jun 9 22:45:24 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: c++-submit-bug-report uses pop-to-buffer instead of switch-buffer * cc-mode.el: refined regexp patch in previous fix * cc-mode.el: fixed c++-calculate-indent int the situation where we're looking at the line after a class declaration, but we're not inheriting. see the lines after: ;; else first check to see if its a ;; multiple inheritance continuation line the regexp should match optional inheritance syntax. * cc-mode.el: small fix to c++-at-top-level for checking if at top wrt a containing class definition. (previous fix didn't work) * cc-mode.el: 1. fixed small bug in c++-at-top-level-p for nested in class checking 2. fixed bug in indentation of continued arg lists in class nested function declarations Mon Jun 8 21:50:48 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: removed extra define-key of DEL in c++-mode-map init * cc-mode.el: fixed friend offset in c++-indent-exp * cc-mode.el: indent by c++-friend-offset for all friends, not just class friends * cc-mode.el: fixed scan-lists failure in c++-at-top-level-p * cc-mode.el: fixed bogus colon entry "premature sexp end" bug * cc-mode.el: much preliminary work for inline code proper formatting * cc-mode.el: fixed double colon cleanup inside defun level * cc-mode.el: added variable c++-cleanup-empty-defun-braces-p * cc-mode.el: default value for c++-comment-only-line-offset is now 0 * cc-mode.el: fixed c++-electric-delete's consuming of [] characters * cc-mode.el: c++-cleanup-brace-else-brace-p is now nil by default * cc-mode.el: fixed c++-hanging-member-init-colon for all known situations Fri Jun 5 21:13:54 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: reorganized the major sections of code Tue Jun 2 15:18:25 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: more optimizations using c++-beginning-of-defun Mon Jun 1 22:24:52 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: interrim speedups * cc-mode.el: another patch to c++-in-literal for checking for null strings. I think I've got it this time... * cc-mode.el: fixed the regexp for matching the closing double quote of a string Thu May 28 22:24:09 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added a (provide ...) to the end of the file * cc-mode.el: changed c++-brace-}-else-{-p to c++-brace-else-brace-p * cc-mode.el: fixed hanging base classes for multiple inheritance * cc-mode.el: completely rewrote c++-backward-to-noncomment to use c++-in-literal function. * cc-mode.el: replace all beginning-of-defun calls with c++-beginning-of-defun which more correctly find the true beginning of a c++ definition * cc-mode.el: fixed c++-in-literal for the case where "" appears as a string * cc-mode.el: fixed bug in c++-calculate-indent when class line is first line in file. also there may be no space between the class name and colon. * cc-mode.el: fixed c++-backward-to-noncomment bug when looking at # lines * cc-mode.el: fixed indentation of top-level construct immediately preceeded by a c-block comment Wed May 27 23:30:43 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: complete replacement for c++-in-open-string-p and c++-in-comment-p Tue May 26 22:25:39 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added Warner Losh's addition of c++-relative-offset-p * cc-mode.el: patched c++-backward-to-start-of-do to ignore do/while constructs in comments * cc-mode.el: yet another patch to c++-in-comment-p Fri May 22 18:09:04 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added c++-access-specifier-offset for extra indentation for public, protected, and private keyword lines Thu May 21 19:18:31 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: cosmetic changes Wed May 20 22:53:43 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed typo with c++-always-arglist-indent-p * cc-mode.el: mode-line-format is now not completely overridden, but instead, the c++-isms are tacked onto the format after the mode-name symbol (if it exists). * cc-mode.el: installed Terry Glanfield's patch to c++-indent-exp * cc-mode.el: documented c++-always-arglist-indent, changed the name to c++-always-arglist-indent-p and added to bug report list. * cc-mode.el: installed Milo Chan's patch for addition of c++-always-arglist-indent * cc-mode.el: small patch to fix whitespace only line before top-level construct * cc-mode.el: rewrote c++-tame-comments to look at a list of characters to tame. Also removed c++-tame-comments-p and replaced it with c++-tame-characters * cc-mode.el: equivalenced class and struct keyword syntacticly Tue May 19 19:34:16 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed multiple inheritance continuation indentation * cc-mode.el: fixed indentation for member init lists when colon hangs * cc-mode.el: 1. c++-electric-colon is made smarter so that it only adds newlines after a colong when absolutely necessary 2. extended semantics of c++-hanging-member-init-colon * cc-mode.el: fixed small bug in constness fix of 2.55 Mon May 18 21:55:14 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed top level enum constructs * cc-mode.el: fixed indentation when inputing after a const function * cc-mode.el: handle default: lines exactly line case: lines Thu May 14 21:37:53 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: updated info at top of file re, bug reports * cc-mode.el: fixed continued statements inside a simple for/if style loop * cc-mode.el: fixed member-init bug introduced in v2.47 Wed May 13 20:45:33 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: yet another patch to c++-in-comment-p * cc-mode.el: added interactive command c++-version and bound it to C-c C-v Tue May 12 21:37:20 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: another patch to c++-in-comment-p * cc-mode.el: fixed c++-calculate-indent to ignore parens and such which occur in comment regions during the initial iterative parse of the defun. * cc-mode.el: in c++-in-comment-p, it was necessary to set ?/ temporarily to ". 14" class so that c++ style comments wouldn't affect parse-partial-sexp * cc-mode.el: tab does not insert a C style comment block continuation line when point is on or before the first non-whitespace character on the line. Mon May 11 22:28:30 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added variable c++-tame-comments-p * cc-mode.el: fixed c++-in-comment-p to handle special case of C style block comments * cc-mode.el: added some documentation to c++-mode * cc-mode.el: C-c C-b is the accepted standard for c++-submit-bug-report Fri May 8 20:47:38 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: 1. cleaned up all the intro information at the top of the file 2. added c++-submit-bug-report function and related variables. * cc-mode.el: fixed mailing list info * cc-mode.el: added information about c++-mode-victims mailing list. * cc-mode.el: fixed c++-tame-comments. now we tame all string and parenthesis class characters. * cc-mode.el: changed syntax of single quote back to string class and added c++-electric-tick and c++-tame-ticks defuns to handle backslashifying single quotes in comment areas. Thu May 7 20:03:32 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added fix by Reed Hastings <reed@adapt.net.com> so that c++-indent-exp can properly terminate when // style comments are found within the function. * cc-mode.el: c++-calculate-indent should now not re-indent comment-only lines which begin in comment-column * cc-mode.el: fixed c++-electric-terminator insertion when auto-newline fills a long line due to auto-fill being on. * cc-mode.el: comment only lines which continue previous line's comment field would probably be indented in comment-column so those comments which begin in comment-column don't indent Wed May 6 17:29:16 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: handle comment-only lines which continue from the previous line. Mon May 4 23:33:51 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added a few of Hallvard's speedups (but not the c++-auto-newline one) * cc-mode.el: changed all functions to conform to c++-<func> style * cc-mode.el: changed the variable c-tab-always-indent to c++-tab-always-indent and extended this variable's functionality. * cc-mode.el: forgot to remove the debug statement * cc-mode.el: simplified c++-cleanup-}-else-{-p Sat May 2 18:12:21 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: changed c++-cleanup-}-else-{ to c++-cleanup-}-else-{-p Fri May 1 21:09:09 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: beginnings of } else { cleanup, but not completely bugless yet * cc-mode.el: fixed indent-c++-exp. when setting this-indent as max of different values, max it with 0 not 1, otherwise some things won't ever end up in column zero. * cc-mode.el: I think I've extended calculate-c++-indent to properly handle switch/case statements (at least the style that I use). Thu Apr 30 22:21:51 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added c++-backward-to-start-of-do, which is analogous to c-backward-to-start-of-if and finds the corresponding preceding do for a do/while statement. made the necessary changes to calculate-c++-indent to handle nested do's * cc-mode.el: this version will now handle continued statements with no compound statements on ifs, elses, fors, dos, and whiles. * cc-mode.el: add tab-width to the list of variables to dump... Wed Apr 29 22:23:25 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: simplification of auto-hungry functions and mode-line updates with much thanks to Hallvard Furuseth. * cc-mode.el: copied c++-in-parens-p from c-mode's c-inside-parens-p. this is so we can play with trying to work around emacs' bogus syntax bugs. we'll see if the new behavior is any better * cc-mode.el: eliminate infinite loop bug in c++-indent-defun by using a marker. this is necessary since c++-indent-line could change the location of the marker and just saving its buffer position is not sufficient. * cc-mode.el: close parens act like close braces by indenting to c-indent-level plus value of c++-block-close-brace-offset. * cc-mode.el: fixed infinite loop problem in c++-indent-defun which was caused by substituting forward-line for next-line. * cc-mode.el: some changes to calculate-c++-indent defun 1. fixed unbalanced paren problem (emacs bug) in comment by adding a paren to the j.peck hack comment (probably should eventually clean up these comments) 2. applied Doug Moore's (dougm@cs.rice.edu) patch to fix continued function declarations of the form: int foo( int i, int j ); ^---- next line should only indent to here 3. cleaned up some comment sections * cc-mode.el: added the variable c++-block-close-brace-offset for modifying the offset of close braces for non-top level blocks (i.e. braces which don't close a function). * cc-mode.el: removed c++-delete-is-hungry-in-literals-p. Delete key is now, *never* hungry inside literals. Tue Apr 28 22:38:35 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed free variable problems in indent-c++-exp 1. innerloop-done was let'ed as inner-loop-done. changed all innerloop-done's to inner-loop-done in body of defun 2. last-depth wasn't let'ed * cc-mode.el: added c++-delete-is-hungry-in-literals-p to control whether hungry-delete consumes whitespace even in literals. * cc-mode.el: whoops, parse-start was a free variable in c++-at-top-level-p. I just added the local binding to the let statement in that defun. * cc-mode.el: changed c++-hanging-braces-p to c++-hanging-braces. this variable can now control whether hanging braces happen always, never, or only on non-top level open braces. * cc-mode.el: fixed comment-only line related bugs: 1. comment-only lines not in the first column, but at the top level were inserting all tab characters. 2. fixed #1, but this caused non-comment top-level lines which follow indented top-level comment-only lines to indent, which they shouldn't do. I think this fixes all repercussions of comment-only lines. * cc-mode.el: replaced all next-line's with forward-line's since next-line is really a user level function (and may be overloaded by the user). Mon Apr 27 16:03:29 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed enum entry bug reported by Rolf Schreiber by patching c++-backward-to-noncomment. it is possible that (max (point-bol) lim) is greater than point, which chokes the search-backward call. I now have a test for sblim being less than or equal to point. Fri Apr 24 22:02:47 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: 1. added documentation in c++-mode for auto-hungry states and related variables. 2. removed duplicated setq's in c++-mode buffer-local-variable setups * cc-mode.el: more header doc information Wed Apr 22 22:30:31 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: final clean up before posting * cc-mode.el: bumping to baseline rev number 2.0 Thu Apr 16 17:05:40 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added LCD Archive Entry and new file header format Wed Apr 15 19:44:38 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed column zero comment-only line indentation problem when inside a containing-sexp. * cc-mode.el: needed to add a trailing newline for proper unsharing Tue Apr 14 18:12:22 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: Bumping * cc-mode.el: added bug reporting information Fri Apr 10 17:48:46 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: cleaned up c++-mode doc string * cc-mode.el: 1. updated mode documentation string for c++-mode to include new variables. 2. changed c++-auto-hungry-toggle-p to c++-auto-hungry-toggle since it is not a binary valued variable. * cc-mode.el: changed ' syntax back to string quote instead of punctuation Thu Apr 9 22:26:00 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added a (goto-char (point-min)) in c++-dump-state * cc-mode.el: added c++-dump-state function for bug reporting Tue Mar 31 23:38:56 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: lots of toggling options, plus individual toggling for hungry-delete-key and auto-newline states. * cc-mode.el: added organization Fri Mar 27 23:19:32 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: major renovation on auto/hungry toggling Thu Mar 26 23:43:09 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: use better mode-line formatting instead of hacking mode-name Fri Mar 20 20:38:29 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: made buffer-local c++-auto-newline and c++-hungry-delete-key-p Thu Mar 19 19:16:14 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: bound c++-toggle-auto-newline function to C-cC-t and compacted info mode name * cc-mode.el: use better mode-line updating than (redraw-display) in c++-toggle-auto-newline Wed Mar 18 19:52:14 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed display of c++-toggle-auto-newline Tue Mar 17 21:01:05 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: test for c++-hungry-delete-key-p (typo) Mon Mar 16 22:14:18 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: added c++-hungry-delete-key-p * cc-mode.el: handles auto newline for member init list * cc-mode.el: replaced within-c++-string w/ c++-in-open-string-p * cc-mode.el: lots of fixes for: 1. column zero comments don't indent 2. made electric chars comment & open-string safe 3. made electric brace w/auto-fill work 4. made calculate-c++-indent work for while( foo ) style 5. added c++-hanging-braces-p for no auto-newline on left braces Sat Mar 14 07:01:14 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: fixed double-colon and various other problems with c-auto-newline also changed c-auto-newline to c++-auto-newline * cc-mode.el: fixed c-auto-newline for double colons and }; syntax * cc-mode.el: fixed autoindent of comments for hanging arithmetic Fri Mar 13 23:47:34 1992 Barry A. Warsaw, ITB (warsaw@anthem) * cc-mode.el: better documentation for electric-c++-slash * cc-mode.el: fixed c++-indent-line to work with electric-c++-slash and bind "/" to it * cc-mode.el: added c++-comment-only-line-offset * cc-mode.el: Initial revision