Init-Files/site-lisp/cc-mode/5.32.3/ChangeLog
2012-07-02 14:57:17 -07:00

14608 lines
507 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

2012-05-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* Patch release 5.32.3
* ChangeLog: Update for patch release 5.32.3.
* cc-defs.el (c-version): Increment to 5.32.3.
* *.el, cc-mode.texi: Add 2012 to copyright notices.
2012-04-22 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix erroneous commit.
2012-04-21 Alan Mackenzie <bug-cc-mode@gnu.org>
Adding a ) can hide the resulting (..) from searches. Fix it.
* cc-engine (c-append-lower-brace-pair-to-state-cache): Bound the
backward search to the position of the existing (.
2012-04-15 Alan Mackenzie <bug-cc-mode@gnu.org>
Ensure searching for keywords is case sensitive.
* cc-cmds.el (c-electric-brace, c-electric-lt-gt)
(c-electric-paren c-beginning-of-defun, c-end-of-defun)
(c-defun-name, c-mark-function c-cpp-define-name)
(c-comment-indent, c-scan-conditionals c-indent-defun)
(c-context-line-break): bind case-fold-search to nil.
* cc-mode.el (c-font-lock-fontify-region): bind case-fold-search
to nil.
2012-04-11 Alan Mackenzie <bug-cc-mode@gnu.org>
Make imenu work again for Objective C Mode.
* cc-menus.el (cc-imenu-objc-generic-expression): Correct the
*-index values, these having been disturbed by a previous change
in 2011-08.
2012-04-08 Alan Mackenzie <bug-cc-mode@gnu.org>
Correct two search limits in c-before-change-check_<>-operators.
* cc-engine.el (c-before-change-check-<>-operators): Make the
correction.
* cc-mode.texi (c-offsets-alist): Correct a typo.
2012-03-16 Alan Mackenzie <bug-cc-mode@gnu.org>
Further optimise the handling of large macros.
* cc-engine.el (c-crosses-statement-barrier-p): Use a limit to a
call of `c-literal-limits'.
(c-determine-+ve-limit): New function.
(c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an `and'.
(c-guess-basic-syntax): In macros, restrict a search limit to
2000. In CASE 5B, restrict a search limit to 500.
(c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'.
* cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Restrict
macro bounds to +-500 from after-change's BEG END.
2012-03-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mark-defun): Leave a mark, and extend region when
command is repeated.
2012-03-02 Alan Mackenzie <bug-cc-mode@gnu.org>
Depessimize the handling of very large macros.
* cc-engine.el (c-macro-cache, c-macro-cache-start-pos):
(c-macro-cache-syntactic): New variables to implement a one
element macro cache.
(c-invalidate-macro-cache): New function.
(c-beginning-of-macro, c-end-of-macro, c-syntactic-end-of-macro):
Adapt to use the new cache.
(c-state-safe-place): Use better the cache of safe positions.
(c-state-semi-nonlit-pos-cache)
(c-state-semi-nonlit-pos-cache-limit): New variables for...
(c-state-semi-safe-place): New function. Here, in a macro is
"safe".
(c-invalidate-state-cache-1): New stuff for
c-state-semi-safe-place.
(c-in-literal, c-literal-limits, c-determine-limit-get-base): Use
c-state-semi-safe-place.
* cc-langs.el (c-get-state-before-change-functions): Add
c-invalidate-macro-cache to the C, C++, Obj entries.
2012-03-01 Alan Mackenzie <bug-cc-mode@gnu.org>
Optimise macro handling with a 1 element cache of beginning and
end. Make the default of c-macro-names-with-semicolon nil. See
2012-03-02 for details.
2012-02-29 Alan Mackenzie <bug-cc-mode@gnu.org>
Optimise c-state-safe-place. See 2012-03-02 for details.
2012-02-19 Alan Mackenzie <bug-cc-mode@gnu.org>
Create .hgignore. Delete the two old .cvsignore's.
2012-02-19 Alan Mackenzie <bug-cc-mode@gnu.org>
Modify the web pages for recent conversion to Mercurial.
* hgaccess.php: New file.
* anoncvs.php: Mark old CVS repository as obsolete, change to
past tense.
* index.php: Direct the adventurous to hg rather than cvs.
* links.h: Add new links for hg pages. Move cvs pages to new
"obsolete" section.
2012-02-19 Alan Mackenzie <bug-cc-mode@gnu.org>
Remove old CVSROOT directory.
2012-02-13 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix a loop in c-set-fl-decl-start.
* cc-engine.el (c-set-fl-decl-start): Add a check that
c-backward-syntactic-ws actually moves backwards.
2012-02-12 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix infinite loop with long macros.
* cc-engine.el (c-state-safe-place): Handle macros properly.
2012-02-07 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix spurious recognition of c-in-knr-argdecl.
* cc-engine.el (c-in-knr-argdecl): Check for '=' in a putative K&R
region.
2012-02-07 Alan Mackenzie <bug-cc-mode@gnu.org>
Test for keyword @implementation in a #pragma. This used to
loop.
2012-02-07 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-objc-directive): Prevent looping in
"#pragma mark @implementation".
2012-01-18 Alan Mackenzie <bug-cc-mode@gnu.org>
Eliminate sluggishness and hangs in fontification of "semicolon
deserts".
* cc-engine.el (c-state-nonlit-pos-interval): change value 10000
-> 3000.
(c-state-safe-place): Reformulate so it doesn't stack up an
infinite number of wrong entries in c-state-nonlit-pos-cache.
(c-determine-limit-get-base, c-determine-limit): New functions to
determine backward search limits disregarding literals.
(c-find-decl-spots): Amend commenting.
(c-cheap-inside-bracelist-p): New function which detects "={".
* cc-fonts.el (c-make-font-lock-BO-decl-search-function): Give a
limit to a backward search.
(c-font-lock-declarations): Fix an occurrence of point being
undefined. Check additionally for point being in a bracelist or
near a macro invocation without a semicolon so as to avoid a
fruitless time consuming search for a declarator. Give a more
precise search limit for declarators using the new
c-determine-limit.
2012-01-17 Alan Mackenzie <bug-cc-mode@gnu.org>
Correct a test to do with C-y:
* cc-mode.el (c-after-change): Correct a singular-plural
confusion.
2012-01-13 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix filling for when filladapt mode is enabled.
* cc-cmds.el (c-fill-paragraph): In the invocation of
c-mask-paragraph, pass in `fill-paragraph' rather than
`fill-region-as-paragraph'. (This is a reversion of a previous
change.)
* cc-mode.el (c-basic-common-init): Make
fill-paragraph-handle-comment buffer local and set it to nil.
2012-01-11 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix Emacs bug #10463 - put `widen's around the critical spots.
* cc-engine.el (c-in-literal, c-literal-limits): put a widen
around each invocation of c-state-pp-to-literal. Remove an unused
let variable.
2012-01-08 Alan Mackenzie <bug-cc-mode@gnu.org>
Optimise font locking in long enum definitions.
* cc-fonts.el (c-font-lock-declarations): Add an extra arm to a
cond form to handle enums.
* cc-langs.el (c-enums-contain-decls): New lang variable.
* cc-mode.el (c-font-lock-fontify-region): Correct a typo.
2011-12-24 Alan Mackenzie <bug-cc-mode@gnu.org>
Introduce a mechanism to widen the region used in context font
locking. Use this to protect declarations from losing their
contexts.
* cc-langs.el (c-before-font-lock-functions): replace
c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming).
(c-before-context-fontification-functions): new defvar, a list of
functions to be run just before context (etc.) font locking.
* cc-mode.el (c-extend-font-lock-region-for-macros): new,
functionality extracted from c-neutralize-syntax-in-and-mark-CPP.
(c-in-after-change-fontification): new variable.
(c-after-change): Set c-in-after-change-fontification.
(c-set-fl-decl-start): Rejig its interface, so it can be called
from both after-change and context fontifying.
(c-change-set-fl-decl-start, c-context-set-fl-decl-start): new
functions.
(c-standard-font-lock-fontify-region-function): new variable.
(c-font-lock-fontify-region): new function
2011-12-22 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix unstable fontification inside templates.
* cc-langs.el (c-before-font-lock-functions): newly created from
the singular version. The (c c++ objc) entry now additionally has
c-set-fl-decl-start. The other languages (apart from AWK) have
that as a single entry.
* cc-fonts.el (c-font-lock-enclosing-decls): The functionality for
"local" declarations has been extracted to c-set-fl-decl-start.
* cc-mode.el: (c-common-init, c-after-change): Changes due to
pluralisation of c-before-font-lock-functions.
(c-set-fl-decl-start): New function, extraced from
c-font-lock-enclosing-decls and enhanced.
(top level): Only advise the font-lock change functions when
font-lock-extend-after-change-region-function is not defined.
2011-12-20 Alan Mackenzie <bug-cc-mode@gnu.org>
Convert some British English spellings to American English.
2011-12-13 Alan Mackenzie <bug-cc-mode@gnu.org>
Large brace-block initialisation makes CC Mode slow: Fix. Tidy up
and accelerate c-in-literal, etc. by using the c-parse-state
routines. Limit backward searching in c-font-lock-enclosing.decl.
* cc-engine.el (c-state-pp-to-literal): Return the pp-state and
literal type in addition to the limits.
(c-state-safe-place): New defun, extracted from
c-state-literal-at.
(c-state-literal-at): Use the above new defun.
(c-slow-in-literal, c-fast-in-literal): Removed.
(c-in-literal, c-literal-limits): Amended to use
c-state-pp-to-literal.
* cc-fonts.el (c-font-lock-enclosing-decls): Check for being in a
literal. Add a limit for backward searching.
* cc-mode.el (awk-mode): Don't alias c-in-literal to
c-slow-in-literal.
2011-12-04 Alan Mackenzie <bug-cc-mode@gnu.org>
Add the switch statement to AWK Mode.
cc-awk (awk-font-lock-keywords): Add "switch", "case", "default"
to the keywords regexp.
cc-langs (c-label-kwds): Let AWK take the same expression as the
rest.
(c-nonlabel-token-key): Allow string literals for AWK. Refactor
for the other modes.
2011-10-22 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix bug #9560, sporadic wrong indentation; improve instrumentation of
c-parse-state.
* cc-engine.el (c-append-lower-brace-pair-to-state-cache): correct faulty
logical expression.
(c-parse-state-state, c-record-parse-state-state)
c-replay-parse-state-state): New defvar/defuns.
(c-debug-parse-state): Use new functions.
2011-10-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* Patch release 5.32.2
* ChangeLog: Update for patch release 5.32.2.
* cc-defs.el (c-version): Increment to 5.32.2
2011-10-11 Alan Mackenzie <bug-cc-mode@gnu.org>
Enhance cc-bytecomp-ignore-obsolete to cope with the missing
function `byte-compile-obsolete' in Emacs >= 24.
* cc-bytecomp.el (top-level): Add variable cc-bytecomp-push-vars.
Set this and similar variables to nil each time the file is
loaded.
(cc-bytecomp-setup-environment, cc-bytecomp-restore-environment):
Add clauses to setup and restore "pushed" variables.
(cc-bytecomp-push): New macro to "push" a variable onto an
internal stack.
(cc-bytecomp-ignore-obsolete): Add a superfluous check to suppress
a compiler warning
(cc-bytecomp-ignore-obsolete): In Emacs >= 24, use
byte-compile-not-obsolete-funcs to mark a function as obsolete.
2011-10-07 Alan Mackenzie <bug-cc-mode@gnu.org>
Fontify Java @annotations with c-preprocessor-face-name instead of
c-annotation-face. Protect against a one line change
misfontifying an annotation as a variable declaration. Fix a
"minor" bug.
(c-annotation-face): Remove
(c-basic-matchers-before): Move the stanza for Java @annotations
here from c-basic-matchers-after. Replace c-annotation-face by
c-preprocessor face name.
(c-font-lock-enclosing-decls): Check that
c-opt-block-decls-with-vars-key is non-nil before using it.
annotations-1.face: recalculate this file.
2011-09-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (top level): Add a test for the existence of
delete-dups.
* cc-fix.el (top level): (defun delete-dups) when necessary.
2011-09-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/index.php, admin/release.php: Update version to 5.32.1
2011-09-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* ChangeLog: Update for patch release 5.32.1.
* cc-defs.el (c-version): Increment to 5.32.1
2011-09-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* Patch release 5.32.1
* cc-defs (c-version): Increment to 5.32.1
2011-09-11 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-emacs-features): add-local-hook-test: Put a
save-excursion round the buffer manipulation. Error detected by
XEmacs byte compiler.
2011-09-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el: Reapply the change up to revision 5.232.
2011-09-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-menus.el: Reapply the change up to revision 5.87.
2011-09-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* All .el files: Correct the copyright and license statements for
release 5.32.
* cc-defs.el (c-next-single-property-change)
(c-search-backward-char-property): For XEmacs, only use
next/previous-single-char-property-change in versions >=
2005-01-25
2011-09-03 Alan Mackenzie <bug-cc-mode@gnu.org>
Restore to the state of Release_5_32.
2011-08-28 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el: Fix - typing on a C++ inher-intro or inher-cont
line should preserve the fontification of the inherited class
names. Analogously for namespace names and Java import, extends,
etc.
* cc-fonts.el (c-make-font-lock-BO-decl-search-function): New
function.
(c-basic-matchers-after - "Fontify the clauses after various
keywords"): Extract the three keyword lists for the 3 erroneous
constructs from the list of four, and use the new function above
in place of an old one.
2011-08-27 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-menus.el (cc-imenu-c++-generic-expression): Make it handle
function pointer parameters properly.
2011-08-24 Alan Mackenzie <bug-cc-mode@gnu.org>
Update the "recent changes" pointer to 5.32.
2011-08-22 Alan Mackenzie <bug-cc-mode@gnu.org>
* Release 5.32
Use `make-local-hook' only when it's needed.
* cc-defs.el (c-emacs-features): Add 'add-hook-local into c-emacs-features
when make-local-hook is required.
* cc-mode.el (c-basic-common-init, c-font-lock-init): Test c-emacs-features
for 'add-hook-local.
* cc-styles.el (c-make-styles-buffer-local): Test c-emacs-features for
'add-hook-local.
* cc-defs.el (c-search-forward-char-property): Streamline by using
c-next-single-property-change.
* cc-engine.el: Correct typos.
2011-08-20 Alan Mackenzie <bug-cc-mode@gnu.org>
Resolve invalid use of a regexp in regexp-opt.
* cc-fonts.el (c-complex-decl-matchers): Add in special detection for a
java annotation.
* cc-engine.el (c-forward-decl-or-cast-1): Add in special detection for a
java annotation.
* cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling for
java.
(c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+".
* cc-fonts.el: Tidy up font locking of a long CPP construct.
* cc-fonts.el (c-guess-font-lock-context): eliminate this somewhat pompous
defun.
(c-font-lock-complex-decl-prepare): replace a call to the above with
inline code.
Fontify CPP expressions correctly when starting in the middle of such a
construct. Mainly for when jit-lock etc. starts a chunk here.
* cc-fonts.el (c-font-lock-context): new buffer local variable.
(c-make-font-lock-search-form): new function, extracted from
c-make-font-lock-search-function.
(c-make-font-lock-search-function): Use the above function.
(c-make-font-lock-context-search-function): New function.
(c-cpp-matchers): Enhance the preprocessor expression case with the above
function
(c-font-lock-complex-decl-prepare): Test for being in a CPP form which
takes an expression.
* cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
2011-08-16 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-lt-gt): Remove an unused dynamic variable.
Reduce the number of compilation warnings:
* cc-awk.el (c-awk-get-NL-prop-cur-line): Replace `delete-backward-char' by
`delete-char'.
* cc-cmds.el (c-electric-lt-gt, c-beginning-of-defun): Remove unused
dynamic variables.
* cc-engine.el (top level): Add a cc-bytecomp-defun and a
cc-bytecomp-defvar.
(c-ssb-lit-begin, c-forward-<>-arglist-recur):
(c-just-after-func-arglist-p, c-looking-at-decl-block):
(c-append-to-state-cache): Remove unused dynamic variables.
* cc-fonts.el (c-font-lock-enum-tail): Remove an unused dynamic variable.
* cc-guess.el (top level): Add three cc-bytecomp-defvars.
* cc-menus.el (cc-imenu-objc-function): Remove an unused dynamic variable.
* cc-mode.el (top level): Add three cc-bytecomp-defvars.
* tests/macro-27.cc, tests/macro-27.face, tests/macro-27.res:
Test "macros with semicolons".
2011-08-15 Alan Mackenzie <bug-cc-mode@gnu.org>
Adapt recent changes to work with XEmacs.
* cc-cmds.el (c-where-wrt-brace-construct): Replace a looking-at with
a call to c-looking-at-non-alphnumspace, because XEmacs doesn't have
\s!.
(c-defun-name): Adapt a regexp not to use \_>.
* cc-defs.el (c-next-single-property-change): new macro.
(c-<-as-paren-syntax, c->-as-paren-syntax: Adapt for use as a simple
value (as well as for category properties).
(c-put-property-fun, c-put-char-property): wrap in eval-and-compile.
(c-use-category): new compile-time constant.
(c-search-forward-char-property):
(c-clear-char-property-with-value-function):
(c-clear-char-property-with-value-function, c-mark-<-as-paren):
(c-mark->-as-paren, c-unmark-<->-as-paren): small changes.
(c-sc-scan-lists-no-category+1+1, c-sc-scan-lists-no-category+1-1):
(c-sc-scan-lists-no-category-1-1, c-sc-scan-lists-no-category-1-1):
(c-sc-scan-lists, c-sc-parse-partial-sexp-no-category):
(c-sc-parse-partial-sexp): new macrofications of scan-lists and
parse-partial-sexp, for use in c-parse-state.
(c-looking-at-non-alphnumspace): new macro.
(c-emacs-features): Introduce new component category-properties.
* cc-engine.el (several defuns): Replace next-single-property-change by
c-next-single-property-change.
(c-state-cache-non-literal-place): Correct, to avoid the inside of
macros.
(c-state-balance-parens-backwards):
(c-append-lower-brace-pair-to-state-cache, c-state-push-any-brace-pair):
(c-append-to-state-cache, c-remove-stale-state-cache):
(c-remove-stale-state-cache-backwards): Replace scan-lists by
c-sc-scan-lists and parse-partial-sexp by c-sc-parse-partial-sexp.
(c-invalidate-state-cache, c-parse-state): small changes.
(c-find-decl-spots): Enhance initialisation of cfd-prop-match to take
account of a possible c-decl-end c-type property on the last token before
the region.
(c-clear-<-pair-props, c-clear->-pair-props): use c-unmark-<->-as-paren.
(c-before-change-check-<>-operators): Search for syntax-table rather than
category property.
* cc-fonts.el (c-skip-comments-and-strings): Use
c-next-char-propery-change.
(c-cpp-matchers): Use c-unmark-<->-as-paren.
(c-font-lock-invalid-string): Use characterp rather than integerp in
XEmacs, since characters are not integers.
* cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Test for category
properties (i.e. GNU Emacs) before deleting them.
(c-before-change): replace next-single-property-change by
c-next-single-property-change.
(c-after-change): Make an Emacs dependent category property related
correction dependent on the existence of category properties.
2011-07-26 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/bitfield-2.c, tests/bitfield-2.face, tests/bitfield-2.res:
bitfield-2.c: New file to test awkward fontification of bitfields.
Fontify bitfield declarations properly.
* cc-langs.el (c-has-bitfields): New lang variable.
(c-symbol-chars): Now exported as a lang variable.
(c-not-primitive-type-keywords): New lang variable.
* cc-fonts.el (c-font-lock-declarations): Jump over the QT keyword "more"
to prevent "more slots: ...." being spuriously parsed as a bitfield
declaraion.
* cc-engine.el (c-beginning-of-statement-1): Refactor and enhance to handle
bitfield declarations.
(c-punctuation-in): New function.
(c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield
declarations properly.
2011-07-22 Alan Mackenzie <bug-cc-mode@gnu.org>
Prevent cc-langs.elc being loaded at run time.
* cc-mode.el: Remove two autoload forms which loaded cc-langs.
* cc-langs.el (c-make-init-lang-vars-fun): Don't emit "(require 'cc-langs)".
Quote a form so it will evaluate at (cc-mode's) compilation time.
2011-07-21 Alan Mackenzie <bug-cc-mode@gnu.org>
Fontify declarators properly when, e.g., a jit-lock chunk begins inside a
declaration.
* cc-langs.el (c-symbol-chars): Correct a typo.
* cc-fonts.el (c-font-lock-enclosing-decls): New function.
(c-complex-decl-matchers): Insert reference to
c-font-lock-enclosing-decls.
* cc-engine.el (c-backward-single-comment, c-backward-comments): Bind
open-paren-in-column-0-is-defun-start to nil around calls to
(forward-comment -1).
2011-07-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi, cc-styles.el, Makefile, cc-guess.el, cc-langs.el, cc-mode.el:
* cc-guess.el: Update this and Make it an integral part of CC Mode.
* cc-langs.el (c-mode-menu): Added "Style..." submenu.
* cc-styles.el (cc-choose-style-for-mode): New function derived from
`c-basic-common-init'.
* cc-mode.el (top-level): Require cc-guess. (c-basic-common-init): Use
`cc-choose-style-for-mode'.
* cc-mode.texi (Guessing the Style): New page. (Styles): Add a short
introduction to above.
Makefile: Change the position of cc-guess.el.
2011-06-27 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, tests/templates-19.cc:
cc-engine (c-guess-continued-construct): Correct the handling of
template-args-cont, particularly for when font lock is disabled. Name
this case as "CASE G".
templates-19.c: Reindent.
2011-06-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations):
1: Whilst checking for declarators, disable
knr checking to speed up for normal files. 2: Refactor, replacing a
sequence of nested if forms by a cond form.
2011-03-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax):
Move CASE 19 to a different place, correctly to
process template-args-cont lines.
2011-02-27 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-continued-construct): In three places, replace
`lim' with 'containing-sexp'.
* cc-engine.el (c-guess-continued-construct):
In three places, replace `paren-state'
with 'containing-sexp'.
Fix an infinite loop which happens when a template construct straddles a
jit-lock boundary.
* cc-engine.el (c-forward-<>-arglist-recur): recast nested `if's as a
`cond' form.
* cc-fonts.el (c-font-lock-declarations): Remove a harmful narrowing to
region being fontified.
2011-02-20 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-state-literal-at):
Prevent positions in macros finding their way into
c-state-nonlit-pos-cache. Strengthen the comments.
(c-state-dump): New commented out diagnostic routine.
* cc-cmds.el: Eliminate some infinite loops:
(c-forward-over-illiterls): On encountering a bare '#' step forward over
it.
(c-end-of-statement): Set macro-end correctly at the end of a loop.
2010-12-28 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-continued-construct):
used 'paren-state' instead of 'lim' to fix byte-compile warnings.
2010-12-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-type):
Before scanning a template arglist, check that the
current language supports this.
2010-10-31 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error.
2010-10-30 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations):
Cache the result of the call to
c-beginning-of-decl-1 inside the internal lambda. This is for speed.
(c-font-lock-enum-tail): New function which fontifies the tail of an enum.
(c-basic-matchers-after): Insert a call to the above new function.
2010-10-24 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el: Patch to fix templates-19.cc test
2010-10-10 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-before-change, c-after-change):
Move the setting of c-new-BEG and
c-new-END from c-before-change to c-after-change.
2010-10-08 Alan Mackenzie <bug-cc-mode@gnu.org>
Together with the previous patch, enhance fontification of declarators to
take account of the presence/absence of "typedef".
* cc-engine.el (c-forward-type): New &optional param "brace-block-too".
(c-forward-decl-or-cast-1): cdr of return value now indicates the
presence of either or both of a "struct"-like keyword and "typedef".
* cc-fonts.el (c-complex-decl-matchers): Remove the heuristic fontification
of declarators which follow a "}".
* cc-langs.el (c-typedef-kwds c-typedef-key): New lang variable for
"typedef".
(c-typedef-decl-key): New lang varaible built from c-typedef-decl-kwds.
* cc-mode.el (c-advise-fl-for-region): Don't restrict to AWK Mode any more.
2010-10-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations):
Fontify declarators according to the
presence/absence of "typedef".
* tests/class-21.face, tests/decls-33.c, tests/decls-33.face, tests/decls-8.cc, tests/decls-8.face, tests/templates-4.face, tests/typedef-1.face:
CC Mode now correctly fontifies declarators according to the
presence/absence of "typedef". Adapt the test files accordingly.
2010-09-20 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el: Moved case 19 out of case 7
2010-09-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-<>-arglist-recur): Fix an infinite recursion.
* cc-engine.el (c-forward-<>-arglist-recur): Correct the indentation.
2010-08-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph, c-fill-paragraph):
Fix for the case that a C style
comment has its delimiters alone on their respective lines.
2010-08-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-align.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-mode.el, cc-mode.texi, cc-vars.el:
Eliminate some warning messages when Emacs 23 is used to compile them.
2010-07-31 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph): Fix auto-fill bug.
2010-07-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/000tests.el, tests/annotations-1.face, tests/annotations-1.java, tests/annotations-1.res, tests/enum-6.face, tests/enum-6.java, tests/enum-6.res, tests/foreach.face, tests/foreach.java, tests/foreach.res, tests/generics-1.face, tests/generics-1.java, tests/java-varargs.face, tests/java-varargs.java, tests/java-varargs.res, cc-engine.el, cc-fix.el, cc-fonts.el, cc-langs.el, cc-menus.el, cc-mode.el, cc-mode.texi, cc-vars.el, cc-defs.el:
Integrate java-0-1 branch: Enhance Java Mode to handle Java 5.0 (Tiger)
and Java 6 (Mustang). Contributed by Nathanial Flath.
2010-07-20 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el, cc-engine.el, cc-fix.el, cc-fonts.el, cc-langs.el, cc-menus.el, cc-mode.el, cc-mode.texi, cc-vars.el, tests/000tests.el, tests/annotations-1.face, tests/annotations-1.java, tests/annotations-1.res, tests/enum-6.face, tests/enum-6.java, tests/enum-6.res, tests/foreach.face, tests/foreach.java, tests/foreach.res, tests/generics-1.face, tests/generics-1.java, tests/java-varargs.face, tests/java-varargs.java, tests/java-varargs.res:
Integrate java-0-1 branch: Enhance Java Mode to handle Java 5.0 (Tiger)
and Java 6 (Mustang). Contributed by Nathanial Flath.
2010-07-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/comments-6.c, cc-mode.el:
Enhance `c-file-style' in file/directory local variables.
* cc-mode.el (c-count-cfss): New function.
(c-before-hack-hook): Call `c-set-style' differently according to whether
c-file-style was set in file or directory local variables.
tests/comments-6.c. Enter Emacs-24 as a version in which to ignore this
test.
2010-07-13 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-mode.texi: Fixed chaotic braces in 'Java Symbols'.
2010-06-30 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-mode.texi: Added more detail on new syntactic constructs
2010-06-20 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix an indentation bug with templates.
* cc-mode.el (c-common-init): Initialise c-new-BEG/END.
(c-neutralize-syntax-in-and-mark-CPP): c-new-BEG/END: Take account of
existing values.
* cc-engine.el (c-clear-<-pair-props-if-match-after)
(c-clear->-pair-props-if-match-before): now return t when they've cleared
properties, nil otherwise.
(c-before-change-check-<>-operators): Set c-new-beg/end correctly by
taking account of the existing value.
* cc-defs.el (c-clear-char-property-with-value-function): Fix this
to clear the property rather than overwriting it with nil.
* cc-mode.el (c-before-hack-hook):
When the mode is set in file local variables, set it
first.
2010-05-28 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el, cc-mode.texi, cc-vars.el, cc-cmds.el:
Amend the handling of c-beginning/end-of-defun in nested declaration
scopes.
* cc-vars.el (c-defun-tactic): Move here from cc-langs.el. Change it to a
defcustom.
* cc-mode.texi (Movement Commands): Document `c-defun-tactic'. Document
the new handling of nested scopes for movement by defuns.
* cc-langs.el (c-defun-tactic): Move this variable to cc-vars.el.
(c-nonlabel-token-2-key): New variable for change in cc-engine.el.
* cc-engine.el (c-beginning-of-statement-1): Prevent "class foo : bar"
being spuriously recognized as a label.
* cc-cmds.el (c-narrow-to-most-enclosing-decl-block): Add parameter
`inclusive' (to include enclosing braces in the region).
(c-widen-to-enclosing-decl-scope): New function.
(c-while-widening-to-decl-block): New macro.
(c-beginning-of-defun, c-end-of-defun): Change algorithm to keep going
outward for defun boundaries, and correspondingly change symbol
`respect-enclosure' to `go-outward'.
(c-declaration-limits): Change algorithm to report only the "innermost"
defun's boundaries.
2010-05-25 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-mode.texi:
Added descriptions of annotation-top-cont and annotation-var-cont into the manual.
2010-05-22 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-mode.el:
Moved annotation highlighting from java-mode to c-basic-matchers-after.
2010-05-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-parse-state-get-strategy): Replace parameter `here' with
`here-' and `here-+', which sandwich any pertinent CPP construct.
(c-remove-stale-state-cache-backwards): Fix a bug which happens when
doing (c-parse-state) in a CPP construct: Exclude any "new" CPP construct
from taking part in the scanning.
2010-05-21 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-langs.el, tests/generics-1.face, cc-engine.el:
Fixed problem where Java Generics were not always fontified.
2010-05-19 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-langs.el, tests/generics-1.face, tests/generics-1.java, cc-engine.el:
Fixed unit tests for template expressions and declarations. Still a few broken ones in the new unit tests for Java generics.
2010-05-18 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-langs.el, tests/annotations-1.face, tests/annotations-1.java, tests/annotations-1.res, cc-engine.el:
Fixed the bugs in annotation highlighting; annotation unit tests are now passing.
Also reindented c-forward-<>-arglist-recur and made a few changes that fixed some bugs in generic handline, but those unit tests are not entirely passing.
2010-05-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/annotations-1.face:
file annotations-1.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/annotations-1.java:
file annotations-1.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/annotations-1.res:
file annotations-1.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/enum-6.face:
file enum-6.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/enum-6.java:
file enum-6.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/enum-6.res:
file enum-6.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/foreach.face:
file foreach.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/foreach.java:
file foreach.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/foreach.res:
file foreach.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/generics-1.face:
file generics-1.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/generics-1.java:
file generics-1.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/java-varargs.face:
file java-varargs.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/java-varargs.java:
file java-varargs.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
* tests/java-varargs.res:
file java-varargs.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
2010-05-17 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el, cc-langs.el, cc-vars.el, tests/000tests.el, tests/annotations-1.face, tests/annotations-1.java, tests/annotations-1.res, tests/enum-6.face, tests/enum-6.java, tests/enum-6.res, tests/foreach.face, tests/foreach.java, tests/foreach.res, tests/generics-1.face, tests/generics-1.java, tests/java-varargs.face, tests/java-varargs.java, tests/java-varargs.res:
Added unit tests for new Java 1.5 constructs, as well as a few bug and formatting fixes.
Most of the issues brought up by Alan's CR have been fixed, with the
exception of annotations being font-locked in java-mode.
Additionally, most of the broken tests were fixed, at the cost of the
a few of the new unit tests not passing.
* tests/annotations-1.face, tests/annotations-1.java, tests/annotations-1.res, tests/enum-6.face, tests/enum-6.java, tests/enum-6.res, tests/foreach.face, tests/foreach.java, tests/foreach.res, tests/generics-1.face, tests/generics-1.java, tests/java-varargs.face, tests/java-varargs.java, tests/java-varargs.res:
New file.
2010-04-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-extend-region-for-CPP):
Fix an off-by-one error (EO-macro position).
2010-04-28 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el:
Improved c-forward-annotation to handle annotations with arglists properly.
* cc-vars.el, cc-engine.el:
Added two syntactic contexts to support annotations in java.
The first, annotation-top-cont, represents a topmost continuation where the only items preceding the current line are annotations. An example is:
@Test
_ public void testFoo() {}
The second is annotation-var-cont, representing a statement continuation where the only preceding items are annotations, such as:
class Test {
public static void main() {
@SuppressWarnings
_int i;
}
}
2010-04-27 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el: Fixed indentation.
* cc-engine.el:
Added support for for:each loops and fixed a few bugs this uncovered in generic highlighting.
2010-04-26 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-align.el, cc-awk.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-fix.el, cc-langs.el, cc-lobotomy.el, cc-menus.el, cc-styles.el, cc-vars.el:
Replace leading spaces by <TAB> characters throughout the source.
* cc-awk.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-fix.el, cc-fonts.el, cc-langs.el, cc-lobotomy.el, cc-menus.el, cc-styles.el, cc-vars.el, cc-align.el:
Replace leading spaces by <TAB>s, synched with java-0-1-merge-3.
* cc-awk.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-fix.el, cc-langs.el, cc-lobotomy.el, cc-menus.el, cc-styles.el, cc-vars.el, cc-align.el:
Replace leading spaces by <TAB> characters throughout source.
* cc-mode.texi, cc-mode.el, cc-engine.el:
Merge from Branch_5_31, tag java-0-1-merge-2.
2010-04-24 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el, cc-langs.el:
Added correct fontification for Java generics and varargs.
2010-03-25 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi (Other Indentation):
State that functions on c-special-indent-hook are
called with no parameters and with point on the current line.
2010-03-23 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-mode.el, cc-vars.el:
Renamed java-annotation-face to c-annotation-face and moved it to cc-fonts.el
2010-03-22 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el: *** empty log message ***
* cc-engine.el (c-remove-stale-state-cache): Fix an off-by-one error.
2010-03-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: *** empty log message ***
* cc-mode.el:
Guard against the Emacs core spuriously calling before-change-functions
twice in succession.
(c-just-done-before-change): New flag
(c-before-change): Test and set the new flag before executing anything.
(c-after-change): Clear the flag.
2010-03-11 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-langs.el, cc-mode.el, tests/inher-5.res, tests/inher-6.res, tests/templates-16.res, tests/templates-5.res, tests/templates-7.res, tests/templates-8.res, cc-cmds.el, cc-defs.el, cc-engine.el:
Merge from BRANCH_5_31, tag java-0-1-merge-1.
2010-03-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el: *** empty log message ***
* cc-engine.el (c-remove-stale-state-cache):
Correct the previous patch.
* cc-engine.el: *** empty log message ***
* cc-engine.el (c-remove-stale-state-cache):
Take account of when `good-pos' is in the same
macro as `here'.
* cc-engine.el, cc-mode.el: *** empty log message ***
* cc-mode.el (c-common-init): In the funcall, replace the erroneous `beg',
`end' with (point-min), (point-max).
(c-after-change): After (e.g.) C-y, remove the 'syntax-table text props
that Emacs has converted from 'category text props.
* cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props): Clear the
'category text property, not the 'syntax-table one.
2010-02-19 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el, cc-langs.el, cc-mode.el, cc-vars.el:
Removed trailing whitespace from cc-vars and cc-engine, and fixed typo (xJava -> Java)
2010-02-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, cc-mode.el: *** empty log message ***
* cc-mode.el (c-common-init): Use c-get-state-before-change-functions in
place of c-get-state-before-change-function. Update some comments about
this.
* cc-engine.el: Update some comments about
c-get-state-before-change-function.
* cc-cmds.el, cc-defs.el, cc-engine.el, cc-langs.el, cc-mode.el:
*** empty log message ***
Change strategy for marking < and > as template delimiters: mark them
strictly in matching pairs.
* cc-mode.el (c-before-change): Use c-get-state-before-change-functions.
* cc-langs.el (c-no-parens-syntax-table): New syntax table, used for
searching syntactically for matching <s and >s.
(c-get-state-before-change-functions): New language variable (note the
plural) which supersedes c-get-state-before-change-function.
* cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props)
(c-clear-<>-pair-props, c-clear-<-pair-props-if-match-after)
(c-clear->-pair-props-if-match-before)
(c-before-change-check-<>-operators): new functions.
(c-after-change-check-<>-operators): Use macro c-unmark-<->-as-paren.
* cc-defs.el (c-search-backward-char-property): New macro.
* cc-cmds.el (c-electric-lt-gt): Do not set text properties on < and > any
more. (These will be handled by font locking.)
2010-01-25 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-mode.el, cc-vars.el: Highlighting for Java annotation usage
2010-01-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el: *** empty log message ***
* cc-engine.el:
Fix a situation where deletion of a cpp construct throws an error.
(c-invalidate-state-cache): Before invoking
c-with-all-but-one-cpps-commented-out, check that the special cpp
construct is still in the buffer.
(c-parse-state): Record the special cpp with markers, not numbers.
* cc-defs.el: *** empty log message ***
* cc-defs.el:
typing '#' in an empty C buffer throws "args out of range".
(c-set-cpp-delimiters, c-clear-cpp-delimiters): Check for EOB playing the
role of delimiter.
2010-01-19 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-langs.el: Highlight annotations as types
* cc-mode.el, cc-langs.el: highlighting of @interface in java-mode
2010-01-06 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-menus.el:
Fixed issue with cc-imenu-java-generic-expression not handling array arguments properly
2009-12-31 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-langs.el:
Fix for enum indentation in Java. Aligns all enum options on the same column.
* cc-langs.el: Added proper highlighting for java enums
2009-12-10 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/templates-19.cc, tests/templates-19.res:
Test template use in statements when the templates span line breaks.
* tests/inher-5.res, tests/inher-6.res, tests/templates-16.res, tests/templates-5.res, tests/templates-7.res, tests/templates-8.res:
Amend for the second anchor point just added to template-args-cont.
Handle templates continued over line breaks in statements. Refactor
c-syntactic-skip-backward. Make text property `category' rear
non-sticky.
* cc-mode.el (c-basic-common-init): make text property `category' rear
non-sticky.
* cc-engine.el (c-ssb-lit-begin): New defsubst, extracted from ....
(c-syntactic-skip-backward): Refactor, extracting the above.
(c-guess-basic-syntax CASEs 5D.3, 5L): Add extra anchor point;
(c-guess-basic-syntax CASE 19): New CASE to handle template
construct continued over line boundary.
(c-guess-basic-syntax CASE 7): don't trigger on '<'.
2009-12-03 Alan Mackenzie <bug-cc-mode@gnu.org>
Enhance `c-parse-state' to run efficiently in "brace desserts".
cc-mode.el (c-basic-common-init): Call c-state-cache-init.
(c-neutralize-syntax-in-and-mark-CPP): Renamed from
c-extend-and-neutralize-syntax-in-CPP. Mark each CPP construct by
placing `category' properties value 'c-cpp-delimiter at its
boundaries.
* cc-langs.el (c-before-font-lock-function):
c-extend-and-neutralize-syntax-in-CPP has been renamed
c-neutralize-syntax-in-and-mark-CPP.
* cc-fonts.el (c-cpp-matchers): Mark template brackets with
`category' properties now, not `syntax-table' ones.
* cc-engine.el (c-syntactic-end-of-macro): A new enhanced (but
slower) version of c-end-of-macro that won't land inside a literal
or on another awkward character.
(c-state-cache-too-far, c-state-cache-start)
(c-state-nonlit-pos-interval, c-state-nonlit-pos-cache)
(c-state-nonlit-pos-cache-limit, c-state-point-min)
(c-state-point-min-lit-type, c-state-point-min-lit-start)
(c-state-min-scan-pos, c-state-brace-pair-desert)
(c-state-old-cpp-beg, c-state-old-cpp-end): New constants and
buffer local variables.
(c-state-literal-at, c-state-lit-beg)
(c-state-cache-non-literal-place, c-state-get-min-scan-pos)
(c-state-mark-point-min-literal, c-state-cache-top-lparen)
(c-state-cache-top-paren, c-state-cache-after-top-paren)
(c-get-cache-scan-pos, c-get-fallback-scan-pos)
(c-state-balance-parens-backwards, c-parse-state-get-strategy)
(c-renarrow-state-cache)
(c-append-lower-brace-pair-to-state-cache)
(c-state-push-any-brace-pair, c-append-to-state-cache)
(c-remove-stale-state-cache)
(c-remove-stale-state-cache-backwards, c-state-cache-init)
(c-invalidate-state-cache-1, c-parse-state-1)
(c-invalidate-state-cache): New defuns/defmacros/defsubsts.
(c-parse-state): Enhanced and refactored.
(c-debug-parse-state): Amended to deal with all the new
variables.
* cc-defs.el (c-<-as-paren-syntax, c-mark-<-as-paren)
(c->-as-paren-syntax, c-mark->-as-paren, c-unmark-<->-as-paren):
modify to use category text properties rather than syntax-table
ones.
(c-suppress-<->-as-parens, c-restore-<->-as-parens): new defsubsts
to switch off/on the syntactic paren property of C++ template
delimiters using the category property.
(c-with-<->-as-parens-suppressed): Macro to invoke code with
template delims suppressed.
(c-cpp-delimiter, c-set-cpp-delimiters, c-clear-cpp-delimiters):
New constant/macros which apply category properties to the start
and end of preprocessor constructs.
(c-comment-out-cpps, c-uncomment-out-cpps): defsubsts which
"comment out" the syntactic value of characters in preprocessor
constructs.
(c-with-cpps-commented-out)
(c-with-all-but-one-cpps-commented-out): Macros to invoke code
with characters in all or all but one preprocessor constructs
"commented out".
2009-11-23 Nathaniel Flath <bug-cc-mode@gnu.org>
* cc-menus.el:
Updating cc-imenu-java-generic-expression in order to match Java1.6 methods with generics and annotations.
2009-09-25 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-nonlabel-token-key): Allow quoted character constants (as
case labels).
* cc-engine.el (c-beginning-of-statement-1): Correct buggy bracketing.
2009-09-24 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-scan-conditionals):
A new function like c-forward-conditionals, but it
doesn't move point and doesn't set the mark.
(c-up-conditional, c-up-conditional-with-else, c-down-conditional)
(c-down-conditional-with-else, c-backward-conditional)
(c-forward-conditional): Refactor to use c-scan-conditionals.
* cc-bytecomp.el (cc-bytecomp-ignore-obsolete):
In Emacs 23, byte-compile-warnings isn't
always a list any more. Use new function byte-compile-disable-warning
here.
2009-08-26 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/release.php:
Update and clarify the current status of the 5.31.n releases.
* cc-defs.el (c-version):
increment the version number to 5.31.8.prerelease.
2009-07-24 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el, cc-mode.texi:
Whilst initialising a mode, make any explicit setting of a variable take
precedence over one done via c-file-style/c-file-offsets.
* cc-mode.el (c-before-hack-hook, c-postprocess-file-styles): give
c-set-style a DONT-OVERRIDE parameter of t in each function.
* cc-mode.texi (Config Basics, File Styles): Amend documentation.
2009-06-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph):
Remove a spurious correction between the visible
width of TABs and their number of bytes, so that point is undisturbed
after typing a space, when there are tabs just before "*/".
2009-06-10 Alan Mackenzie <bug-cc-mode@gnu.org>
Introduce "font lock contexts", to enable (in particular) jit-lock to fontify
correctly when starting in the middle of a construct. Implement this for CPP
expressions.
* cc-langs.el (c-cpp-expr-intro-re): New variable.
* cc-fonts.el (c-guess-font-lock-context): New function.
(c-font-lock-context): New buffer local variable.
(c-make-font-lock-search-form): New function, extracted from
c-make-font-lock-search-function.
(c-make-font-lock-search-function): Use the above function.
(c-make-font-lock-context-search-function): New function.
(c-cpp-matchers): Enhance the preprocessor expression case as above.
(c-font-lock-complex-decl-prepare): Call c-guess-font-lock-context.
2009-05-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-before-font-lock-function): Change the name of an entry
to c-extend-and-neutralize-syntax-in-CPP.
* cc-mode.el (c-basic-common-init): Set
font-lock-extend-after-change-region-function to
c-extend-after-change-region for Emacs 22 and later.
(c-before-hack-hook): Correct "hack-local-variables-alist" to
"file-local-variables-alist".
(c-extend-and-neutralize-syntax-in-CPP): Renamed from
c-neutralize-syntax-in-CPP; it now extends the font lock region by
setting c-new-BEG and c-new-END.
(c-font-lock-init): Remove initialization of obsolete variable
font-lock-lines-before.
(c-extend-after-change-region): New function.
(c-advise-fl-for-region): Generated code now extends f-l region for any
CC Mode, not just AWK Mode.
* cc-fonts.el, cc-engine.el:
Undo the last change, which was ill thought out, apart from the macro
c-search-forward-char-property and some enhancements to comments.
2009-05-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-invalid-cpp-string-matcher): New function.
(c-basic-matchers-before): New clause to fontify invalid strings in a CPP
construct.
* cc-engine.el: Update some commenting.
* cc-defs.el (c-search-forward-char-property): new macro.
2009-04-30 Alan Mackenzie <bug-cc-mode@gnu.org>
Enhancements for Objective-C:
* cc-vars.el: (c-objc-method-arg-min-delta-to-bracket,
c-objc-method-arg-unfinished-offset, c-objc-method-parameter-offset): New
variables.
(c-offsets-alist): Use c-lineup-ObjC-method-call-colons in entry for
objc-method-call-cont.
* cc-langs.el: (c-constant-kwds): New ObjC keywords "YES", "NO",
"NS_DURING", "NS_HANDLER", "NS_ENDHANDLER".
* cc-align.el: (c-lineup-ObjC-method-call-colons): New function.
* cc-menus.el: (cc-imenu-objc-function): Remove calls of
imenu-progress-message.
2009-03-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el, cc-engine.el, cc-fonts.el, cc-langs.el, cc-mode.texi, cc-vars.el:
Amend to indent and fontify macros "which include their own semicolon"
correctly, using the "virtual semicolon" mechanism.
* cc-defs.el: Update "virtual semicolon" comments.
* cc-engine.el (c-crosses-statement-barrier-p): Recoded to scan one line at
at time rather than having \n and \r explicitly in c-stmt-delim-chars
(for some modes, e.g. AWK).
(c-forward-label): Amend for virtual semicolons.
(c-at-macro-vsemi-p, c-macro-vsemi-status-unknown-p): New functions
* cc-fonts.el (c-font-lock-declarations): Take account of the new C macros.
* cc-langs.el (c-at-vsemi-p-fn, c-vsemi-status-unknown-p-fn): move to
earlier in the file.
(c-opt-cpp-symbol, c-line-comment-start-regexp): New language variables.
(c-opt-cpp-macro-define): Make into a full language variable.
(c-stmt-delim-chars, c-stmt-delim-chars-with-comma): Special value for
AWK Mode (including \n, \r) removed, no longer needed.
* cc-mode.el (c-mode, c++-mode, objc-mode): Invoke
c-make-macro-with-semi-re. (Erroneously committed early, in previous
version, 5.259.)
* cc-vars.el (c-macro-with-semi-re, c-macro-names-with-semicolon): New
variables.
(c-make-macro-with-semi-re): New function
* cc-mode.texi (Indentation Commands): Mention "macros with semicolons".
(Other Special Indentations): Add an xref to "Macros with ;".
(Customizing Macros): Add stuff about syntax in macros. Add an xref to
"Macros with ;".
(Macros with ;): New page.
2009-02-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el:
Allow (compile time) expressions in case clauses.
* tests/switch-16.c, tests/switch-16.res: New file.
* tests/switch-16.c, tests/switch-16.res:
Test files for "case <expression>:".
2009-02-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-defun-name): Widen, so it works on a narrowed region.
2009-02-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-emacs-features):
Check the working of beginning/end-of-defun-function
more rigorously before setting argumentative-bod-function.
2009-01-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-styles.el (c-setup-paragraph-variables):
Ensure paragraph-\(start\|separate\) match
blank lines. For AWK Mode.
2008-11-07 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/000tests.el (cc-test-extend-faces):
When two faces aren't distinct, display a
`message' rather than throwing an `error', a barely understood kludge to
allow interactive use of 000tests.el.
(do-all-tests): reset buffer *cc-test-log* to read/write after calling
`compilation-mode'.
* tests/top-4.res, tests/statement-15.res, tests/macro-8.res, tests/macro-7.res, tests/macro-3.res, tests/comments-4.res, tests/bracelist-11.res, tests/access-labels-qt-1.res:
Correct the syntactical analysis of subsequent macro continuation lines.
They are now never 'cpp-define-intro'.
2008-11-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-label):
Handle the new QT macros Q_SLOTS and Q_SIGNALS.
2008-10-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-recognize-<>-arglists):
Enable this, crudely, for java. This will
enable certain constructs with generics to be recognized, although it
won't correctly handle the general use of generics.
2008-10-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-defun-name):
Make it work for "struct foo bar [] = { ...".
2008-10-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-region):
Fix previous patch so that the function works on
one-line macros.
2008-10-07 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-before-hack-hook):
New hook function for new hook (in Emacs 23)
(top level): Use this new hook if it's there, otherwise use
hack-local-variables-hook.
* cc-mode.el (c-mode-base-map):
Don't bind C-m-[ae] to c-{beginning,end}-of-defun when
the current Emacs version passes a parameter to
{beginning,end}-of-defun-function.
* cc-engine.el (c-literal-type, c-forward-decl-or-cast-1, c-at-toplevel-p):
Amend doc
strings.
(c-forward-decl-or-cast-1): Add in comments like "CASE 1", "CASE 2", ...
which will later (hopefully) be fleshed out with detailed comments.
* cc-cmds.el (c-indent-region):
Fix so that indenting a macro followed by blank lines
doesn't backslash the following non-blank line into the macro.
* cc-align.el (c-lineup-respect-col-0): New function.
* cc-styles.el (c-style-alist "ellemtel"):
Move arglist-cont-nonempty into
c-hanging-braces-alist.
Change some `mapcar's into `mapc's.
2008-10-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cvstest.txt: Initial commision.
* cvstest.txt: New file.
2008-10-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): For "if (a<0 || b>99)", set
c-restricted-<>-arglists to t, so that the innards aren't treated as a
template bracket enclosure. Also refactor the code here.
2008-08-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-emacs-features):
set `argumentative-bod-function' when the Emacs core
passes ARG through to `beginning-of-defun-function'.
2008-06-28 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Improve the doc string.
* cc-langs.el (c-defun-tactic): New language variable defining BO-defun.
(This was already being used, although not defined.)
* cc-cmds.el (c-where-wrt-brace-construct): Fix problem with "labels" (e.g.
"private:") at the top level.
2008-06-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax CASE 5D.5):
Fix an infinite loop on invalid syntax.
2008-05-24 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-postprocess-file-styles):
Throw an error if c-file-style is set to a
non-string.
(c-neutralize-syntax-in-CPP): Optimize for speed.
2008-05-22 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax, CASE 5B.1):
Fix off-by-1 error, comparing position
of ':' with BOL.
2008-05-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi (Class Symbols): Correct a typo.
* cc-fonts.el (c-font-lock-declarations):
In "if (Bool *b = f())", fontify "Bool" as a
type.
Also enhance the commenting significantly.
2008-04-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-type-decl-prefix-key): C++ bit: move
"\(const\|throw\|volatile\)\>" nearer the start of the regexp, so that
these keywords aren't wrongly matched as identifiers.
* cc-fonts.el (c-font-lock-declarators): In (match-beginning 2), "2" ->
"3", corresponding to the change in c-type-decl-prefix-key.
(c-font-lock-maybe-decl-faces): Rearranged the header comments.
* cc-engine.el (c-find-decl-spots): Rearranged the header comments.
(c-forward-decl-or-cast-1): (i) In (match-beginning 2), "2" -> "3",
corresponding to the change in c-type-decl-prefix-key. (ii) Remove a
check for a semicolon at the end of a function declaration: this causes
C++ constructor declarations to be fontified before the semicolon is
typed.
* cc-defs.el (c-version): increment the version number to 5.31.6.
2008-04-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-modified-constant): new language constant: matches, e.g.
"L'a'".
* cc-engine.el (c-beginning-of-statement-1): modify to handle "case L'a':".
* cc-fonts.el (c-font-lock-complex-decl-prepare):
Remove (most) c-type properties also
from the last token _before_ the (font-lock) region, not just those
actually inside it.
Enhance some of the commenting.
2008-04-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/anoncvs.php, admin/compat.php, admin/index.php, admin/lists.php, admin/release.php:
Update to current admin state.
2008-04-10 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi (c-offsets-alist):
Correct typos ("c-set-offsets" -> "c-set-offset",
twice).
2008-04-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-before-font-lock-function):
Correct a typo in the doc string.
2008-04-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, cc-mode.texi:
* cc-cmds.el (c-defun-name, c-cpp-define-name): New commands, primarily to
support (X)Emacs's C-x 4 a (`add-change-log-entry-other-window') and
friends.
* cc-langs.el (c-opt-cpp-macro-define-start): Add a regexp submatch to
match the #define's name.
* cc-mode.el (c-neutralize-syntax-in-CPP):
Remove a superfluous right parenthesis.
* cc-mode.texi, cc-engine.el:
* cc-engine.el (c-in-knr-argdecl): In a suspected K&R region, scan at most
20 brace/paren pairs. This prevents a drastic slowdown in files (e.g.
Emacs's lisp.h) where there are many consecutive declarations without a
brace block.
* cc-mode.texi ("Limitations and Known Bugs") Document this restriction.
* cc-vars.el (c-constant-symbol):
put `save-excursion' round this function.
2008-03-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-neutralize-syntax-in-CPP): Fix coding bug.
* cc-langs.el (c-before-font-lock-function):
Fix bug in doc-string, "c-old-LEN" ->
"c-old-END".
2008-02-25 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-neutralize-syntax-in-CPP):
Fix a bug on typing "#" at EOB.
2008-02-23 Alan Mackenzie <bug-cc-mode@gnu.org>
Set of changes so that "obtrusive" syntactic elements in a C/C++/ObjC
preprocessor line (e.g. an unbalanced string quote or unmatched paren) don't
interact syntactically with stuff outside the CPP line.
* cc-awk.el (c-awk-beyond-logical-line, c-awk-old-ByLL): Replace
c-awk-end-of-logical-line and c-awk-old-EoLL to solve an off-by-one bug.
(c-awk-record-region-clear-NL): Replaces c-awk-before-change, with a bit
of refactoring.
(c-awk-extend-and-syntax-tablify-region): Takes some of the functionality
of c-awk-advise-fl-for-awk-region, which has been refactored away.
* cc-defs.el (c-clear-char-property-with-value-function)
(c-clear-char-property-with-value): New function and macro which remove
text-properties `equal' to a supplied value.
* cc-engine.el: Comment about text properties amended.
* cc-fonts.el (c-cpp-matchers): Make it put regexp parens around
"error\\|warning".
* cc-langs.el (c-get-state-before-change-function)
(c-before-font-lock-function, c-anchored-cpp-prefix): New language
variables.
(c-cpp-message-directives): Handle "#warning" in C, C++ and ObjC.
* cc-mode.el (c-basic-common-init): C and ObjC now use
syntax-table text properties.
(c-common-init): Call language specific before/after-change functions at
mode initialisation.
(c-new-BEG, c-new-END, c-old-BOM, c-old-EOM): New variables.
(c-extend-region-for-CPP, c-neutralize-CPP-line)
(c-neutralize-syntax-in-CPP): New functions.
(c-before-change, c-after-change): Call the new language specific change
functions defined in cc-langs.el.
(c-advise-fl-for-region): New macro.
(awk-mode): Remove AWK specific stuff which has been refactored into
language independent stuff.
2008-02-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el (c-specifier-key):
Exclude "template" from this regexp; to anchor the "{" of a
template function correctly on "template", not the following "<".
* cc-engine.el (c-guess-basic-syntax, CASE 5A.5):
Anchor the "{" of a template function
correctly on "template", not the following "<".
(c-guess-basic-syntax, CASE 5H): prevent a macro call inside a struct
being recognised as a K&R argument.
* cc-align.el, cc-awk.el, cc-cmds.el, cc-defs.el, cc-styles.el:
Correct typos, remove WS, rephrase doc-strings/comments a little.
2008-01-26 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-save-buffer-state):
Bind buffer-file-name and buffer-file-truename to
nil, to prevent primitives generating "buffer is read only" messages.
2008-01-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-vars.el (defcustom-c-stylevar):
New version by Thien-Thi Nguyen which gets rid of
ugly nested backquotes.
* tests/000tests.el (do-all-tests, do-one-test):
bind 'enable-local-variables so as to get
round GNU Emacs's tighter restrictions on file local variables.
* cc-awk.el:
awk-escaped-nls*: Use eval-and-compile to avoid compilation error.
2007-11-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/release.php: Explain about version 5.31.4.
2007-09-22 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/links.h:
At an extra link to directory "manual". Rename "Documentation" to
"Manual", clarifying with "(html)" and "(info/PS/DVI)".
2007-08-25 Alan Mackenzie <bug-cc-mode@gnu.org>
With two "namespace"s on the same line, the next line's syntactic context
(i) gets 2 "innamespace" elements, not 1 defun-block-intro + 1
innamespace;
(ii) the anchor points are now those of the namespace constructs, not
just the line's indentation.
* cc-langs.el (c-other-decl-block-key-in-symbols-alist): a new language
variable, an alist with elements like ("namespace" . innamespace).
* cc-engine.el (c-brace-anchor-point): New function. (c-add-stmt-syntax):
Give accurate anchor points for "namespace", "extern" etc., rather than
BOI. Fix addition of spurious syntactic-symbol 'defun-block-intro,
replacing it with 'innamespace, etc.
2007-08-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
"Mailing Lists and Bug Reports": correct "-no-site-file" to
"--no-site-file".
2007-07-28 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el, cc-mode.el:
Move macro call `c-make-emacs-variables-local' from
c-init-language-vars-for to c-make-init-lang-vars-fun, so that it works
for derived modes.
2007-07-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* Makefile:
Rename target "html" to "html-raw". New "html" fixes up links to the
Emacs/Elisp manuals, pointing them into http://www.gnu.org.
* 2www.gnu.org.sh: Add a #! line, and a directory parameter.
2007-07-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* 2www.gnu.org.sh:
The manual has cross references to the Emacs and Elisp manuals. In the
HTML manual, these became broken links. This script directs those links
to the right places in http://www.gnu.org. (It also removes a link to a
manual which doesn't seem to exist online.)
2007-07-11 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/access-labels-qt-1.face, tests/class-1.face, tests/class-23.face, tests/class-4.face, tests/class-9.face, tests/interface-1.face, tests/switch-1.face, tests/switch-10.face, tests/switch-12.face, tests/switch-14.face, tests/switch-15.face, tests/switch-3.face, tests/templates-1.face, tests/templates-2.face, tests/templates-3.face, tests/templates-4.face, tests/templates-6.face, tests/union-2.face:
Update 18 files.face to reflect the change in cc-fonts.el
V5.205.2.4/5.209: Keywords which are terminated by a colon (e.g.
default:, public:) and the analogous Objective-C keywords are now
fontified with font-lock-keyword-face.
2007-07-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-version):
Increase to 5.31.5. (5.31.4 was the version in Emacs 22.1.)
2007-07-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-vars.el:
Repair the customization routines which handle alists so that it is
possible to insert entries for those keys which are valid, yet aren't
currently in the alist.
(c-constant-symbol): New defun which supersedes c-const-symbol.
(c-indent-comment-alist, c-hanging-braces-alist, c-hanging-colons-alist,
c-offsets-alist): Replace c-const-symbol by c-constant-symbol.
Make the syntactic symbol arglist-cont-nonempty a legitimate key in
c-hanging-braces-alist.
* cc-cmds (c-brace-newlines): Amend.
* cc-styles.el (c-style-alist): Extend all standard styles to include the
new element.
* cc-vars.el (c-hanging-braces-alist): Amend the default value, and the
customization form.
* cc-mode.el: c-before-change: Replace a "1" with "(point-min)".
* cc-cmds.el, cc-mode.el: cc-cmds.el (c-electric-slash):
* cc-mode.el (c-remove-any-local-eval-or-mode-variables):
Replace wrong uses of `kill-...' (which added spurious entries to the
kill ring) by `delete-....'.
* cc-cmds.el (c-in-function-trailer-p):
Fix this: when a function return type contains
"struct", "union", etc. c-end-of-defun goes too far forward.
* cc-subword.el (c-capitalize-subword):
More closely mimic the behavior of `capitalize-word'.
Do not move point with a negative argument. Based on tiny change by Paul
Curry.
* cc-subword.el (c-downcase-subword, c-upcase-subword):
Don't move point if ARG is
negative. Patch by Paul Curry.
Changes to make `narrow-to-defun' and `mark-defun' work properly
in CC Mode:
* cc-defs.el (c-beginning-of-defun-1):
* cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
Bind beginning/end-of-defun-function to nil around calls to
beginning/end-of-defun.
* cc-langs.el (beginning-of-defun-function,
end-of-defun-function): New c-lang-setvar's.
* cc-awk.el (c-awk-beginning-of-defun): Add "(or arg
(setq arg 1))" to enable non-interactive call.
* cc-cmds.el (c-end-of-defun):
Tidy up, to eliminate byte-compiler warning "value
unused" in Emacs 22.
2007-07-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-paren):
Fix space-before-funcall clean-up: only insert space
when on identifier, etc. Patch by David Hansen.
Fix fontification of labels, and other things with ":".
* cc-engine.el (c-forward-label): The function now
returns 'goto-target, 'qt-2kwds-colon, 'qt-1kwd-colon, as well as the
former t.
* cc-fonts.el (c-font-lock-declarations): Interpret the
new return code from c-forward-label, fontifying tokens properly. Add
some general comments throughout the file.
* cc-vars.el (c-special-indent-hook): Amend doc-string to mention
c-syntactic-indentation.
* cc-cmds.el (c-forward-to-nth-EOF-}): Fix EOB bug.
* cc-mode.el (c-make-emacs-variables-local):
Use `mapcar' rather than `mapcan' to
silence compiler warning in GNU Emacs 22.
Remove stale tokens from `c-found-types' cache.
* cc-engine.el: (c-partial-ws-p, c-unfind-type, c-trim-found-types): New
functions.
* cc-mode.el: (c-unfind-enclosing-token, c-unfind-coalesced-tokens,
c-before-change): New functions. (c-maybe-stale-found-type): New
variable.
2007-06-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/lists.php: Update the address of the cc-mode-help mailing list.
2007-03-16 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
* cc-styles.el: cc-align.el, cc-styles.el: New line-up function,
c-lineup-gnu-DEFUN-intro-cont, for the DEFUN macro in the Emacs C
sources. Only used in "gnu" style.
* cc-align.el: Correct a logistical error in the previous patch.
* cc-align.el: cc-align.el, cc-styles.el: New line-up function,
c-lineup-gnu-DEFUN-intro-cont, for the DEFUN macro in the Emacs C
sources. Only used in "gnu" style.
* cc-compat.el, cc-langs.el, cc-menus.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el:
Update the copyright statements, correct some typos, remove silly WS,
improve a few comments.
2007-02-24 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-menus.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el, cc-compat.el, cc-langs.el:
Update the copyright statements, correct some typos, remove silly WS,
improve a few comments.
* cc-mode.texi: Correct lots of typos.
("Getting Started"): Change a sentence to the conditional.
("Movement Commands"): Add missing (@code{c-beginning/end-of defun}).
("Clean-ups"): Add an example for inserting a clean-up into
c-cleanup-list.
* cc-mode.el (c-basic-comment-init):
Don't set open-paren-in-column-0-is-defun-start
to nil any more. Discussion in emacs-devel showed this was
counter-productive.
* cc-fonts.el: Added comments to c-font-lock-complex-decl-prepare,
c-font-lock-<>-arglists, c-font-lock-declarations, c-font-lock-c++-new,
explaining that they get called as font-lock "FUNCTION"s; to
c-font-lock-declarations (a c-lang-defconst) explaining that it dumps
these functions to c-matchers-3.
* cc-engine.el (c-beginning-of-current-token):
For no movement, return NIL, not 0.
(c-in-knr-argdecl): Fixed, so that it doesn't get confused by "[]" when
doing a C-M-a.
* cc-defs.el (c-go-list-forward, c-go-list-backward): New macros.
* cc-cmds.el (c-where-wrt-brace-construct):
correct the handline of K&R regions; C-M-a
was fouling up in them.
(c-indent-line): Change the notion of "whitespace" used for <tab>, so
that a ^L doesn't get swallowed.
(c-mask-paragraph): Correct the handling of unclosed C-style comments,
(for when auto-fill-mode is enabled).
(c-indent-new-comment-line): With M-j in an empty C-style comment,
correct the final position of point.
2006-11-12 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix clean-up space-before-funcall so that it doesn't split the identifer
from the parentheses in "#define foo(..)".
* cc-langs.el (c-opt-cpp-macro-define-id): new language variable.
* cc-engine.el (c-forward-over-cpp-define-id): new function.
* cc-cmds.el (c-electric-paren): Amend the function.
2006-11-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* README: Tell XEmacs users they need the "advice" package.
* tests/access-labels-qt-1.res, tests/bracelist-11.res, tests/comments-4.res, tests/macro-3.res, tests/macro-7.res, tests/macro-8.res, tests/statement-15.res, tests/top-4.res:
Correct the syntactical analysis of subsequent macro continuation lines.
They are now never 'cpp-define-intro'.
* tests/macro-23.c, tests/macro-23.res: New file.
* tests/macro-23.c, tests/macro-23.res:
New test case for plain statements as the continuation lines of a macro.
* tests/macro-27.c, tests/macro-27.res:
A new test case for a wierd mixture of invalid syntax with CPP, labels,
and an escaped newline.
* tests/macro-27.c, tests/macro-27.res: New file.
* cc-engine.el:
(i) (c-guess-basic-syntax, case 5N): Check the format of c-state-cache is
valid for an optimisation before using it.
(ii) (c-guess-basic-syntax): New case 5Q "we are at a statement within a
macro". Other changes so that only the first continuation line in a
macro gets the symbol `cpp-define-intro', the others get `statement', or
whatever.
* cc-mode.texi ("Limitations and Known Bugs"):
Document problems with eval-after-load
and a workaround.
2006-07-20 Alan Mackenzie <bug-cc-mode@gnu.org>
Introduce macro c-lang-setvar (sister to c-lang-defvar) to set standard
Emacs variables (like comment-start) to language dependent values, yet
without spuriously "defvar"ing them.
* cc-langs.el (c-emacs-variable-inits): new variable.
(c-lang-setvar): new macro.
(c-make-init-lang-vars-fun): Use the initialization forms in
c-emacs-variable-inits in addition to those in c-lang-variable-inits.
(comment-start, comment-end, comment-start-skip): Change these from
c-lang-defvar's to c-lang-setvar's
* cc-mode.el (c-make-emacs-variables-local): new macro, which calls
make-local-variable on the elements of c-emacs-variable-inits.
(c-init-language-vars-for): Call this macro.
2006-07-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-mode.texi:
* cc-mode.texi ("Filling and Breaking"): Amend the doc for
c-context-line-break.
* cc-mode.texi, cc-cmds.el:
* cc-cmds.el (c-context-line-break): When invoked within a string, preserve
whitespace. Add a backslash only when also in a macro.
* cc-mode.texi ("Filling and Breaking"): Amend the doc for
c-context-line-breaak.
2006-07-10 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el: cc-defs.el. Correct typos.
* cc-awk.el, cc-fonts.el: Move awk-font-lock-keywords from cc-fonts.el back
to cc-awk.el to eradicate an eval-after-load, at the request of RMS.
2006-07-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-context-line-break): don't indent the new line after an
escaped EOL in a string.
2006-07-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/label-10.c, tests/label-10.res:
label-10.{c,res}: Recognise "foo:" as a label when it directly follows "else",
"do", ....
* tests/label-10.c, tests/label-10.c~, tests/label-10.res: New file.
* tests/label-10.c, tests/label-10.c~, tests/label-10.res:
label-10.{c,res}: Recognise "foo:" as a label when it directly follows "else",
"do", ....
* cc-engine.el (c-forward-label): Recognise "foo:" as a label when it
directly follows "else", "do", ....
2006-07-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/templates-18.cc, tests/templates-18.res: New file.
* tests/templates-18.cc, tests/templates-18.res:
templates-18.{cc,res}: tolerate empty angle brackets (as
seen in "explicit specialisations" of templates).
* cc-engine.el (c-looking-at-decl-block): tolerate empty angle brackets (as
seen in "explicit specialisations" of templates).
2006-05-16 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/anoncvs.php, admin/links.h:
Update the CVS server name to "cc-mode.cvs.sourceforge.net".
* admin/anoncvs.php, admin/links.h:
Update the CVS server to "cc-mode.cvs.sourceforge.net".
2006-05-14 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/anoncvs.php:
Update the CVS host (following a SourceForge upgrade).
2006-04-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi, cc-vars.el:
* cc-vars.el (c-indentation-style): Mention c-file-style in the doc-string.
* cc-mode.texi ("Choosing a Style"): Mention c-file-style.
* cc-cmds.el (c-mask-paragraph): Fix for C comments, when the comment ender
looks like "=========*/" and is alone on its line.
* cc-langs.el, cc-engine.el: Correct the spelling of
c-opt-op-identiTier-prefix, t -> f. Leave an alias for the old name.
* cc-mode.texi, cc-mode.el:
* cc-mode.el: Bind C-M-a and C-M-e to c-\(beginning\|end\)-of-defun by
default.
* cc-mode.texi ("Movement Commands", "Sample .emacs File"): Document this.
* cc-align.el, cc-styles.el: New line-up function,
c-lineup-gnu-DEFUN-intro-cont, for the DEFUN macro in the Emacs C
sources. Only used in "gnu" style.
2006-04-14 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/release.php:
Correct a link from http://download.sourceforge.net/.... to
http://PRdownloadS.sourceforge.net/...
* cc-cmds.el (c-electric-slash):
Extend the handling of clean-up comment-close-slash
also to work when there's a comment terminator on the line.
(c-beginning-of-defun, c-end-of-defun): Refactor and optimise these for
large arg - only take account of top level {..}, except for initial and
final adjustments. M-- C-M-[ae] now go to the right defuns when the
starting point is between defuns. They use the four new functions:
(c-in-function-trailer-p, c-where-wrt-brace-construct,
c-backward-to-nth-BOF-{, c-forward-to-nth-EOF-}): new functions to
support c-\(beginning\|end\)-of-defun.
* cc-engine.el (c-forward-label):
Analyze ":" expressions more rigorously, to exclude
bit-field specifiers from being classed as labels.
(c-forward-label): When analyzing a ":" within a macro, be careful about
using c-forward-syntactic-ws at the macro beginning.
(c-beginning-of-decl-1): Whilst searching for "=" as evidence of a stmt
boundary, check for "operator=", etc.
2006-04-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* tests/access-labels-qt-1.cc, tests/access-labels-qt-1.face, tests/access-labels-qt-1.res:
Jazz up the QT "slots:" declarations by inserting comments and macros
into them.
* cc-mode.texi ("Other Commands"):
Move c-set-style (C-c .) here from "Choosing a
Style".
("Styles"): Add @dfn{style}.
* Makefile (docs: target):
Add a line to build cc-mode.XEMACS.info.tar.gz.
* ChangeLog: Correct a typo.
2006-02-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-emacs-features): Don't assume point-min==1.
* NEWS, cc-cmds.el, cc-mode.el, cc-mode.texi:
Rename c-hungry-backspace to c-hungry-delete-backwards, at the request of
RMS. Leave the old name as an alias.
* cc-awk.el: Correct a typo.
* admin/changes-531.php:
Rename c-hungry-backspace to c-hungry-delete-backwards, at the request of
RMS. Leave the old name as an alias.
* cc-mode.texi:
(i) Correct the definition of c-beginning-of-defun, to include the
function header within the defun.
(ii) Two minor amendments from Savannah.
* cc-fix.el:
In the test for a broken (XEmacs) font-lock-compile-keywords, exclude GNU
Emacs, whose CVS version would now signal an error.
* cc-fix.el, cc-guess.el, cc-lobotomy.el, cc-styles.el, cc-subword.el, cc-vars.el, cc-align.el, cc-awk.el, cc-bytecomp.el, cc-cmds.el, cc-compat.el, cc-defs.el, cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el, cc-mode.el:
(i) Add 2006 to the copyright statement.
(ii) Correct a typo in cc-mode.el.
* cc-mode.texi: (i) Add 2006 to the copyright.
(ii) Correct two typos.
* cc-defs.el: Update the version string to "5.31.4".
2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/index.php, admin/release.php: Update for release 5.31.3.
* ChangeLog: Fixed last minute bug in cc-mode.el.
* cc-mode.el (c-postprocess-file-styles):
bind inhibit-read-only to t, around the call
to c-remove-any-local-eval-or-mode-variables, so that it works on a RO
file.
2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* ChangeLog: Update for release 5.31.3.
2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* Release 5.31.3
2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-postprocess-file-styles): bind inhibit-read-only
to t, around the call to
c-remove-any-local-eval-or-mode-variables, so that it works on a
RO file.
2006-02-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-emacs-features): Don't assume point-min==1.
* cc-awk.el: Correct a typo.
2006-02-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* admin/changes-531.php, cc-mode.texi, NEWS, cc-cmds.el,
cc-mode.el: Rename c-hungry-backspace to
c-hungry-delete-backwards, at the request of RMS. Leave the old
name as an alias.
2006-02-11 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
(i) Correct the definition of c-beginning-of-defun, to include the
function header within the defun.
(ii) Two minor amendments from Savannah.
* cc-fix.el: In the test for a broken (XEmacs)
font-lock-compile-keywords, exclude GNU Emacs, whose CVS version
would now signal an error.
2006-02-10 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fix.el, cc-guess.el, cc-lobotomy.el, cc-styles.el,
cc-subword.el, cc-vars.el, cc-langs.el, cc-menus.el, cc-mode.el,
cc-fonts.el, cc-bytecomp.el, cc-cmds.el, cc-compat.el, cc-defs.el,
cc-engine.el, cc-awk.el, cc-align.el:
(i) Add 2006 to the copyright statement.
(ii) Correct a typo in cc-mode.el.
* cc-mode.texi: (i) Add 2006 to the copyright.
(ii) Correct two typos.
2006-02-09 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el: Update the version number to 5.31.3.
2006-02-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Fix clean-up brace-else-brace
(error due to mbeg, mend being undefined).
2006-02-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: File Local variables: Solve the problem where both
`mode' and c-file-offsets are specified: `mode' will overwrite
c-f-o's settings:
(c-remove-any-local-eval-or-mode-variables): new function.
(c-postprocess-file-styles): call the above new function, within
c-tentative-buffer-change, to splat `mode' and `eval' before the
second hack-local-variables.
2006-01-31 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el:
[Alternative patch to GNU Emacs: cc-engine.el V 1.45]
(c-after-change): Protect the match data with save-match-data. It
was getting corrupted by c-after-change-check-<>-operators.
* cc-defs.el: [3 Patches from GNU Emacs: savannah V 1.3[678]:
(top level): Check for a buggy font-lock-compile-keywords ONLY in
XEmacs. GNU Emacs 22 now has a check which would throw an error
here.
(c-emacs-features): Use (point-min) and (point) rather than
hard-coded 1, in case the buffer is narrowed.
* cc-awk.el (c-awk-after-change): Protect the match data with
save-match-data. It was being corrupted when Font Lock was not
enabled.
2006-01-25 Alan Mackenzie <bug-cc-mode@gnu.org>
* ChangeLog: Update for release 5.31.2.
2006-01-25 Alan Mackenzie <bug-cc-mode@gnu.org>
* Release 5.31.2
2006-01-22 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi (Comment Commands): State that C-u M-; kills any
existing comment.
(Electric Keys): Add a justification for electric indentation.
(Hungry WS Deletion): Clear up the names and complications of the
BACKSPACE and DELETE keys.
2006-01-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el (c-basic-common-init): Concatenate the minor mode
indicators directly onto mode-name, removing c-submode-indicators.
Sometimes, c-s-i got separated from the mode name on the mode
line.
* cc-langs.el (c-mode-menu): Add menu items for Electric Mode and
Subword Mode.
* cc-engine.el: Concatenate the minor mode indicators directly
onto mode-name, removing c-submode-indicators. Sometimes, c-s-i
got separated from the mode name on the mode line.
(c-beginning-of-statment-1): Distinguish real labels ("case 1:" or
"foo:") from non-labels ("public:").
(c-forward-objc-directive): Replace c-forward-token-2 with crude
coding; c-f-t-2 doesn't move over a token at EOB.
* cc-defs.el (c-version): Update version number to 5.31.2
* cc-cmds.el (c-update-modeline): Concatenate the minor mode
indicators directly onto mode-name, removing c-submode-indicators.
Sometimes, c-s-i got separated from the mode name on the mode
line.
(c-electric-brace, c-electric-semi&comma, c-electric-colon):
Correct doc-strings: "/ln" -> "/la".
2006-01-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-make-init-lang-vars-fun): Improved the error
message when there's an evaluation error to show whether it's
loaded from source or not.
(c-filter-ops): Made it available at runtime too to work when
`c-make-init-lang-vars-fun' needs to evaluate from source.
2005-12-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* Release 5.31.1
2005-12-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* NEWS: Correct the spelling of Masatake YAMATO's name (with
apologies to him).
2005-12-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el (c-version): <- 5.31.1
* cc-defs.el: Restore the (correct) (c-external-require 'cl).
2005-11-30 Alan Mackenzie <bug-cc-mode@gnu.org>
* Release 5.31.
2005-11-30 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Spelling and minor typographical changes.
2005-11-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-align.el, cc-awk.el: Spelling corrections.
* cc-cmds.el (c-electric-paren): Only call the
`blink-paren-function' for a CLOSE parenthesis.
* cc-defs.el: Change "(cc-external-require 'cl)" to
"(eval-when-compile (require 'cl))". (The change came from
savannah - I don't understand it.)
* cc-engine.el: Add an autoload to c-guess-basic-syntax (From
savannah.)
* cc-langs.el: Add "(cc-external-require 'cl)".
* cc-mode.el (c-font-lock-init): "Add (font-lock-lines-before
. 1)".
* cc-subword.el: Add a dummy `c-subword-mode' for Emacsen which
lack `define-minor-mode'. (Currently Emacs <21. We might do this
function properly in the future).
2005-11-28 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New macros
c-sentence-end and c-default-value-sentence end, to cope with
Emacs 22's new function `sentence-end'.
2005-11-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-show-syntactic-information): Solved the compat
issue using `c-put-overlay' and `c-delete-overlay'.
* cc-defs.el (c-put-overlay, c-delete-overlay): New compat macros
to handle overlays/extents.
2005-11-25 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fix.el: Add definitions of the macros push and pop (for GNU
Emacs 20.4)
* cc-defs.el:
(i) Load cc-fix.elc for `push' and `pop' (for GNU Emacs 20.4)
* cc-cmds.el (c-show-syntactic-information): change the
highlighting mechanism so it will work in XEmacs too.
Remove several unused dynamic bindings.
* cc-defs.el: Insert c-int-to-char.
* cc-langs.el (c-nonsymbol-token-char-list): Insert a call to the
new macro c-int-to-char. This solves XEmacs's regarding
characters as different from integers.
2005-11-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-make-syntactic-matcher): New internal helper.
(c-cpp-matchers, c-basic-matchers-before): Use the `eval'
construct to make the indirect face lookup work in XEmacs.
(c-cpp-matchers): Append the negation char face to the existing
fontification, so that the cpp face doesn't disappear. Use
`c-make-syntactic-matcher' to avoid negation chars in comments and
strings.
2005-11-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-negation-char-face-name): New variable to map to
`font-lock-negation-char-face' in emacsen where it exists.
2005-11-23 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: Bind c-subword-mode to C-c C-w.
* cc-mode.texi:
(i) Document the binding C-c C-w, in "Minor Modes" and in "Subword
Movement".
(ii) Mark c-\(forward\|backward\)-into-nomenclature as superseded
by c-subword-mode.
(iii) "Config Basics": change the troublesome "@itemize @w" to
"@itemize @asis".
(iv) Eliminate the "@defvr {LIST}" construct in "Adding Styles".
Bring descriptions of subsidiary matters into the definition of
the style description by shifting an "@end".
2005-11-22 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi, cc-subword.el, cc-cmds.el, cc-mode.el: Rename
"c-subword-move-mode" as "c-subword-mode".
* cc-mode.texi, cc-subword.el: cc-subword.el: In
c-forward-subword-internal, check that the regexp doesn't match a
null string. This can happen, e.g., in Info Mode, where ' has the
syntax of a word constituent.
cc-mode.texi:
(i) "Subword Movement": Say that subword-move-mode is available in
non-CC Modes.
(ii) "Config Basics": Add a recommendation to beginners to use the
top-level setq mechanism.
(iii) "Config Basics": Deobfuscate the description of top-level
setq's.
* cc-mode.texi:
(i) Add a description of the various build commands
(e.g. makeinfo), as supplied by Robert Chassell.
(ii) Move description of `comment-region' from "Other Commands" to
"Comment Commands".
(iii) Remove C-c C-y (which used to be bound to
c-toggle-hungry-state).
(iv) Added a @footnote about the change of the binding C-c C-d.
(v) Reinstated the description of `c-toggle-auto-hungry-state'.
* cc-mode.el: Remove the binding C-c C-y for c-toggle-hungry-state
* cc-cmds.el: Reinsert c-toggle-auto-hungry-state (but with no
binding).
2005-11-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: Added tty suitable bindings for C-c <delete> and C-c
C-<delete>. (To the c-hungry- delete functions).
2005-11-21 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el: Added autoload directive for `c-subword-move-mode'
for use in older emacsen.
2005-11-20 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el:
(i) Insert a binding for C-c C-backspace into
c-bind-special-erase-keys which works in TTYs.
(ii) Make sure that when file styles are used, any explicitly
given style variables take priority over those in the style. Do
this by calling `hack-local-variables' a second time.
* cc-vars.el: Add language specific customization widgets for AWK
to c-doc-comment-style, c-require-final-newline and
c-default-style. Add a defcustom for awk-mode-hook. Give
c-syntactic-element and c-syntactic-context doc-strings by
directly setting their `variable-documentation' propery. This
allows Emacs 22.1 to read these with C-h v.
* cc-awk.el: Apply a tidy-up patch (from Stefan Monnier).
2005-11-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Mention gtkdoc.
* cc-mode.texi: The concept index also contains the keys. Make
that more obvious so that the keys are found more easily.
* cc-mode.texi: Updated the Hungry WS Deletion section on the
details about the C-c C-<backspace> bindings etc.
* cc-mode.texi: Added a section about the subword minor mode.
* cc-fonts.el, cc-vars.el (gtkdoc-font-lock-doc-comments,
gtkdoc-font-lock-doc-protection, gtkdoc-font-lock-keywords):
GtkDoc patterns contributed by Masatake YAMATO.
(c-doc-comment-style): Made GtkDoc default in C mode.
2005-11-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el: Fixed key bindings for C-c C-<backspace> and C-c
C-<delete>.
(c-bind-special-erase-keys): New function for use on
`normal-erase-is-backspace-hook' to bind C-c C-<delete> correctly.
* cc-cmds.el (c-hungry-delete): New function to fix <delete> key
behavior in XEmacs according to `delete-forward-p'.
C.f. `c-electric-delete'.
2005-11-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: DVI stuff: Remove the quotes from "GNU Emacs
Manual" and friends. Complete several cross references with their
fifth parameter (the name of the printed manual).
"Indentation Commands": Tidy up `c-indent-command', putting the
variables `c-tab-always-indent' and `c-insert-tab-function' inside
its description. Inserted some "printed manual names" into cross
references where they were missing. Move description of
`indent-for-comment' into ...
"Comment Command": A new @section under "Commands"; it contains
the description of `indent-for-comment'; this was taken out of
"Indentation Commands". Add GNU Emacs's new name `comment-dwim'
for this function.
"Sample .emacs File": Change "@example" to "@verbatim" so that the
text isn't indented. Reorder the Lisp forms.
2005-11-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: "Configuration Basics": Add a note that ".emacs"
means "whatever initialization file you fancy". Also, another
note that the mode hooks are good places to put personal
preferences.
"Performance Issues": Remove the recommendation to put defun
braces at column 0, replacing it with a historical remark.
"Limitations and Known Bugs": State that C++ templates aren't yet
handled fully.
2005-11-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Renamed @chapter "Getting Connected" to "Getting
Started" and @chapter "Config Strategies" to "Config Basics".
"Getting Started": Added "quick fix" configurations for four of
the most common requests (c-basic-offset, c-set-style,
c-electric-mode, <RET> should indent NL).
"FAQ": Permuted the questions a little. Added "How can I change
the indent level from 4 spaces to 2 spaces?". Added several cross
references.
2005-11-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: Move c-toggle-hungry-state from "C-c C-d" to "C-c C-y". Give
c-hungry-backspace and c-hungry-delete-forward permanent key bindings.
* cc-mode.texi: Document the new state of affairs: Nodes changed: "Minor
Modes", "Hungry WS Deletion", "Sample .emacs File"
* cc-mode.texi:
"Style Variables": New @section explaining what style variables are and
how to set them.
"Permanent Customization": Removed this @section, since its contents have
been moved elsewhere.
"c-offsets-alist": New @section
Removed much commented out material, including @examples in the Line-Up
sections.
"Config Strategies": (i) Added a summary of style variables; (ii)
Corrected the priority of settings made by "File Local Variables";
(iii) Clarified and corrected how top-level `setq's interact with
styles; (iv) Added a terse but accurate description of the "user"
style.
"Style Variables": Took over most of the stuff from "Styles", its
parent. Added a @pxref to each item in the list of style variables.
"Built-in Styles": Corrected the description of the "user" style. Other
styles DO NOT inherit from it - they inherit from the factory defaults
in c-fallback-style.
"Adding Styles": Clarification of inheritance from c-fallback-style.
"Hanging Braces": Replace a tedious flowchart of what CC Mode does, with
a description of how to go about configuring the thing.
"Custom Braces": Move description of c-syntactic-context to near the
top of the node, and note the other three circumstances it gets bound
(together with @xrefs).
"Hanging Semicolons and Commas": Note that c-syntactic-context is bound.
"Indentation Engine Basics": Clarify first stage of indentation process.
"Syntactic Symbols" (and sub-nodes): Note the syntactic symbols which
don't have and anchor point, or have additional info in a syntactic
element.
"Customizing Indentation": Stuff about c-offsets-alist has been moved to
its own new @section.
"Line-Up Functions": Add a mention of the calling convention together
with a pointer to "Custom Line-Up".
"Other Indentation": Clarify the whole @section. State that File local
variables take precedence over all else, even settings in hooks.
2005-11-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph): Remove the "(if t ..." construct
which was experimentally inserted into V 5.314 (2005-08-18) to
minimise the patch size by not changing the indentation level.
2005-11-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-semi&comma): Bind c-syntactic-context for
calls to "criteria functions", for consistency with other calls to
user functions.
2005-10-31 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-command): expunge use of
`current-prefix-arg', since this might be the prefix arg to a
command which calls c-indent-command as a function. Change the
interactive spec from "p" to "P".
2005-10-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
"Minor Modes": Document the command c-toggle-syntactic-indentation.
"Analysis": Formalise the description of
c-show-syntactic-information to a quasi-@defun form. Describe the new
feature of highlighting anchor positions.
Make sure there's a blank line at the top of each node.
* cc-mode.texi: "Indentation Engine Basics":
(i) Rearrange the paragraphs more logically;
(ii) make @dfn's out of "syntactic symbol", "anchor position" and
"offset(s)".
(iii) Make an @enumeration out of the two-step indentation process.
(iv) Add a paragraph motivating c-syntactic-indentation, complete with a
reference to "Config Strategies".
2005-10-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: "Custom Line-Up":
(i) Increase the concision of the page.
(ii) Comment out the example. (Maybe this should go into its own
@subsection.)
(iii) Specify precisely the conventions for a line-up function, in
particular, that point may not be moved.
(iv) Add in the suggestion that c-special-indent-hook may sometimes be a
better idea than line-up functions.
There are minor consequential changes on other pages.
2005-09-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
(i) Partition the over-large @section "Line-Up Functions".
(ii) Expand the description of c-special-indent-hook.
(iii) Add cross references between "Other Indentation" and "Custom
Line-up", emphasizing that c-special-indent-hook functions and line-up
functions are alternatives.
2005-09-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-styles.el: Amend the doc-string of c-set-style, in reponse to
a report from Joseph Kiniry <kiniry@acm.org> that it was difficult
to understand.
2005-09-11 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-on-identifier): Fixed bug when at the first char
of an identifier.
* cc-engine.el (c-on-identifier): Handle the "operator +" syntax
in C++.
2005-09-09 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi ("Syntactic Analysis"): Minor amendments.
("Syntactic Symbols"): Partition this monster into a section with
thirteen subsections, each of which (more or less) illustrates a coherent
grouping of symbols.
Replace the spurious references to substatement-block-intro with
statement-block-intro.
Add @ssindex entries for those symbols missing them.
2005-09-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Some general tidying up and clarification. Also:
(Hooks): mention c-special-indent-hook
(FAQ): Commented out the question about M-[ae] going into blocks.
2005-08-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
55 Changes, great and small. Most of them are minor linguistic
improvements, clarifications, adding xrefs, bug fixes, or the like, but
there are also several more notable changes:
(i) "Config Strategies": State which setting takes precedence when
conflicting settings are made (e.g. both in a style and in a hook).
(ii) "Config Strategies": Add a bit about "File Styles".
(iii) "File Styles": Fleshed out this chapter quite a bit.
(iv) "Mode Initialization": Removed this embryonic node (which was far
from complete or useful) and all references to it.
2005-08-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph): correct, so that auto-fill
doesn't split a c-comment's last word from a hanging "*/" when a
space is typed between them after fill-column.
cc-defs.el: New macro c-delete-and-extract-region.
2005-06-24 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-styles.el (c-set-style, c-setup-paragraph-variables): Abort
the command if we're not in a CC Mode buffer.
2005-06-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-C-comments): Correct indentation with
blank comment-prefix, and a blank line as the comment's second
line.
2005-05-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-cpp-matchers, c-basic-matchers-before):
Incorporated the patterns added in the Emacs development branch
for the new Emacs 22 face `font-lock-negation-char-face'.
* cc-fonts.el (c-invalid-face-name): Use "red1" instead of "red"
since it stands out better in xterms and DOS terminals.
* cc-engine.el (c-literal-faces): Added
`font-lock-comment-delimiter-face' which is new in Emacs 22.
* cc-fonts.el (c-font-lock-declarators): Fixed bug where the point
could go past the limit in decoration level 2, thereby causing
errors during interactive fontification.
2005-05-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
Add documention for the new electric minor mode and finish that for clean-up
comment-close-slash. Tidy up the structure a bit, make some minor linguistic
improvements. In detail:
Change "Clean-ups" from being a section of "Custom auto-newlines) to being its
own section, since it documents some stuff which is independent of
auto-nelines.
Change "Auto-newlines" and "Hungry WS Deletion" from being subsections of
"Minor Modes" to their own sections, since they're to important to hide.
Move "Electric Keys" alongside them, since it now bears the same
relationship to "Minor Modes" as "Auto-newlines" and "Hungry WS .." do.
"Indentation Commands": Add a convenience description of standard (X)Emacs
C-j.
"Minor Modes":
(i) Document the new "electric minor mode" with toggle C-c C-l, and the
coupling between it and c-toggle-auto-newline.
(ii) Remove the description of the defunct `c-toggle-auto-hungry-state'.
(iii) Update the description of the modeline flags.
(iv) Recast the node considerably in the process.
"Electric Keys and Keywords":
(i) Add a note that electric minor mode needs to be enabled for (most of)
the stuff here to work.
(ii) Mention the new clean-up comment-close-slash.
(iii) Note the electric actions which don't need electric minor mode to be
enabled.
"Sample .emacs File": Replace c-toggle-auto-hungry-state with
c-toggle-\(auto-newline\|hungry-state\).
"FAQ": Add an entry "How do I stop my code jumping all over the place when I
type?".
2005-05-07 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: Correct previous patch to c-toggle-auto-newline.
* cc-mode.texi: Document the new clean-up `comment-close-slash'.
* cc-cmds.el: Make C-c C-a (`c-toggle-auto-newline') forcibly
enable c-electric-flag.
2005-05-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-vars.el, cc-cmds.el: New clean-up `comment-close-slash' on
c-electric-slash: if enabled, typing `/' just after the
comment-prefix of a C-style comment will close that comment.
2005-05-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Sync with Lute Kamstra's patch from emacs-devel to
prevent a superfluous cc-mode.ss index file being built with
texi2dvi.
2005-05-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-basic-matchers-before, c-complex-decl-matchers):
Fixed the "not-arrow-prefix" regexp used in Pike.
* cc-langs.el (c-other-op-syntax-tokens): Only C++ has digraphs.
2005-04-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Resolve some CVS conflict markers.
* cc-mode.texi: Custom Filling and Breaking: State that
c-comment-prefix regexp can be an association list.
2005-04-11 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-langs.el, cc-engine.el
(c-cpp-message-directives, c-cpp-include-directives,
c-opt-cpp-macro-define, c-opt-cpp-macro-define-start,
c-cpp-expr-directives): Introduced new language constants to
control cpp syntax in a cleaner way.
(c-cpp-expr-functions): Renamed from c-cpp-defined-fns.
(c-cpp-matchers, c-forward-to-cpp-define-body): Use them.
2005-04-10 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when
the file is evaluated interactively.
* cc-langs.el, cc-fonts.el (c-string-escaped-newlines,
c-multiline-string-start-char): New language constants and
variables to specify how newlines in string literals work.
(c-font-lock-invalid-string): Use them.
* cc-mode.texi: Removed hint that the one-liner-defun cleanup only
would be useful/relevant in AWK mode.
* cc-cmds.el (c-try-one-liner): Robustness fix if an unbalanced
close brace is entered. Optimization by avoiding going back over
arbitrarily large blocks. Removed hints that this function only
would be relevant/useful in AWK.
(c-electric-brace): Indent syntactically after the cleanups since
lineup functions might do it differently then.
* cc-engine.el, cc-langs.el (c-opt-op-identifier-prefix): New
language constant and variable.
(c-just-after-func-arglist-p, c-after-special-operator-id,
c-search-decl-header-end, c-inside-bracelist-p): Use it.
2005-02-14 Kevin Ryde <user42@zip.com.au>:
* cc-align.el (c-lineup-argcont): Ignore conses for {} pairs from
c-parse-state, to avoid a lisp error (on bad code).
2005-04-09 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Handle operator
declarations somewhat better in C++.
* cc-align.el, cc-engine.el (c-after-special-operator-id): New
helper to handle C++ operator identifiers.
(c-lineup-topmost-intro-cont, c-just-after-func-arglist-p,
c-guess-basic-syntax): Handle C++ operator identifiers in
declarations.
* cc-langs.el (c-assignment-operators): Added the trigraph version
of ^= too.
* cc-langs.el (c-assignment-operators): Added the trigraph version
of |= in C++.
2005-04-08 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: "Advanced Customizations": Finally remove the
vestiges of this chapter. Resolve three other minor FIXMEs.
2005-04-03 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarators): Handle
`c-decl-hangon-kwds' after the identifier name.
* cc-engine.el (c-guess-basic-syntax): When deciding whether an
arglist is "nonempty", ignore a comment after the open paren if it
isn't followed by a non-comment token on the same line.
* cc-engine.el (c-guess-basic-syntax): Case 4: Enable heuristics
below the point to cope with classes inside special brace lists in
Pike.
2005-04-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Correct a typo in the sourceforge CVS URL.
* cc-mode.texi: Add a statement that the manual is GPL'd. Add a
pointer to the manual's source at sourceforge.
2005-04-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: Amend c-point-syntax to handle macros.
2005-03-29 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-guess.el (cc-guess-install):
New function to install an already guessed style
in another buffer.
2005-02-14 Kevin Ryde <user42@zip.com.au>
* cc-mode.texi (File Styles): Cross reference emacs file local
variables, correction to grammatical typo.
2005-03-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-guess.el: Improvement contributed by Masatake YAMATO:
Frequency is now taken into account to make a better guess.
(cc-guess-region): Inverted the RESET argument to make it more
convenient. The guessed style is also merged into
`c-offsets-alist' right away.
(cc-guess, cc-guess-view-style): New functions.
2005-03-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-tentative-buffer-changes): No longer sets
`inhibit-read-only' - `c-save-buffer-state' should be used anyway
if the change always is undone.
2005-03-12 Alan Mackenzie <bug-cc-mode@gnu.org>
Implement togglable electricity:
* cc-defs.el: Enhance c-save-buffer-state's doc-string, saying
when it should be used.
* cc-engine.el: Add the new buffer-local variable,
c-electric-flag.
* cc-langs.el: Change the name of c-toggle-auto-state to
c-toggle-auto-newline.
* cc-mode.el: Rename c-toggle-auto-state to c-toggle-auto-newline.
Remove the binding for c-toggle-auto-hungry-state. Add the
binding C-c C-l for the new c-toggle-electric-state.
* cc-vars.el: Make c-syntactic-indentation buffer local.
* cc-cmds.el: Add `c-bytecomp-defun's for
c-\(forward\|backward\)-subword.
(c-update-modeline): Add the new modeline flag `l' for
`c-electric-flag'. Make the auto-newline flag `a' dependent on
`l'.
(c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. Make
the old name an alias of the new name.
(c-toggle-auto-hungry-state): Removed.
(c-toggle-electric-state): New function.
c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\):
Adapt these functions to do electric things only when
c-electric-flag is non-nil.
(c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these
new functions from c-electric-brace.
(c-point-syntax): Add a check for "virtual semicolons" in AWK
mode, so that the tentative extra newline doesn't change the
syntax of the following brace.
(c-electric-brace): restructure by extracting the above functions.
Tidy up the coding somewhat.
(c-electric-semi&comma, c-electric-colon, c-electric-paren):
restructure a bit.
* cc-mode.texi:
"Electric Keys": Amend description of `<' and `>': they are also electric when
they are template brackets.
"Other Commands": Add an entry for the standard Emacs command `comment-region'
which has CC Mode binding C-c C-c.
"Custom Filling and Breaking": Purge the description of
`c-comment-prefix-regexp' of confusing gobbledygook.
2005-03-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
"Filling and Breaking": Add a cross reference to "Custom Filling and
Breaking".
Several minor amendments.
2005-02-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
Merge the changes made on branch texi-0-1 back to HEAD.
2005-01-31 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
"Overview": Get rid of reference to "AWK" section;
"Sample .emacs FILE": Put key bindings into c-initialization-hook;
Move the c-add-style call from out of the c-mode-hook.
2004-12-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
In the GNU/XEmacs conditional things, replace "X" by "XEMACS" for clarity.
Rename the chapter "Indentation Engine" to "Indentation Engine Basics".
"Indentation Commands": Add stuff about macros (taken from the old "Macro
Handling" chapter).
"Other Commands": Move the description of "c-backslash-region" into here.
Rename "Macro Handling" to "Custom Macros", having moved the stuff other than
customization to other chapters.
* cc-vars.el: Remove the erroneous (doubly inserted) patch from
yesterday.
2004-12-18 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-show-syntactic-information): Show the anchor
position(s) using faces. Thanks to Masatake YAMATO for the idea.
* cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el
(c-submode-indicators): Changed name from `c-auto-hungry-string'
since it's now used to track another submode.
(c-update-modeline): Converted to function and extended to check
`c-subword-move-mode'.
(c-forward-into-nomenclature, c-backward-into-nomenclature):
Converted to compat aliases for `c-forward-subword' and
`c-backward-subword'.
* cc-subword.el: New functions and minor mode to handle
SillyCapsedStyleIndentifiers, contributed by Masatake YAMATO:
(c-forward-subword, c-backward-subword, c-mark-subword,
c-kill-subword, c-backward-kill-subword, c-transpose-subwords,
c-capitalize-subword, c-downcase-subword, c-upcase-subword):
Functions corresponding to the standard word handling functions.
(c-subword-move-mode): Minor mode that replaces all the standard
word handling functions with their subword equivalences.
2004-12-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-vars.el (c-cleanup-list): Insert a customization entry for
one-liner-defun.
2004-12-12 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-defs.el: Give c-tentative-buffer-changes its own name in its
def-edebug-spec.
* cc-cmds.el (c-electric-brace): Make the one-liner-defun clean-up
work with empty-defun-braces. o-l-d now compacts space before a
comment, if this will make things fit on one line.
2004-12-05 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
"AWK Mode Defuns": Removed this subsection, transferring its contents to
"Movement Commands"
"Movement Commands": Condensed the separate descriptions of
complementary -backward-* and -forward-* commands into joint
descriptions.
2004-12-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
"Introduction": Integrated Alan more tightly into CC-Mode. ;-)
"Overview": New chapter describing the structure of the manual.
"Other Commands": Added a description of c-macro-expand.
"Built-in Styles": Added a description of the new "awk" style.
"Custom Braces" and "Hanging Semicolons and Commas": Specify the meaning of
point in action functions, and that is must be preserved.
"Clean-ups": Document the new clean-up one-liner-defun and associated
variable c-max-one-liner-length.
"Customizing Indentation" is now its own chapter rather than being a section
of "Indentation Engine".
"AWK Mode: Removed the entire chapter, moving the two remaining useful
sections to "Font Locking" and "Movement Commands".
Added/Moved lots of index entries.
2004-11-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: Add a fourth parameter `t' to the awk-mode autoload,
so that it is interactive, hence can be found by M-x awk-mode
whilst cc-mode is yet to be loaded. Reported by Glenn Morris
<gmorris+emacs@ast.cam.ac.uk>.
2004-11-28 Alan Mackenzie <bug-cc-mode@gnu.org>
Introduce an "awk" style, mainly for auto-newline and clean-ups.
* cc-align.el: new function c-snug-1line-defun-close
* cc-cmds.el: In c-electric-brace, add code for new clean-up
one-liner-defun.
* cc-styles.el: Add the new "awk" style.
* cc-vars.el: Add description of one-liner-defun to
c-cleanup-list's doc-string. New user options,
c-max-one-liner-length. In c-default-style, set the default style
for AWK to "awk".
2004-11-28 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el, cc-styles.el (c-run-mode-hooks): New helper macro to
make use of `run-mode-hooks' which has been added in Emacs 21.1.
(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode,
awk-mode): Use it.
(make-local-hook): Suppress warning about obsoleteness which has
been added in Emacs 21.1.
2004-11-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-label): Fixed fontification of macros
inside labels.
2004-11-04 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
(i) Some general tidying up, remove @ignore sections, etc.
(ii) Firm up the mechanism for generating @xrefs to the Emacs/Xemacs
manual and the Elisp/Lispref manual. There are now four macros,
@emacsman{}, @lispref{}, @emacsmantitle{}, @lispreftitle{} which
generate the filenames and titles (for the printed versions) of the
manuals pertinent to Emacs or XEmacs, depending on whether the makeinfo
variable `X' is defined or not. The titles were taken from the
@settitle lines in the source files of the four manuals. In the
process, the title "The Emacs Editor" has been amended to "GNU Emacs
Manual".
2004-10-16 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Much general tidying up of the wording.
"Auto-newlines"
(i) Add a note that c-electric-* only do their stuff when last on
line.
(ii) State that a `before' auto-newline is never added if the `{'
etc. is "already on a newline".
(iii) Replace the statement of where auto-newlines go by default (it
was wrong and oversimplified) by a statement that the style system
does the configuration most of the time.
"Custom Auto-newlines"
(i) Make the page what it says it is, removing the stuff which is now
in "Commands".
(ii) Add a @dfn{} for "hang", and "hanging on the left/right".
(iii)
"Hanging Braces"
(i) Insert an @enumerated section describing the algorithm.
(ii) Insert a more robust description of c-hanging-braces-alist.
(iii)
"Hanging Colons"
(i) Update this page to mirror "Hanging Braces".
(ii) State that the default action (if no alist entry) is to add no
newlines.
"Custom Semis and Commas"
(i) Add clarification that criteria functions don't themselves add
newlines.
(ii) State that NLs never get added _before_ a `;' or `,'.
(iii)
"Clean-ups"
(i) Give an actual definition of "Clean-up" for the @dfn{}. ;-)
Moved the @section "Custom Brace and Colon Hanging" away from "Advanced
Customizations" to underneath "Hanging Braces", removing the spurious
"and Colons" from its name.
Moved the contents of the @section "Customizing Semicolons and Commas"
away from "Advanced Customizations" and inserted them into "Hanging
Semicolons and Commas" (which previously had only a pointer into the
CSaC node).
"Advanced Customization" is now almost content free.
Add Experimental macros for "Emacs"/"XEmacs" and "Elisp"/"Lispref", in
the hope they might enable a better XEmacs version of the manual.
2004-10-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el, cc-align.el
(c-append-backslashes-forward, c-delete-backslashes-forward,
c-find-decl-spots, c-semi&comma-no-newlines-before-nonblanks):
Compensate for return value from `forward-line' when it has moved
but not to a different line due to eob.
2004-10-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-bos): Obsoleted in favor of
`c-at-statement-start-p' and `c-at-expression-start-p'.
* cc-defs.el (c-tnt-chng-record-state): Don't signal an error if
the mark isn't set.
* cc-engine.el (c-guess-basic-syntax): Fixed anchoring in
`objc-method-intro' and `objc-method-args-cont'.
* cc-engine.el (c-guess-continued-construct,
c-guess-basic-syntax): Use `c-forward-decl-or-cast-1' to more
accurately detect functions inside functions.
2004-09-30 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
Reorder the chapters a bit on the principle "Most basic earliest":
Move "Font locking" with contents to just after "Commands".
Move "Indentation Engine" with contents to just after "Custom Filling and
Breaking".
Move "Custom Filling and Line Breaking" to before "Custom Auto-Newlines".
2004-09-26 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
Add a "Mode Initialization" section (as yet, content free) to
"Configuration Strategies".
Move "Minor Modes" into the "Commands" chapter. Remove the
configuration instructions from its submode "Auto-newlines". Outline
the default configuration for auto-newlines here.
Rename the old "Auto-newline insertion" to "Customizing Auto-newline
Mode" and make it a @chapter in its own right, containing four
sections. The content of this @chapter is yet to be adapted.
Amend the descriptions in "Minor Modes" of the key sequences, using
@table rather than an unbroken textual paragraph.
Amend "Electric Keys", so that there is explicit reference to
"Clean-ups" in the right places. All electric actions are now
collected together in this section.
Condense the description of '*' and '/' in Electric keys.
In "Clean-ups" insert "@tie{}" where a critical space was getting lost
in line wrap.
Tidy up a lot of wording.
Introduce an experimental facility which will build either a GNU Emacs
or an XEmacs specific info file.
2004-09-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-at-expression-start-p): New function like
`c-at-statement-start-p' that additionally recognizes commas and
expression parentheses as delimiters.
2004-09-24 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-awk.el: Add character classes (e.g. "[:alpha:]") into AWK
Mode's regexps.
2004-09-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Move the page "Hungry WS Deletion" into the
"Commands" chapter, and revise this node for (hopefull) increased
clarity.
2004-09-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Reduce the length of many node names, (following
suggestion on emacs-devel). Tidy up some of the wording.
2004-09-17 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Added ACM to the list of authors.
Renamed "Other Electric Commands" to "Electric Keys and Keywords"
In "Electric Keys and Keywords", added descriptions of {, }, :, ;, ,,,
and tidied up the wording a bit.
Tidied up the wording and presentation of "Configuration Strategies".
In "Customizing Filling and Line Breaking", expanded the description of
c-comment-prefix-regexp.
2004-08-20 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi:
Moved the "Commands" chapter to near the start of the file.
Moved "Other Electric Commands" into the "Commands" chapter.
Split "Text Filling and Line Breaking" into the "Filling and Line
Breaking Commands" (a section under "Commands"), and "Customizing Filling
and Line Breaking".
2004-08-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Update the master menu for the file.
* cc-mode.texi:
This change is the first stage in the restructuring of cc-mode.texi.
Added new chapter, "Configuration Strategies", and converted "Hooks" and
"Styles" (together with the latter's sub-nodes) into sections of this new
chapter.
Converted "Syntactic Symbols" and "Customizing Indentation" (together with
the latter's sub-nodes "Interactive C.." and "Permanent C..") into sections of
"Indentation Engine". "Customizing Indentation" has acquired "Line-Up
Functions", "Custom Line-up Functions" and "Other Special Indentations" as
sub-nodes, but has lost "Hooks" and "Styles").
"Advanced Customization", formerly a sub-node of "Customizing Indentation"
is now a chapter in its own right. It has lost "Custom Line-Up Functions" and
"Other Indentations".
2004-06-29 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-inexpr-block): Added flag to avoid
heuristics that doesn't work for unclosed blocks.
(c-at-statement-start-p): New function.
2004-06-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Added an FAQ item about the
open-paren-in-column-zero issue.
2004-05-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el, cc-vars.el (c-emacs-features): Moved from cc-vars to
cc-defs for dependency reasons. Fixed the POSIX char class test
to check that it works in `skip-chars-(forward|backward)' too.
* cc-align.el (c-lineup-arglist): Fixed bug when the first
argument starts with a special brace list.
2004-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-type): Fixed promotion bug when
`c-opt-type-concat-key' is used
(i.e. in Pike).
* cc-engine.el (c-looking-at-special-brace-list): Fixed bug when
the inner char pair doesn't have paren syntax, i.e. "(< >)".
2004-04-28 Alan Mackenzie <bug-cc-mode@gnu.org>
Amend doc(-strings) to say that <TAB> doesn't insert WS into a CPP
line.
* cc-cmds.el, cc-vars.el (c-indent-command, c-tab-always-indent):
Amend doc strings.
* cc-mode.texi (@node Indentation Commands): Amend documentation
of c-tab-always-indent.
2004-04-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-multi-inher): Made it syntactic whitespace
safe.
2004-04-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el: Fixes in handling of Objective-C
directives, e.g. directives spanning lines should work reasonably
well now.
(c-put-c-type-property, c-clear-c-type-property): New helpers.
(c-forward-objc-directive): New function to move over any ObjC
directive.
(c-just-after-func-arglist-p, c-guess-basic-syntax,
c-basic-matchers-before): Use it.
(c-font-lock-objc-iip-decl): Removed.
* cc-engine.el (c-guess-basic-syntax): Some improvement in the
template arglist recognition.
2004-04-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el (c-style-alist): Fixed several inconsistencies in
the Whitesmith style.
* cc-mode.texi: Documented c-lineup-after-whitesmith-blocks. Some
other fixes.
* cc-align.el (c-lineup-after-whitesmith-blocks): New lineup
function to get lines after Whitesmith style blocks correctly
indented.
(c-lineup-whitesmith-in-block): Backed out the compensation for
opening parens since it's done using `add' lists in the style
definition instead. Don't use the anchor position since it varies
too much between the syntactic symbols. :P
* cc-vars.el (c-valid-offset): Updated.
* cc-mode.texi: Updated the doc for offset specifications on
`c-offsets-alist'.
* cc-engine.el (c-evaluate-offset): Extended to handle lists where
the offsets are combined according to several different methods:
`first', `min', `max', and `add'. Report offset evaluation errors
with `c-benign-error' so that some kind of reindentation still is
done.
* cc-engine.el (c-guess-basic-syntax): Anchor `arglist-intro' the
same way as `arglist-cont-nonempty' and `arglist-close'.
* cc-engine.el (c-guess-basic-syntax): Fixed similar situations
for `arglist-cont-nonempty' and `arglist-close'.
2004-04-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Fixed anchor position for
`arglist-intro' when there are two arglist open parens on the same
line and there's nothing in front of the first.
* cc-mode.texi: Updated the parts dealing with line-up functions.
Fixed some terminology to use the same words everywhere.
* cc-langs.el (c-opt-identifier-concat-key-depth): New constant.
* cc-fonts.el (c-basic-matchers-before): Fixed font locking of
qualified names in Java, which previously could fontify common
indexing expressions in many cases. The standard Java naming
conventions are used to tell them apart.
2004-04-12 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el: Use `cc-bytecomp-fboundp' and cc-bytecomp-boundp' in
a number of places.
2004-04-09 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-whitesmith-in-block): Fixed inconsistency
wrt opening parens on the first line inside a paren block.
* cc-defs.el (c-langs-are-parametric): Made it known at compile
time to avoid warnings.
* cc-defs.el (c-langs-are-parametric): Must be known at compile
time for the sake of `c-major-mode-is'.
(c-mode-is-new-awk-p): Made it a macro to delay expansion of
`c-major-mode-is' in the event that this is used inside a
`c-lang-defconst'.
2004-04-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Fixed a macro related
issue.
2004-04-03 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, cc-cmds.el, cc-awk.el: Remove (nearly all of) the
cruft associated with AWK Mode's former concept of "virtual
semicolons".
* cc-styles.el, cc-vars.el, cc-engine.el, cc-cmds.el, cc-awk.el:
1. Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps.
2. Adapt c-beginning-of-statement, c-end-of-statement (together with
subfunctions) to use the new notion of "virtual semicolon" in place of the
old awkward special handling for AWK. There remains much cruft in
cc-awk.el, cc-cmds.el and cc-engine.el to clear out.
* cc-awk.el: Change the terminology of regexps: A char list is now [asdf],
a char class [:alpha:]. Include code for char classes.
Set c-awk-NL-prop on lines ending in open strings. (Bug fix.)
* cc-cmds.el:
(c-ascertain-adjacent-literal): In the backwards direction, now
recognises AWK regexp delimiters as string delimiters.
(c-after-statement-terminator-p): Adapt for virtual semicolons;
check more rigorously for "end of macro".
(c-back-over-illiterals, c-forward-over-illiterals): Adapt for
virtual semicolons;
(c-beginning-of-statement): Adapt for virtual semicolons; Separate
out the code for forward movement into ...
(c-end-of-statement): Now contains the code for forward movement,
adapted for virtual semicolons.
* cc-engine.el:
(c-ws*-string-limit-regexp): new regexp.
(c-forward-single-comment, c-backward-single-comment): Comment out
the (now redundant) "special" AWK stuff.
* cc-styles.el, cc-vars.el: Change the settings of
c-string-par-start, c-string-par-separate to be more like Text
Mode than Fundamental Mode.
2004-03-27 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el, cc-styles.el:
Add in two checks for user errors, thus eliminating cryptic and unhelpful
Emacs error messages. (1) Check the arg to `c-set-style' is a string.
(2) Check that settings to `c-offsets-alist' are not spuriously quoted.
2004-03-26 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi: Synchronise with the 5.31 latest version, 5.197,
in particular enhancing the documentation of `c-add-style'.
2004-03-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Enhanced the style doc somewhat more.
2004-03-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-major-mode-is): Fixed expansion inside
`c-lang-defconst' so that it works better with fallback languages.
* cc-defs.el (c-add-language): Fixed a typo that caused it to fail
to record the base mode.
2004-03-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): Always narrow to the
fontified region so that fontification doesn't occur outside it
(could happen e.g. when fontifying a line with an unfinished
declaration).
2004-03-18 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-syntactic-re-search-forward): Fixed bug so that
it doesn't go past the closing paren when PAREN-LEVEL is used.
Reordered the syntax checks to get more efficient skipping in some
situations.
2004-03-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-awk.el, cc-defs.el, cc-engine.el, cc-langs.el, cc-mode.el:
Amend the concept of "virtual semicolons" (in the indentation engine) for
languages like AWK, such that they are now conceptually attached to end of the
last token of a statement, not the end of the line. (In AWK Mode, however,
the pertinent text property is still physically set on the EOL.) Remove the
specific tests for awk-mode, thus facilitating the introduction of other
language modes where EOLs can end statements. (Note: The funtionality in
cc-cmds.el, specifically c-beginning/end-of-statement has yet to be amended.)
* cc-awk.el: Regexps for analysing AWK code have been moved to near the start
of the file. ^L now separate sections of the file.
New defconsts: c-awk-non-eol-esc-pair-re,
c-awk-blank-or-comment-line-re, c-awk-one-line-possibly-open-string-re,
c-awk-regexp-one-line-possibly-open-char-class-re,
c-awk-one-line-possibly-open-regexp-re, c-awk-one-line-non-syn-ws*-re.
New functions: c-awk-at-vsemi-p, c-awk-vsemi-status-unknown-p.
* cc-defs.el: New macros c-at-vsemi-p, c-vsemi-status-unknown-p.
* cc-langs.el: Added `#' into AWK Mode's value of c-stmt-delim-chars. New
c-lang-defvars: c-at-vsemi-p-fn, c-vsemi-status-unknown-p-fn (in a new
page).
* cc-engine.el: In c-beginning-of-statement-1, c-crosses-statement-barrier-p,
c-guess-basic-syntax, replace numerous awkward forms like
(if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p)) with
(c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new variable
before-ws-ip, the place just after char-before-ip appears.
* cc-mode.el: Fix what's almost a semantic ambiguity in a comment.
2004-03-02 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Cleaned up using
`c-tentative-buffer-changes'.
* cc-defs.el (c-region-is-active-p): Simplified and converted to
macro to choose between Emacs and XEmacs at compile time.
(c-set-region-active): New set counterpart to
`c-region-is-active-p'.
(c-tentative-buffer-changes): New macro to handle temporary buffer
changes in a convenient way.
(c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers
for `c-tentative-buffer-changes'.
* cc-cmds.el (c-electric-brace): Don't trip up on a line
continuation which might precede the newly inserted '{'.
2004-03-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-syntactic-re-search-forward): Fixed cases where
it could loop indefinitely.
2004-02-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-inexpr-block): Tightened up the
checks for paren sexps between the point and the keyword, to avoid
some false alarms.
* cc-engine.el, cc-langs.el (c-looking-at-inexpr-block): Fixed a
situation where an error could be thrown for unbalanced parens.
Changed to make use of c-keyword-member' to avoid some repeated
regexp matches.
(c-opt-lambda-key, c-opt-inexpr-block-key,
c-opt-inexpr-class-key): These language variable are no longer
necessary.
(c-block-stmt-kwds): New language constant used by
c-looking-at-inexpr-block'.
(c-guess-basic-syntax): Removed an optional check that looked at
the existence of the now removed language variables.
* cc-engine.el (c-fdoc-shift-type-backward,
c-forward-decl-or-cast-1): Fixed invalid recognition of C++ style
object instantiation expressions as declarations in some contexts.
This bug only affected languages where the declarator can't be
enclosed in parentheses.
2004-02-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.texi (c-block-comment-prefix): State that it's default
setting, "* " gets overridden by the default style, gnu.
2004-02-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el (c-style-alist): Fixed the GNU style to insert
newlines before and after substatement braces.
2004-02-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el: Improved the heuristics for recognizing function
declaration headers and the handling of C++ style member init
lists.
(c-just-after-func-arglist-p): Rewritten to use
`c-forward-decl-or-cast-1'. Now behaves a bit differently too.
(c-beginning-of-member-init-list): Removed since it isn't used
anymore.
(c-guess-basic-syntax): Case 5B adapted for the new
`c-just-after-func-arglist-p'. Cases 5B.1 and 5B.3 merged. Cases
5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1
covers all cases now).
* cc-defs.el (c-point): Added 'bosws and 'eosws.
2004-02-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-styles.el, cc-vars.el: Correct silly bug in previous commit.
* cc-cmds.el, cc-styles.el, cc-vars.el:
New variables c-string-par-start/separate c-sentence-end-with-esc-eol,
initialised in c-setup-paragraph-variables, used in string scanning
subroutines of c-beginning-of-statement.
2004-02-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): don't delete a comment which
precedes the newly inserted `{'.
2003-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarators): Handle array size specs
correctly. Only fontify identifiers in front of '(' with as
functions - don't accept any paren char. Tightened up initializer
skipping to stop before function and class blocks.
2003-12-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el: Rewrote the recognition function for
declaration level blocks. It should now cope with templates
better and also be a lot more comprehensible.
(c-looking-at-decl-block): The new function.
(c-search-uplist-for-classkey): The old one. It's now a wrapper
for compatibility.
(c-add-class-syntax, c-guess-continued-construct,
c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'.
(c-decl-block-key): Changed to tell apart ambiguous and
unambiguous keywords. Pike specials are now handled directly in
the code instead.
(c-block-prefix-disallowed-chars, c-block-prefix-charset): New
language constants and variables to make the backward skip in
`c-looking-at-decl-block' as tight as possible.
(c-nonsymbol-token-char-list): New language constant.
* cc-engine.el (c-backward-<>-arglist): New function to find
balanced template arglists backwards.
* cc-defs.el (c-make-bare-char-alt): New helper for making char
classes for `c-syntactic-skip-backward'.
* cc-engine.el (c-guess-basic-syntax): Simplified case 16D - can't
be a class-close at that point.
* cc-engine.el (c-guess-basic-syntax, c-add-class-syntax): Don't
narrow out the enclosing declaration level. This makes everything
a lot easier, and it was actually only four small places that
needed it to work. Some places that previously did `widen' are
removed now, which has the effect that `c-guess-basic-syntax'
never will look at things outside the current narrowment now. The
anchor position for `topmost-intro' is affected by this, but it
was so bogus it was basically useless before, and now it's equally
bogus but in a slightly different way.
(c-narrow-out-enclosing-class): Gone.
(c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to
the narrowed region.
(c-least-enclosing-brace): Removed silly optional argument.
* cc-engine.el (c-beginning-of-decl-1): Fixed bug where the point
could be left directly after an open paren when finding the
beginning of the first decl in the block.
* cc-engine.el (c-parse-state): Don't use the syntax table when
filtering out legitimate open parens to be recorded. This could
cause cache inconsistencies when e.g. `c++-template-syntax-table'
was temporarily in use.
* cc-engine.el (c-beginning-of-decl-1): Fixed bug where the point
could be left directly after an open paren when finding the
beginning of the first decl in the block.
2003-12-06 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el (c-forward-keyword-clause): Specify
which submatch to use.
* cc-langs.el (c-symbol-start): Include '@' in ObjC.
(c-decl-start-re): No no longer any need for special treatment of
ObjC due to the above.
(c-other-block-decl-kwds): Handle "extern" in ObjC too since it
presumably follows C in that regard.
* cc-langs.el (c-identifier-ops, c-after-id-concat-ops): New
language constants to specify operator tokens inside identifiers
in a more high level way.
(c-opt-identifier-prefix-key): New internal language constant.
(c-opt-identifier-concat-key, c-opt-after-id-concat-key,
c-identifier-start, c-identifier-key): Now completely calculated
from other constants.
(c-identifier-last-sym-match): Decommissioned since it's no longer
used.
(c-operators): Use `c-identifier-ops'. Documented
`postfix-if-paren'.
* cc-engine.el (c-forward-name): Removed the optimization when
c-identifier-key is equal to c-symbol-key since it doesn't work in
byte compiled files. Don't record empty regions as identifiers.
* cc-langs.el (c-filter-ops): New helper function to simplify
access to `c-operators' and its likes.
(c-operator-list, c-all-op-syntax-tokens,
c-nonsymbol-token-regexp, c-<>-multichar-token-regexp,
c-<-op-cont-regexp, c->-op-cont-regexp, c-expr-kwds,
c-primary-expr-regexp, c-cast-parens): Use it.
* cc-defs.el (c-lang-const): Fixes to allow use without an
explicit language in functions.
* cc-defs.el (c-make-keywords-re): Added an appendable variant of
adornment.
2003-12-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-any-class-key): Removed unused language variable.
(c-type-decl-prefix-key): Removed some now unnecessary cruft from
the Pike value.
* cc-engine.el (c-on-identifier, c-simple-skip-symbol-backward):
Small fix for handling "-" correctly in `skip-chars-backward'.
Affected the operator lfun syntax in Pike.
(c-forward-label): Small fix for handling "-" correctly in
`c-syntactic-skip-backward'.
* cc-engine.el (c-on-identifier, c-simple-skip-symbol-backward):
Small fix for handling "-" correctly in `skip-chars-backward'.
Affected the operator lfun syntax in Pike.
2003-12-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-make-init-lang-vars-fun): Disabled the diagnostic
message about precompiled language vars not being used.
* cc-langs.el (c-paren-nontype-kwds): The GCC keyword
"__attribute__" is followed by a parenthesis.
(c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re,
c-specifier-key, c-not-decl-init-keywords): Some cleanup using new
language constants `c-type-start-kwds' and `c-prefix-spec-kwds'.
2003-11-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-invalidate-sws-region-after): Fixed bug that
could cause an error from `after-change-functions' when the
changed region is at bob.
* cc-fonts.el, cc-langs.el, cc-engine.el: Internal cleanups to
properly detect the declared identifiers in various declarations.
(c-decl-start-kwds): New language constant to recognize
declarations that can start anywhere. Used for class declarations
in Pike.
(c-specifier-key, c-not-decl-init-keywords,
c-decl-prefix-or-start-re, c-find-decl-prefix-search,
c-find-decl-spots): Implement `c-decl-start-kwds'.
(c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds,
c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the
handling of the compiler specific extension keywords into a new
language constant `c-decl-hangon-kwds' that defines keyword
clauses to be ignored in declarations.
(c-forward-id-comma-list, c-forward-keyword-clause): Don't skip
past unrecognized tokens when handling `c-colon-type-list-kwds'.
Necessary to stop at the declared identifier in e.g. IDL valuetype
declarations.
(c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds,
c-prefix-spec-kwds-re, c-postfix-spec-kwds,
c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key,
c-forward-decl-or-cast-1): Recognize the declared identifier in
class and enum declarations as such and not as part of the type.
(c-forward-decl-or-cast-1, c-forward-label): Relaxed the
interpretation of PRECEDING-TOKEN-END when there's no preceding
token.
(c-forward-decl-or-cast-1): Don't disregard sure signs of
declarations when there's some syntax error later on.
(c-complex-decl-matchers): Did away with a reference to
`c-specifier-key'.
2003-11-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-maybe-labelp): Provide no default value - this
variable is always dynamically bound.
2003-11-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el, cc-mode.el,
cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el, cc-cmds.el,
cc-defs.el: Changed the policy for marking up functions that might
do hidden buffer changes: All such internal functions are now
marked instead of those that don't.
(c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments,
c-(forward|backward)-single-comment, c-parse-state, c-on-identifier,
c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments,
c-literal-type): Allow these functions to make hidden buffer changes,
so that they are free to use text property caching later on.
(c-electric-backspace, c-electric-delete-forward, c-electric-pound,
c-electric-brace, c-electric-slash, c-electric-star,
c-electric-semi&comma, c-electric-colon, c-electric-lt-gt,
c-electric-paren, c-electric-continued-statement, c-indent-command,
c-indent-region, c-mask-paragraph, c-indent-new-comment-line,
c-context-line-break): Added `c-save-buffer-state' calls to comply
with the changed semantics of the functions above.
* cc-engine.el (c-beginning-of-statement-1):
Fixed a bug when macros occur in obscure
places. Optimized the sexp movement a bit.
2003-11-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-awk.el, cc-cmds.el, cc-engine.el, cc-mode.el, cc-mode.texi:
Enhancements for c-beginning-of-statement to work in AWK Mode:
cc-awk.el:
Supersede c-awk-NL-prop value `;' (completed statement) with `}' (statement
completed by closing brace or semicolon) and `$' (statement completed by
EOL).
New functions: c-awk-virtual-semicolon-ends-prev-line-p,
c-awk-virtual-semicolon-ends-line-p, c-awk-skip-semantic-ws-forward,
c-awk-skip-semantic-ws-backward, c-awk-at-statement-end-p.
cc-cmds.el:
Simplify the structure of functions c-forward-over-illiterals,
c-back-over-illiterals.
Enhance these two functions and c-beginning-of-statement to handle AWK Mode.
cc-engine.el:
Enhance c-forward-single-comment, c-backward-single-comment for AWK mode.
Attempt to clarify their doc-strings.
cc-mode.el:
Put M-a and M-e into awk-mode-map.
cc-mode.texi:
Document that M-a and M-e now work in AWK mode. Fix minor typos.
2003-11-21 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the label
handling. Labels are now recognized in a uniform and more robust
way, regardless of context. Text properties are put on all labels
to recognize the following declarations better. Multiword labels
are handled both in indentation and fontification for the benefit
of language extensions like Qt. For consistency, keywords in
labels are now fontified with the label face instead. That also
applies to "case" and "default".
(c-beginning-of-statement-1): Fixed some bugs in the label
handling. Disregard `c-nonlabel-token-key' in labels that begin
with `c-label-kwds'.
(c-find-decl-spots): Support that the callback adds more
`c-decl-end' spots to find.
(c-forward-decl-or-cast-1): Don't treat a list of plain
identifiers followed by a colon as a declaration.
(c-forward-label): New function to recognize labels.
(c-guess-basic-syntax): Replaced uses of `c-label-key' with
`c-forward-label'. Moved the label recognition cases (14 and 15)
earlier since they aren't so context sensitive now. Handle labels
on the top level gracefully. Moved access label recognition to
the generic label case (CASE 15) - removed CASE 5E.
(c-font-lock-declarations): Added recognition of labels in the
same round since we need to handle labels in parallell with other
declarations to recognize both accurately. It should also improve
speed.
(c-simple-decl-matchers, c-basic-matchers-after): Moved
`c-font-lock-labels' so that it only is used on decoration level 2
since `c-font-lock-declarations' handles it otherwise.
(c-complex-decl-matchers): Removed the simplistic recognition of
access labels.
(c-decl-prefix-re): Removed the kludges that was necessary to cope
with labels earlier.
(c-decl-start-re): New language variable to make
`c-font-lock-declarations' stop for the special protection labels
in Objective-C that start with '@'.
(c-label-key): Removed since it's no longer used.
(c-recognize-colon-labels, c-label-prefix-re): New language
constants to support recognition of generic colon-terminated
labels.
(c-type-decl-end-used): `c-decl-end' is now used whenever there
are colon terminated labels.
* cc-align.el (c-lineup-arglist): Fixed bug when the first
argument starts with a special brace list.
2003-11-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1,
c-font-lock-declarations): Broke out the declaration and cast
recognition from `c-font-lock-declarations' to a new function, so
that it can be used in the indentation engine.
2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-continued-construct,
c-guess-basic-syntax): Check a little more carefully if it's an
function declaration when an unknown construct followed by a block
is found inside a statement context. This avoids macros followed
by blocks to be taken as function declarations.
(c-guess-continued-construct): Changed the analysis of a statement
continuation with a brace open to `substatement-block', for
consistency with recognized statements.
(c-add-stmt-syntax): Don't continue to the surrounding sexp if the
start is in a position so that `c-beginning-of-statement-1' jumped
to the beginning of the same statement.
* cc-engine.el (c-guess-continued-construct,
c-guess-basic-syntax): Check a little more carefully if it's an
function declaration when an unknown construct followed by a block
is found inside a statement context. This avoids macros followed
by blocks to be taken as function declarations.
(c-guess-continued-construct): Changed the analysis of a statement
continuation with a brace open to `substatement-block', for
consistency with recognized statements.
2003-11-15 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-cmds.el, cc-engine.el
(c-forward-<>-arglist-recur): Don't accept binary operators in the
arglist if we're in a function call context, i.e. if
`c-restricted-<>-arglists' is set. That avoids template
recognition in cases like "if (a < b || c > d)".
(c-restricted-<>-arglists): New more appropriate name for
`c-disallow-comma-in-<>-arglists'.
Accessing functions updated for the variable name change.
2003-11-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-find-decl-spots): Fixed bug in backing up to the
start of the literal. Fixed bug with the point on the wrong side
of the search limit that could happen when the start position is
inside a literal.
* cc-engine.el (c-parse-state, c-invalidate-state-cache): Modified
the use of `c-state-cache-end' so that it's kept a little bit back
to increase the hit rate.
(c-parse-state): Changed the macro handling and fixed some
glitches. Macro context is checked more often than necessary now,
but otoh less garbage conses are generated.
* cc-engine.el (c-parse-state, c-invalidate-state-cache): Cache
the last position where `c-state-cache' applies. This can speed
up refontification quite a bit in blocks where there are many
non-brace parens before the point.
(c-state-cache-end): New variable for this.
(c-guess-basic-syntax, c-debug-parse-state): Adapted for the new
cache variable.
2003-11-06 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-find-decl-spots): Take more care to get close
initial continue positions when the start position is inside a
literal or macro. Do not call the callback for spots before the
start position (which can happen e.g. for `c-decl-end' spots
inside comments). Optimize better in special cases when the
region is a single line inside a literal or macro (typically when
the current line is refontified).
2003-11-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-syntactic-re-search-forward): Fix bug where the
match data could get clobbered if NOT-INSIDE-TOKEN is used.
2003-11-02 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Simplified calls to
`c-add-stmt-syntax' - there's no need to explicitly whack off
entries from the paren state.
* cc-engine.el (c-add-stmt-syntax): Narrowed down the special case
for "else if" clauses.
2003-11-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-inexpr-block, c-add-stmt-syntax): Use
`c-recognize-paren-inexpr-blocks'.
* cc-langs.el (c-recognize-paren-inexpr-blocks): New language
variable to recognize the gcc extension with statement blocks
inside expressions.
* cc-engine.el (c-add-stmt-syntax): Restructured to make it
somewhat more comprehensible. The argument AT-BLOCK-START is no
longer used and hence removed.
(c-guess-continued-construct, c-guess-basic-syntax): Updated calls
to `c-add-stmt-syntax'.
* cc-engine.el (c-beginning-of-statement-1): Don't allow parens in
labels.
(c-backward-to-decl-anchor): Use `c-beginning-of-statement-1'
instead of duplicating parts of it. This fixes bogus label
recognition.
* cc-engine.el (c-backward-to-decl-anchor): Use
`c-beginning-of-statement-1' instead of duplicating parts of it.
This fixes bogus label recognition.
* cc-mode.texi: Extended the doc on c-label-minimum-indentation a
little.
* cc-align.el (c-gnu-impose-minimum): Reverted to the old method
of checking the context in which to apply the minimum indentation,
so that it isn't enforced in e.g. namespace blocks.
* cc-vars.el (c-inside-block-syms): New constant used by
`c-gnu-impose-minimum'. It's defined close to `c-offsets-alist'
to somewhat reduce the risk of becoming stale.
* cc-cmds.el, cc-engine.el (c-shift-line-indentation): Moved from
cc-cmds to cc-engine to allow use from cc-align.
2003-10-29 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-inheritance-list): Cope with fully
qualified identifiers containing "::".
q
2003-10-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-add-type, c-check-type, c-forward-name,
c-forward-type): Improved storage of template types in
`c-found-types' so that they can be recognized better.
(c-syntactic-content): Added option to skip past nested parens.
* cc-engine.el (c-forward-name): Set `c-last-identifier-range' all
the time. It's less work that way. Handle that there might not
be an identifier to store in `c-last-identifier-range'.
(c-forward-type): Handle that `c-last-identifier-range' might be
nil from `c-forward-name'.
* cc-defs.el: (c-safe-scan-lists,
c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments.
* cc-defs.el (c-save-buffer-state): Use `unwind-protect' to work
even if the form fails.
* cc-defs.el (c-make-keywords-re): Added kludge for bug in
`regexp-opt' in Emacs 20 and XEmacs when strings contain newlines.
* cc-engine.el (c-parse-state): Speedup when moving far down in a
large file in one go.
(c-get-fallback-start-pos): New helper function for
`c-parse-state'.
2003-10-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (c-emacs-features): Use a space in front of the name
of the temporary buffer. That also avoids dumping problems in
XEmacs due to undo info being left around after the buffer is
killed.
* cc-mode.texi: Document c-lineup-assignments and c-lineup-math.
* cc-align.el (c-lineup-assignments): New lineup function which is
like `c-lineup-math' but returns nil instead of `c-basic-offset'
when it doesn't match.
(c-lineup-math): Changed to use `c-lineup-assignments'.
2003-10-20 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: Fix some bugs in subfunctions of
c-beginning-of-statement. New subfunctions
c-in-comment-line-prefix-p, c-narrow-to-comment-innards.
2003-10-14 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-langs.el: Use `c-simple-ws' instead of hardcoded
char classes whereever possible. Changed a couple of places to
use skip by syntax instead of skip by char class.
* cc-langs.el (c-unterminated-block-comment-regexp): Fixed a bug
in the regexp that caused extreme backtracking.
2003-10-13 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-in-knr-argdecl): Look closer at the function
arglist to see if it's a K&R style declaration.
(c-guess-basic-syntax): CASE 5B.2: Check with `c-in-knr-argdecl'
before returning knr-argdecl-intro.
2003-10-12 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-block-comment-starter, c-block-comment-ender):
New language constants to specify in a single place how block
comments look.
(c-comment-start-regexp, c-block-comment-start-regexp,
comment-start, comment-end, comment-start-skip,
c-syntactic-ws-start, c-syntactic-ws-end, c-nonwhite-syntactic-ws,
c-syntactic-ws, c-nonempty-syntactic-ws,
c-single-line-syntactic-ws, c-syntactic-eol): Now built from
`c-line-comment-starter', `c-block-comment-starter' and
`c-block-comment-ender'.
(c-block-comment-regexp, c-unterminated-block-comment-regexp): New
language constants to break up things a bit.
(c-simple-ws): New language constant for simple whitespace.
* cc-defs.el (c-concat-separated): New convenience function.
* cc-defs.el (c-make-keywords-re): Added kludge for bug in
`regexp-opt' in Emacs 20 and XEmacs when strings contain newlines.
Allow and ignore nil elements in the list.
2003-10-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: Comment out a (n almost certainly superfluous)
check, (eq here (point-max)) in c-beginning-of-statement.
2003-10-02 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: Tidy up the comments in c-beginning-of-statement and
subfunctions.
2003-10-01 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-awk.el: Replace calls to put-text-property to the more
flexible c-put-char-property and c-clear-char-properties. Add the
author's email address.
2003-09-30 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-langs.el: New variable, c-block-comment-start-regexp.
2003-09-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: 1. Fix stupid error in previous commit. 2. Fix bug
with M-e, when point is inside the closing "*/" of a block
comment.
* cc-cmds.el: Tidy c-beginning-of-sentence (and subfunctions) so
that it works at BOB and EOB.
* cc-cmds.el: Correct small inaccuracy in previous check-in.
* cc-cmds.el, cc-vars.el: More updating of
c-beginning-of-statement, including new variable
c-block-comment-start-regexp.
2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-parse-state): Fixed bug that could cause errors
when the state cache contains info on parts that have been
narrowed out.
2003-09-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi, cc-vars.el (c-comment-prefix-regexp): Document
that `c-setup-paragraph-variables' has to be used when this
variable is changed; it doesn't work to reinitialize the mode
since that typically clobbers the variable.
* cc-styles.el (c-setup-paragraph-variables): Made it interactive.
2003-09-21 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-known-type-key): Optimize simple symbols from
`*-font-lock-extra-types' so that there's no need to use
`regexp-opt' on those lists.
* cc-fonts.el (c-font-lock-declarations): Fixed recognition of
constructors and destructors for classes whose names are matched
by `*-font-lock-extra-types'.
* cc-langs.el (c-type-list-kwds): If "operator" is followed by an
identifier in C++ then it's a type.
* cc-langs.el (c-type-decl-suffix-key): Fix when
`c-type-modifier-kwds' is empty.
2003-09-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-invalid-string): Fix when there are
several strings on the same line.
* cc-engine.el (c-literal-limits): Removed the compatibility
function for older emacsen. `c-literal-limits-fast' has now taken
the place of this function.
* cc-vars.el (c-emacs-features): Removed compatibility with older
emacsen: We now require 'pps-extended-state.
2003-09-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-invalid-string): Fixed eob problem that
primarily affected XEmacs. Don't use faces to find unterminated
strings since Emacs and XEmacs fontify strings differently - this
function should now work better in XEmacs.
2003-09-15 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: New function c-beginning-of-sentence, which obviates
the need to hack sentence-end. This now handles escaped newlines
in strings correctly. Correct minor bugs in c-move-over-sentence
and in c-beginning-of-statement.
2003-09-13 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-statement (and subfunctions)): Adapt
c-\(back\|forward\)-over-illiterals such that movement over macros
and code are rigorously separated from eachother. Correct a few
incidental bugs.
2003-09-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Fixed a bug in the
`expand-abbrev' workaround which caused braces to disbehave inside
macros.
* cc-engine.el (c-forward-keyword-clause): Fixed error handling.
This bug could cause interactive font locking to bail out.
2003-08-31 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-just-after-func-arglist-p): Handle paren-style
types in Pike. Also fixed some cases of insufficient handling of
unbalanced parens.
2003-08-29 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el: Restructure c-beginning-of-statement: Improve its
doc-string. Improve the handling of certain specific cases.
2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Work around for a misfeature in
`expand-abbrev' which caused electric keywords like "else" to
disappear if an open brace was typed directly afterwards.
2003-08-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-fonts.el, cc-langs.el (c-guess-basic-syntax):
Changed the way class-level labels are recognized; they can now
contain essentially any symbols.
(c-opt-extra-label-key): New language variable to cope with the
special protection label syntax in Objective-C.
(c-opt-access-key): Removed; this is now handled better by
`c-nonlabel-token-key' and `c-opt-extra-label-key'.
(c-complex-decl-matchers): Update to handle that
`c-opt-access-key' no longer exists.
* cc-engine.el (c-guess-basic-syntax): Make use of the improved
label recognition in `c-beginning-of-statement-1'.
* cc-engine.el (c-beginning-of-member-init-list): Recognize
bitfields better.
* cc-engine.el (c-beginning-of-inheritance-list): Removed some
cruft and fixed a bug that could cause it to go to a position
further down.
* cc-langs.el, cc-engine.el (c-beginning-of-statement-1): Improved
detection of labels in declaration contexts.
(c-beginning-of-decl-1): Use it.
(c-nonlabel-token-key): New language constant and variable needed
by `c-beginning-of-statement-1'.
* cc-engine.el (c-guess-basic-syntax): Fixed bug that manifested
itself due to the correction in `c-forward-sexp'.
* cc-defs.el (c-forward-sexp, c-backward-sexp): Made these behave
as documented when used at the buffer limits.
* cc-mode.el, cc-engine.el, cc-langs.el (c-type-decl-end-used):
Made this a language variable.
* cc-mode.el (c-after-change): Widen the buffer to work correctly
when `combine-after-change-calls' is used together with temporary
narrowings.
2003-08-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Report labels
correctly when the start point is immediately after the colon.
2003-08-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (c-extra-types-widget): The doc string is mandatory
in `define-widget'.
* cc-align.el, cc-langs.el (c-lineup-math): Don't align the
operators "!=", "<=" and ">=" as assignment operators.
(c-assignment-operators): New language constant that only contains
the assignment operators.
(c-assignment-op-regexp): New language variable used by
`c-lineup-math'.
2003-08-21 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-parse-sexp-lookup-properties): Removed since it
isn't used anymore.
* cc-cmds.el (c-electric-lt-gt): Detect and mark angle bracket
arglists such as template parens in C++.
* cc-engine.el (c-syntactic-skip-backward): Fixed a bug in the
last check-in. Some optimization.
* cc-engine.el (c-syntactic-skip-backward): Fixed bug where it
could stop at the same level in a preceding sexp when PAREN-LEVEL
is set.
* cc-mode.el (c-basic-common-init): Turn on syntax-table text
property lookup only when it's needed.
* cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el: Changed the
policy for paren marked angle brackets to be more persistent; once
marked they remain marked even when they're found to be unbalanced
in the searched region. This should keep the paren syntax around
even when individual lines are refontified in multiline template
arglists.
(c-parse-and-markup-<>-arglists): New dynamically bound variable
to control markup so that incorrect angle bracket arglists aren't
marked in contexts where the correct value for
`c-disallow-comma-in-<>-arglists' isn't known.
(c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse
argument has become `c-parse-and-markup-<>-arglists'.
(c-remove-<>-arglist-properties): Removed - no longer used.
(c-after-change-check-<>-operators): New function used on
`after-change-functions' to avoid that "<" and ">" characters that
are part of longer operators have paren syntax.
(c-<>-multichar-token-regexp): New language variable used by
`c-after-change-check-<>-operators'.
(c-after-change): Call `c-after-change-check-<>-operators'.
(c-font-lock-<>-arglists): Use the context properties set by
`c-font-lock-declarations' to set
`c-disallow-comma-in-<>-arglists' correctly to avoid doing invalid
markup.
(c-font-lock-declarations): Removed code that undoes the invalid
markup done by `c-font-lock-<>-arglists'.
(c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs
after `c-font-lock-declarations'.
2003-08-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-syntactic-skip-backward): Added paren-level
feature.
(c-guess-basic-syntax): Improved the anchor position for
`template-args-cont' in nested template arglists. There's still
much to be desired in this area, though.
2003-08-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-just-after-func-arglist-p): Safeguard against
unbalanced sexps.
2003-08-03 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-init-language-vars-for): Add argument MODE.
Renamed from c-init-c-language-vars'.
(c-initialize-cc-mode): Change accordingly.
(c-common-init): Ditto.
(c-mode): Ditto.
(c++-mode): Use function.
(objc-mode): Ditto.
(java-mode): Ditto.
(idl-mode): Ditto.
(pike-mode): Ditto.
(awk-mode): Ditto.
2003-08-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-end-of-current-token): Return whether or not the
point moved.
(c-search-decl-header-end): Don't trip up on operator identifiers
in C++ and operators like == in all languages.
* cc-engine.el (c-backward-to-decl-anchor): Detect leading labels
correctly.
2003-07-21 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el, cc-langs.el, cc-mode.texi, cc-vars.el:
Make the "Text Filling and Line Breaking" commands work for AWK
buffers.
2003-07-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Some updates due to the dropping of the support
for older emacsen.
* cc-defs.el, cc-engine.el (c-mode-is-new-awk-p): Removed;
(c-major-mode-is 'awk-mode) can be used instead now.
* cc-mode.el: Always set up AWK mode since emacsen where it
doesn't work no longer are supported.
* cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el, cc-engine.el,
cc-fonts.el, cc-langs.el, cc-cmds.el: CC Mode now requires support
for the syntax-table' text property, which rules out Emacs 19 and
XEmacs < 21.4. Removed various compatibility cruft associated
with those versions.
* cc-defs.el, cc-fix.el: CC Mode now requires support for the
`syntax-table' text property, which rules out Emacs 19 and XEmacs
< 21.4. Removed various compatibility cruft associated with those
versions.
* cc-vars.el (c-emacs-features): CC Mode now requires support for
the `syntax-table' text property.
2003-07-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-nonbreakable-space-face): Remove the variable and
use an extra quoted face name instead. All the emacsen flavors
handle that correctly.
* cc-defs.el (c-langelem-sym, c-langelem-pos, c-langelem-2nd-pos):
Added accessor functions for syntactic elements.
2003-07-09 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-literal-faces): Declare as a variable since it
might be modified.
* cc-langs.el: (c++-make-template-syntax-table,
c-syntactic-ws-start, c-syntactic-ws-end): Gave more consistent
names to these language constants.
2003-07-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Do not do hidden buffer
changes; there's third party code that calls this function
directly.
2003-07-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (javadoc-font-lock-keywords,
autodoc-font-lock-keywords): Don't byte compile on font lock
initialization when running from byte compiled files.
2003-07-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el: Fix AWK mode indentation when previous statement
ends with auto-increment "++".
2003-07-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el, cc-styles.el (c-style-alist, c-lang-variable-inits,
c-lang-variable-inits-tail): The values of these are changed, so
declare them as variables and not constants.
2003-07-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el, cc-styles.el (c-style-alist, c-lang-variable-inits,
c-lang-variable-inits-tail): The values of these are changed, so
declare them as variables and not constants.
* cc-mode.el: Fixed some autoload problems: Try to ensure that the
entry for ".c" extension comes before the one for ".C" on
`auto-mode-alist', to behave better on case insensitive OS:es.
Fixed incorrect entries that were added to
`interpreter-mode-alist'. Moved the autoload directives for AWK
to the top level since they aren't recognized anywhere else. Do
not use the new AWK mode doc in the autoload form for the old AWK
mode.
2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-complex-decl-prepare,
c-font-lock-declarators, c-font-lock-declarations,
c-complex-decl-matchers, c-basic-matchers-after): Use a text
property to mark the items in in declarator lists to handle
refontification inside multiline declarations better.
2003-07-02 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): Recognize a construct
like "a * b = c;" as a declaration.
* cc-menus.el (cc-imenu-init): Do not set
`imenu-create-index-function' if the second argument is left out.
This bug broke the imenu support in C, C++ and Java modes.
2003-06-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* Release 5.30.
* cc-engine.el, cc-align.el (c-add-stmt-syntax, c-lineup-arglist,
c-lineup-arglist-close-under-paren): Fixes to cope with special
brace lists in Pike.
2003-06-19 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-mode.el: awk-mode: Call c-awk-after-change to ensure
syntax-table props at loading.
* cc-fonts.el: Put (cc-require-when-compile 'cc-awk) to eliminate
compile-time errors.
2003-06-18 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-awk.el, cc-engine.el: Added code to analyze AWK top-level
forms properly (c-guess-basic-syntax CASE 5P),
c-awk-backward-syntactic-ws.
2003-06-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fix.el: cc-mode-19.el has been renamed to cc-fix.el since it
now contains compatibility stuff for later versions than (X)Emacs
19.
2003-06-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-paren-nontype-kwds): New language constant.
(c-other-decl-kwds, c-postfix-decl-spec-kwds): Added compiler
specific declspec keywords: __attribute__ for gcc and __declspec
for msvc.
* cc-fonts.el (c-font-lock-declarations, c-complex-decl-matchers):
Support specifiers in a couple more contexts to cope with msvc
'__declspec'.
* cc-engine.el (c-forward-keyword-clause): Support
`c-paren-nontype-kwds'.
2003-06-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-primary-expr-regexp): Don't match a bare period
as a float.
2003-06-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-bytecomp.el (cc-bytecomp-setup-environment): Do not cover
functions that have been bound.
(cc-external-require): New macro to use for requiring external
packages, to handle the environment correctly.
* cc-defs.el, cc-fix.el, cc-fonts.el, cc-mode.el: Replaced
external require's with `cc-external-require'.
2003-06-15 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-member-init-list,
c-guess-basic-syntax): Fixes in handling of bitfields.
2003-06-13 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (comment-end): Put a space in front of the comment
ender in C, as it was before the move from cc-mode.el.
2003-06-11 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-fonts.el: Do not load cc-awk.elc or awk-font-lock-keywords
unless there is an AWK Mode buffer.
2003-06-10 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-awk.el: New file that implements AWK support, superseding the
old separate derived mode in awk-mode.el.
* cc-vars.el, cc-mode-19.el, cc-langs.el, cc-mode.el, cc-defs.el,
cc-engine.el, cc-fonts.el: Changes for the new AWK support.
2003-06-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el (c-decl-block-key,
c-search-uplist-for-classkey): Check that the modifier is followed
by "{" in Pike before considering it to start a class-like block.
2003-05-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-initialize-cc-mode): Added some compatibility to
make this function behave somewhat more as documented for derived
modes. It's still not enough to make the old AWK mode behave
reasonably, but it's been like this a long time now so fixing it
more might cause trouble elsewhere. :P
2003-05-29 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-remove-font-lock-face): New macro to remove a
font lock face properly (especially in XEmacs).
* cc-bytecomp.el (cc-bytecomp-obsolete-fun): Added the same kludge
as in `cc-bytecomp-obsolete-var' to avoid a confused compiler
warning.
* cc-engine.el (c-forward-type): Fixed a bug in the handling of
concatenated types when the component types are known.
* cc-fonts.el (c-constant-face-name): Added face name variable to
avoid the use of `font-lock-constant-face' for constants in
emacsen that doesn't have it.
2003-05-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el, cc-vars.el, cc-cmds.el: Fixes for the syntactic
symbols for module and composition blocks.
2003-05-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-basic-common-init): Use
`open-paren-in-column-0-is-defun-start' if it exists and works.
* cc-vars.el (c-emacs-features): Added `col-0-paren' to detect
when `open-paren-in-column-0-is-defun-start' exists and actually
works.
2003-05-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-argcont, c-lineup-gcc-asm-reg): Don't
quote nil in docstrings.
2003-04-14 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el, cc-langs.el (c-primitive-type-kwds,
c-font-lock-extra-types): "complex" and "imaginary" aren't
keywords in C99, only macros that expand to the keywords
"_Complex" and "_Imaginary", so make the former a bit less
hardcoded by putting it on `c-font-lock-extra-types' instead.
There are also "bool" and "_Bool" that work the same way.
(c-constant-kwds): "false" and "true" are standard constant macros
in C99.
2003-04-09 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-menus.el, cc-langs.el, cc-engine.el, cc-fonts.el, cc-cmds.el:
Fixed various regexps to use POSIX char classes when that is
supported.
* cc-defs.el (c-alpha, c-alnum, c-digit, c-upper, c-lower): New
constants to make it easier to create regexps that use POSIX char
classes in emacsen that support them.
2003-04-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (c-emacs-features): Detect in the regexp engine
understands POSIX char classes.
2003-04-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-after-change): Added kludge for bug where this
function sometimes gets positions outside the buffer range.
2003-03-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-member-init-list): Better handling
of paretheses in unexpected places.
* cc-engine.el (c-forward-<>-arglist-recur): Fixed a regexp match
order problem that could cause empty template args on the form
"<>" to be missed.
2003-03-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-parse-state): Added kludge to avoid an infinite
loop when Emacs' open-paren-in-column-zero rule kicks in and
causes the sexp functions to misbehave.
2003-03-06 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-member-init-list): Fixed bug when
C++-like code is encountered in non-C++ mode.
2003-03-02 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-make-keywords-re): Added option to specify the
language to look up `c-nonsymbol-key' in.
2003-02-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el (c-auto-newline-analysis): New
dynamically bound variable to turn off the
topmost-intro-cont/statement-cont kludge for brace lists during
the analysis for the auto newline feature. This fixes some cases
where the setting for `brace-list-open' on
`c-hanging-braces-alist' didn't have any effect.
2003-02-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-literal-start-regexp): Yet another language
variable.
* cc-fonts.el (c-font-lock-doc-comments,
c-find-invalid-doc-markup, javadoc-font-lock-keywords): Fixed
fontification of the markup in Javadoc comments.
* cc-engine.el: Fixes in face handling to cope with doc comments.
(c-find-decl-spots): More failsafe skipping of comments and
strings that only have been partially fontified.
* cc-defs.el (c-got-face-at): New subst to test faces at positions
easier.
* cc-defs.el (c-safe-scan-lists): New wrapper macro to avoid the
warnings with too many args to `scan-lists' in Emacs.
2003-02-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-syntactic-skip-backward): New function to make
syntactic searches in the backward direction easier.
(c-beginning-of-statement-1): Optimized skipping over large paren
sexps somewhat.
(c-safe-position): Removed the odd macro handling which was
centered around the point instead of the passed position.
2003-02-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-in-knr-argdecl): Do not trip up on
initialization expressions.
* cc-align.el (c-lineup-arglist, c-lineup-close-paren,
c-lineup-arglist-close-under-paren): Tuned the "macro block"
heuristics to work better in nested arglist situations.
2003-02-10 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el (c-set-offset): Don't find a default syntactic
element through syntactic analysis if called outside a CC Mode
buffer.
2003-02-09 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-basic-common-init): Install `c-fill-paragraph' on
`fill-paragraph-function'. Although it's not the normal way to
call it in a CC Mode buffer it makes a direct call to
`fill-paragraph' work better.
2003-01-28 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el, cc-mode.el (c-require-final-newline): Made this
variable an alist to specify a value for each language. The
default value causes `require-final-newline' to be set to t only
in languages where the standard requires a final newline.
2003-01-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el, cc-vars.el (c-require-final-newline): Added a
variable to make the initialization of `require-final-newline'
more configurable.
* cc-vars.el (c-mode-common-hook): Do not change the format string
to "CC Mode Common Hook" since that causes confusion (although it
is a more accurate name).
2003-01-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (javadoc-font-lock-keywords,
autodoc-font-lock-keywords): Support for Javadoc and Pike Autodoc
doc comments.
* cc-vars.el (c-doc-comment-style): New variable to control the
fontification of documentation comments on top of the normal mode
font lock.
2003-01-14 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el, cc-fonts.el (c-primary-expr-regexp,
c-font-lock-declarations): Avoid false recognition of parens as
casts when they are followed by an operator that is both prefix
and infix.
2003-01-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-guess-fill-prefix): Tuned the heuristics of when
to use `c-block-comment-prefix' for an unclosed block comment.
2002-12-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el (c-nonsymbol-sexp-kwds,
c-forward-keyword-clause): Handle keywords like "extern" that can
be followed by e.g. a string literal.
* cc-defs.el (c-make-keywords-re): Make a regexp correctly with
one submatch when adorn is set and the list is empty.
2002-12-14 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): Fixed a search that
could go far past the relevant region and cause slowness. Do not
limit the declaration detection to the fontified region since that
can cause misfontification in multiline declarations.
* cc-engine.el (c-find-decl-spots): Added limit argument to handle
declarations spanning the fontification limit better.
2002-12-10 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-in-literal, c-literal-limits,
c-literal-limits-fast, c-beginning-of-inheritance-list): Use the
paren cache instead of the impaired ad hoc in
`beginning-of-defun', so that these functions doesn't trip up on
"{" in the first column inside strings or comments.
2002-12-06 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (c-hanging-braces-alist): Added `statement-cont' and
made it auto newline free by default.
* cc-cmds.el (c-electric-brace): Added `statement-cont' to the
list of syntactic symbols to consider for auto newlines since it
can be used for in-statement brace lists.
* cc-vars.el (c-emacs-features): There's no need to have this
constant autoloaded.
2002-12-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): Use
`c-recognize-typeless-decls' to avoid fontifying some macro
constructs as declarations in languages where a preceding type is
mandatory.
* cc-langs.el (c-recognize-typeless-decls): New language variable.
2002-11-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-close-paren): Use `c-syntactic-eol' when
checking if the open paren ends its line.
* cc-langs.el (c-syntactic-eol): Handle a line continuation
backslash.
2002-11-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-snug-do-while): Compatibility fix for changed
structure in `c-syntactic-context'.
2002-11-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-parse-state): Filter angle bracket arglist
parens in a better way than disabling the syntax table properties
completely.
* cc-fonts.el (c-cpp-matchers): Handle line continuations in cpp
expressions. Do not fontify symbols after #ifdef etc as variables
since that isn't consistent with how the face is used elsewhere
(i.e. only for the definition of the symbol).
2002-11-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el: Added autoload directives for the interface
functions in cc-langs.
2002-11-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): Added a property to
handle refontication in multiline declaration arglists better.
(c-font-lock-<>-arglists): Fix to handle recursive template
arglists better. (As a side effect this will make fontification
work better in older emacsen too.)
* cc-engine.el (c-forward-<>-arglist,
c-remove-<>-arglist-properties): Use a common text property
`c-type' for all sorts of CC Mode char classification, to avoid
cases when then same char is given conflicting types.
(c-forward-<>-arglist): New reparse argument to control that
aspect explicitly.
(c-forward-name, c-forward-type): Changes in the handling of
recursive template arglists. Fixes to cope with the new 'known
type classification.
2002-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-basic-common-init): Added the new char property
`c-type' to `text-property-default-nonsticky'.
* cc-defs.el (c-put-char-property, c-get-char-property,
c-clear-char-property, c-clear-char-properties): Generalized
`c-put-char-syntax' and `c-get-char-syntax' to handle any
property.
* cc-bytecomp.el (cc-bytecomp-defun): Fixed bug that caused
existing function definitions to be overridden by phonies when the
bytecomp environment is restored.
2002-11-15 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-paragraph): Masking is necessary in normal
code too to avoid getting a fill prefix from a nearby comment.
Changed the name from `c-mask-comment' to a more accurate one.
* cc-defs.el, cc-mode.el: Changed the auto-load-alist strategy to
not add entries on package load, to be defensive in the case that
autoloads are updated in older emacsen. The bug that would occur
in that case would probably be rather nasty for the average user.
2002-11-14 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-declarations): Fine tuning of the
decision tree that tells declarations from expressions to produce
better results in some ambiguous cases.
* cc-fonts.el (c-font-lock-syntactic-face-function): Removed since
it doesn't give the control we want.
(c-font-lock-invalid-string): Replacement for
`c-font-lock-syntactic-face-function' that puts the error face on
the string opener only, to avoid the annoying excessive use of the
error face while a string literal is being written.
(c-basic-matchers-before): Use `c-font-lock-invalid-string'.
* cc-engine.el (c-string-syntax, c-string-limit-regexp): Added
constants to use when handling string limits, since not all old
emacsen react well to the "|" syntax class.
(c-literal-limits, c-literal-limits-fast, c-literal-type): Use
`c-string-syntax' and `c-string-limit-regexp'. Replaced some
hardcoded comment start regexps with `c-comment-start-regexp'.
2002-11-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el: Added an association for pike-mode on
`intepreter-mode-alist'.
2002-11-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el: Add the `auto-mode-alist' entries to the end instead
of the start of the list, to avoid overriding user additions that
are made before this file is loaded when the entries don't
correspond to any already on `auto-mode-alist'.
This is done through the third append argument to
`auto-mode-alist'. That doesn't exist in older (X)Emacsen, so the
function is adviced in cc-defs. However, that advice doesn't help
if the autoloads are updated in an old (X)Emacs with this version
of CC Mode, but I believe it's unlikely that anyone does that when
CC Mode isn't distributed with with it.
* cc-defs.el (add-to-list): Added advice to get the optional third
append argument in older (X)Emacsen.
* cc-langs.el (c-keywords-obarray): Kludge for strange bug in
Emacs that gives so odd errors that I frankly don't even muster to
begin trying to narrow it down. If someone is so inclined,
restore the commented code, byte compile, and try to open a C++
file or something in font lock mode.
2002-11-03 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el: Updated the IDL support from the specs. This also
adds the keywords for the variants PSDL and CIDL. (This is mostly
done from reading the grammars only; very lightly tested.)
* cc-langs.el (c-type-list-kwds): Added "new" in Java.
* cc-fonts.el: Made sure that `parse-sexp-lookup-properties' is
properly insulated from clobbering by the font-lock package at all
relevant entry points.
2002-11-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-opt-after-id-concat-key): New language constant
to make the recognition of identifier qualifiers more flexible.
Recognize the identifier before ".*" as a qualifier in Java.
(c-identifier-key): Recognize "::*" inside identifiers in C++.
Recognize identifiers ending with ".*" in Java for the sake of
import directives.
(c-type-list-kwds, c-ref-list-kwds): Recognize "import" and
"package" declarations in Java.
* cc-vars.el (c-doc-face, c-doc-marker-face, c-doc-markup-face):
Removed since they aren't used (and probably won't be).
* cc-langs.el (c-ref-list-kwds): New language constant to specify
keywords followed by references.
(c-last-identifier-range): New variable to avoid going back to
search for the identifier to font lock after a call to
`c-forward-name'.
(c-type-prefix-kwds, c-type-list-kwds): Fixed classification of
"@interface" etc in Objective-C.
* cc-engine.el (c-forward-keyword-clause): Fixed handling of
keyword prefixes in `c-type-list-kwds' and
`c-colon-type-list-kwds' clauses.
(c-keyword-sym, c-keyword-member): New functions to lookup and
categorize keywords.
(c-forward-keyword-clause): New function to move over a keyword
and its associated clause according to `c-<>-arglist-kwds' etc.
* cc-langs.el (c-typeless-decl-kwds, c-type-list-kwds,
c-colon-type-list-kwds, c-colon-type-list-re, c-paren-type-kwds):
New language constants and variables to generalize the recognition
of various language constructs.
(c-keywords): Did away with the list of `*-kwds' constants. It's
now built through macro expansion.
(c-keywords-obarray): New language variable which contains each
keyword as a symbol, to make fast reverse lookup of keywords to
the `*-kwds' lists they come from.
2002-10-31 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-lang-defconst-eval-immediately): Added macro to be
able to do direct evaluation in `c-lang-defconst' forms.
* cc-engine.el (c-syntactic-re-search-forward): Fixed a bug which
could cause the point to end up outside the containing sexp if
PAREN-LEVEL was used.
* cc-engine.el, cc-fonts.el, cc-langs.el: Generalized the C++
template arglist support to handle angle bracket arglists in any
language.
(c-recognize-<>-arglists, c-<>-arglist-kwds,
c-opt-<>-arglist-start): New language variables to control angle
bracket arglists.
(c-opt-type-suffix-key): Use `c-recognize-<>-arglists' in
Objective-C instead of matching a protocol reference list as a
type suffix.
2002-10-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-gnu-impose-minimum): Fixed a missing
`save-excursion' that caused the point to jump around.
2002-10-26 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el, cc-menus.el (objc-mode, cc-imenu-init): Fixed
initialization bug that has made the Objective-C support
inoperational since 5.26.
(cc-imenu-objc-generic-expression): Updated submatch indices due
to changes in `cc-imenu-c++-generic-expression'.
(cc-imenu-objc-function): Don't add an empty "C" menu since imenu
doesn't like that.
2002-10-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-arglist,
c-lineup-arglist-close-under-paren, c-lineup-close-paren): Added
DWIM to the functions that line up at or after the arglist open
paren to avoid that if there are brace blocks inside, e.g. when a
macro contains a code block.
2002-10-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (objc-font-lock-extra-types): Changed default to
treat identifiers starting with capital letters as types,
according to Objective-C naming conventions. The types previously
on the list is part of the language and therefore on
`c-primitive-type-kwds' instead.
* cc-fonts.el: Fixed font locking in Objective-C. Be more careful
about returning nil from functions used directly as font-lock
matchers.
* cc-mode.el (c-font-lock-init): Made the syntax table
modification element of `font-lock-defaults' parameterized over
the languages.
* cc-langs.el: Updated the Objective-C constants according to the
language spec. The "@" chars that start directives are now
considered part of the keywords to make things easier.
2002-10-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el:
(c-(up|down)-list-(forward|backward)): Made the position optional
and added docstrings.
(c-go-(up|down)-list-(forward|backward)): Added variants of the
above that move point and return successfulness instead.
2002-10-21 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (c-font-lock-<>-arglists): New function to fontify
all occurrences of template arglists in C++.
* cc-engine.el (c-disallow-comma-in-<>-arglists): New variable to
be able to avoid false recognition of template arglists in some
cases.
2002-10-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el, cc-langs.el (c-decl-prefix-re,
c-font-lock-declarations): Match template open brackets to get a
declaration in the first template argument.
(c-complex-decl-matchers): Fontify the second type in a "class X =
Y" expression in C++.
2002-10-19 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-<>-arglist): Broke out the recursive
part to a new function to improve efficiency when a nested
template arglist search turns out to be futile.
2002-10-13 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-menus.el (cc-imenu-java-generic-expression): Improved to
avoid false matches on e.g. "else if (foo)".
2002-10-11 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-token-2, c-backward-token-2): New
functions that work like the -1 variants but that handles
multicharacter operator tokens.
* cc-engine.el (c-inside-bracelist-p, c-guess-basic-syntax): Did
away with the hardcoded regexps to recognize "typedef" declaration
prefixes, "extern" and "namespace" blocks, "enum"-style brace list
declarations and Java-style array initializers with "new".
* cc-langs.el (c-brace-list-decl-kwds, c-brace-list-key,
c-inexpr-brace-list-kwds, c-opt-inexpr-brace-list-key): New
language constants and variables to parameterize some more of the
hardcoded regexps in cc-engine.
2002-10-10 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-cascaded-calls): Do not allow cascaded
call lists containing both "->" and ".".
2002-10-09 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-fonts.el,
cc-langs.el, cc-mode.el, cc-styles.el: New language variable
system to make it easier to set up optimized language variables
and to extend them in third party derived modes. cc-langs is no
longer required at runtime.
* cc-mode.el (c-basic-common-init): No longer initializes the
language variables. It's necessary that the caller does that
directly since the evaluated values for them now get compiled in
directly.
(c-font-lock-init, c-common-init): Separated the font-lock
initialization from `c-common-init'.
* cc-mode.el (c-define-abbrev-table): Do not override an existing
abbrev table.
(c-Java-defun-prompt-regexp): Moved here from cc-langs since
cc-langs isn't always loaded at runtime.
* cc-langs.el (c-make-init-lang-vars-fun, c-init-language-vars):
Changed to allow language variable initialization from derived
modes.
(c-mode-menu): New language variable for the mode menu.
(c-make-mode-syntax-table, c-mode-syntax-table,
make-c++-template-syntax-table): New language variables for syntax
tables. The code that initializes them has been moved to cc-mode
to make it possible to avoid loading cc-langs at runtime.
* cc-engine.el, cc-langs.el (c-hungry-delete-key, c-auto-newline,
c-auto-hungry-string): Moved these state variables from cc-langs
to cc-engine to make it possible to avoid loading cc-langs at
runtime.
* cc-defs.el (c-lang-defconst, c-lang-const): Moved from cc-langs
and rewritten to make the language constant system usable from
derived modes.
(c-add-language): New function intended for use from derived modes
that add new C-like languages.
* cc-defs.el, cc-vars.el (c-buffer-is-cc-mode): Moved from cc-vars
to cc-defs to define it during compilation.
* cc-bytecomp.el (cc-require-when-compile): New support macro for
compile time `require's.
2002-10-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el, cc-mode.el (c-version): Moved from cc-mode to
cc-defs to make it accessible to the other components.
* cc-engine.el (c-forward-token-1, c-backward-token-1):
Compatibility fix for emacsen that doesn't understand generic
string delimiters.
* cc-vars.el (c-emacs-features): Added detection of generic string
and comment delimiters.
* cc-defs.el, cc-langs.el (c-make-keywords-re): Changed interface
to make it more extensible.
* cc-langs.el, cc-defs.el (c-regexp-opt, c-regexp-opt-depth,
c-make-keywords-re): Moved from cc-langs to cc-defs since they are
generally useful.
* cc-bytecomp.el, cc-defs.el (cc-eval-when-compile): Moved from
cc-bytecomp to cc-defs to allow use at runtime.
2002-10-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-bytecomp.el (cc-eval-when-compile): Workaround for a bug with
nested `eval-when-compile' in XEmacs 21.
2002-09-27 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el: Added autoloaded forms to install the appropriate
file suffixes on `auto-mode-alist'. Necessary in XEmacs 21.5, and
it can be useful elsewhere too.
2002-09-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-cascaded-calls): Handle "." too, for use
in Java.
* cc-engine.el (c-forward-sws, c-backward-sws): Do not handle cpp
directives in languages that doesn't have any.
2002-09-22 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-operators): Added a high level description of all
operators, along with their precedence and associativity.
* cc-align.el (c-lineup-multi-inher): Fixed bug where the position
of the point and not the beginning of the line was used to
calculate the indentation.
2002-09-18 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el, cc-engine.el (c-backward-single-comment,
c-backward-comments): Added kludge for the bug in
`forward-comment' in most (X)Emacs versions where it moves back
over the "*/" of a block comment if there's no matching "/*".
This has become more important now since it can cause incorrect
caching by `c-backward-sws'.
2002-09-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-hungry-backspace, c-hungry-delete-forward): New
functions to do hungry deletion regardless of hungry-delete mode.
Contributed by Kevin Ryde.
* cc-engine.el (c-forward-sws, c-backward-sws,
c-invalidate-sws-region): Use text properties to cache regions
with complex syntactic whitespace. This helps a lot in improving
responsiveness when there are lots of comments and cpp directives
before point.
2002-09-14 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-guess.el, cc-langs.el, cc-menus.el, cc-mode.el, cc-styles.el,
cc-vars.el, cc-engine.el, cc-fonts.el, cc-cmds.el, cc-defs.el:
Introduced a classification of functions into those that make
"hidden buffer changes" and those who don't. This is prompted by
the increasing use of text properties for various things, to
correctly cover the silly buffer modifications that is caused by
text property changes.
(c-save-buffer-state): New macro that's put around any code that
can manipulate text properties.
2002-09-13 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-basic-common-init): Setup
`text-property-default-nonsticky' to avoid messing with the
rear-nonsticky property on each character in Emacs 21.
* cc-defs.el (c-clear-char-syntax, c-put-char-syntax): Macros that
sets and removes the syntax-table property on a single character
and makes the property nonsticky in both directions in a suitable
way for each (X)Emacs flavor.
* cc-vars.el, cc-defs.el, cc-engine.el, cc-mode.el: Use
`lookup-syntax-properties' in XEmacs to control whether the
syntax-table property has any effect or not.
(c-parse-sexp-lookup-properties): New macro that expands to either
`parse-sexp-lookup-properties' or `lookup-syntax-properties'.
2002-09-12 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el, cc-engine.el, cc-fonts.el: Put the faces into the
buffer in the same way as the font-lock package does. This fixes
a compatibility problem with XEmacs which sets an extra font-lock
property.
* cc-fonts.el (c-put-font-lock-face): A macro that finds out the
right way to put font lock faces at compile time. We're
definitely not byte code portable between Emacs and XEmacs now.
* cc-engine.el (c-forward-sws, c-backward-sws): Implemented a
cache for the last large skipped over syntactic whitespace. This
also has most effect after many macros.
* cc-engine.el, cc-defs.el (c-forward-syntactic-ws,
c-backward-syntactic-ws): Utilize the limit better when one is
passed. These are now macros to avoid a little overhead when no
limit is given.
(c-forward-sws, c-backward-sws): New functions called by the
macros above to do the unbounded search.
* cc-fonts.el (c-font-lock-declarations): Implemented a cache for
the first backward search for a preceding `c-decl-prefix-re'
match. This typically speeds up interactive refontification a lot
on the top level of macro heavy header files.
2002-09-10 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (c-emacs-features): Added check for syntax text
properties.
* cc-mode.el (c-basic-common-init): Turn on
`parse-sexp-lookup-properties' if it's supported. Define the
variable in any case since it's used at runtime to check on this.
* cc-langs.el (c-identifier-key): Support C++ destructor names.
(c-identifier-start, c-op-token-regexp, c-type-modifier-kwds,
c-opt-type-modifier-key, c-opt-type-component-key,
c-typedef-specifier-kwds, c-typedef-specifier-key,
c-paren-stmt-kwds, c-paren-stmt-key, c-syntactic-ws-start): A
bunch of new language constants and variables to support the
improved handling of names and types.
* cc-fonts.el (c-font-lock-declarators, c-font-lock-declarations):
Handle C++ template declarations and template references. Fontify
complex types and names more accurately by delegating it to
`c-forward-type' and `c-forward-name'. Fontify the identifiers in
typedef declarations as types.
* cc-engine.el (c-forward-<>-arglist): New function to move
forward over a C++ template arglist. It also marks the '<' and
'>' chars with paren syntax using the syntax-table property, to
speed up later calls in emacsen that support syntax text
properties (Emacs >= 20 and (undocumented) XEmacs 21).
This also has the very interesting effect that if font locking is
used with decoration level 3 or higher in these emacsen then
template arglists will behave just like paren sexps with the
various sexp movement commands.
(c-forward-name): New function to move over a name. Simple in
most languages except C++ where a name can contain template
arglists and therefore almost arbitrary expressions.
(c-on-identifier): Fix for Pike operator identifiers.
(c-simple-skip-symbol-backward, c-syntactic-content,
c-remove-<>-paren-properties): New helper functions.
* cc-defs.el: (c-clear-char-syntax, c-mark-paren-open,
c-mark-paren-close): New support functions to handle syntactic
properties on C++ template arglist brackets.
(c-put-type-face, c-put-reference-face): Helpers to put faces on
regions, since there are a bit of that inside `c-forward-name' etc
in cc-engine.el.
* cc-engine.el, cc-fonts.el, cc-langs.el: Fixed the names on a
number of regexp language variables to conform to the nomenclature
and shortened some names.
* cc-align.el, cc-cmds.el, cc-fonts.el, cc-engine.el
(c-syntactic-re-search-forward): Removed the COUNT argument since
it's never used. Added an argument to tell which subexpression
whose end should be tested for syntactic relevance. Using this
also removes some optimizations, so that it's possible to use a
look behind subexpression that matches the end of a literal or a
close paren when PAREN-LEVEL is used.
(c-guess-continued-construct): Don't match <<= or >>= for the
stream-op syntactic element.
* cc-defs.el (c-paren-re, c-identifier-re): Removed these helper
macros since better and more correct tools are now available in
cc-langs.el.
2002-09-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-string-cont): New lineup function to line
up string literals that will be concatenated.
2002-09-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-populate-syntax-table): XEmacs classifies the
hard space character as a symbol character but it's better to let
it be in the punctuation class so that it's always highlighted
with the inverted invalid face. It can perhaps be argued that
that character is allowed in identifiers in some languages
(haven't checked), but using it would still be extremely
confusing.
2002-09-04 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Fixed a case when a
labeled substatement caused incorrect association of the following
continuation clause.
* cc-engine.el (c-syntactic-re-search-forward): Handle the case
when the syntactic match position is in the middle of a comment
starter.
(c-guess-continued-construct): Analyze the "K&R region" of a
function nested inside a function as func-decl-cont and not
statement-cont. New case E. Also cleaned up case C (stream-op
recognition) a bit.
* cc-engine.el (c-parse-state, c-check-state-cache): Moved the
check on `c-state-cache-start' from `c-check-state-cache' to
`c-parse-state' so that the state cache isn't zapped if
`c-check-state-cache' but not `c-parse-state' is called during a
temporary narrowing. This fixes a performance problem that could
occur when `fill-paragraph' is used in font lock mode on a comment
at the end of a large class or function.
(c-state-cache-start): Fixed buffer localness.
2002-09-03 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el: Updates from the C99 standard (or actually from the
latest web accessible draft of it).
2002-09-02 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el: Updated the keywords and operator tokens from the
latest C++ and Java standards. Some other multichar token
corrections.
2002-09-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el, cc-vars.el (c-syntactic-context,
c-syntactic-element): Do not bind any values to these variables
globally since they should always be dynamically bound. This
makes it much easier to debug cases when they've gotten global
values somehow.
2002-08-31 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-regexp-opt): Fix to work around the non-greedy
behavior that the regexp engine sometimes exposes. This bug only
shows in (X)Emacs 19 where there's no regexp-opt package.
* cc-engine.el (c-syntactic-re-search-forward): Added a feature to
filter out matches in the middle of tokens. Changed the comment
to a docstring since I consider this function generally useful.
* cc-defs.el (c-mode-symbol): Broke out a part of `c-mode-var'.
* cc-align.el (c-lineup-cascaded-calls, c-lineup-gcc-asm-reg):
Cope with that `c-most-enclosing-brace' might return nil.
2002-08-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-found-types, c-clear-found-types, c-add-type,
c-check-type, c-add-complex-type, c-list-found-types,
c-forward-type): Added a sort of symbol table for types: If a name
is recognized as a type in a declaration it's added in an obarray
to be able to recognize it in other ambiguous declarations.
(c-remove-ws): New helper function to canonicalize fully qualified
identifiers for `c-found-types'.
* cc-defs.el (c-mode-var): New defsubst to access mode prefixed
variables uniformly.
2002-08-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-arglist-close-under-paren): Work correctly
with nested arglist-cont-nonempty symbols.
(c-lineup-arglist-operators): New lineup function to line up infix
operators under the open paren of the surrounding sexp.
2002-08-20 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-syntactic-ws): Fixed a bug that could
cause an infinite loop if something that looks like a macro begins
in the middle of a line.
(c-parse-state): Fixed a bug that could cause `c-state-cache' to
contain two conses in sequence when there's an unbalanced open
paren in a macro.
2002-08-16 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-face-name-p): A defsubst to recognize the name of
a face in a way that works also in XEmacs.
* cc-engine.el (c-forward-type): New function to move past a type
spec.
* cc-engine.el (c-syntactic-re-search-forward): Fixed behavior
when the limit is reached inside a comment, string, or a macro.
* cc-align.el, cc-cmds.el, cc-engine.el (c-forward-single-comment,
c-forward-comments, c-backward-single-comment,
c-backward-comments): New replacements for `c-forward-comment'
that wraps `forward-comment' more efficiently in each of the four
different cases it's actually used. These replacements also
treats line continuations as whitespace.
(c-forward-comment): Removed. The four different cases above are
basically different, so it's better to make them into separate
functions than choose between them at runtime using the argument.
2002-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-gnu-impose-minimum): Fixed bug due to the new
placement of cpp-macro and comment-intro in the syntactic context,
as pointed out by Kevin Ryde. Changed the method that decides
whether point is inside a top-level construct to one that doesn't
depend on the set of syntactic elements so much.
* cc-defs.el (c-point): Use the functions
`line-beginning-position' and `line-end-position' in emacsen that
have them (currently Emacs 20 and later).
2002-07-27 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-comment): Fixed a bug that sometimes caused
code after a closed block comment to be taken into account when
the fill prefix is calculated.
2002-07-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-arglist, c-lineup-argcont, c-lineup-math,
c-lineup-cascaded-calls, c-lineup-gcc-asm-reg): Fixes to cope
correctly with nested arglists for the lineups that can be used
with arglist-cont-nonempty.
2002-07-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-add-stmt-syntax, c-guess-basic-syntax): Changed
the anchor position of arglist-cont-nonempty and arglist-close so
that a relative indentation like + can be used with consistent
results. Prior to this, the indentation engine more or less
assumed that arglist-cont-nonempty always used `c-lineup-arglist'.
Those two syntax symbols also get the opening paren as an extra
position, to make it possible for `c-lineup-arglist' to continue
to do a proper job.
* cc-engine.el (c-get-syntactic-indentation): A vector with an
absolute indentation column now only overrides the indentation for
surrounding structures, i.e. those whose syntactic elements are
earlier in the `c-syntactic-context' list, but not nested ones.
This so that e.g. `c-lineup-arglist' can reliably line up with the
first argument but still allow relative indentation changes for
nested things, e.g. the arglist-close of a nested argument list.
This change means that the order in `c-syntactic-context' has
become more essential.
(c-guess-basic-syntax): Changes to make the nesting order of the
returned syntax list correct.
Compatibility note: This change means that `c-lineup-dont-change'
now (again) isn't absolutely sure to keep the current indentation.
However, I believe that most people use it for comments, macros
and string literals, and since those are nested innermost it won't
matter.
2002-06-17 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-defs.el, cc-engine.el, cc-vars.el
(c-guess-basic-syntax, c-calc-offset, c-get-syntactic-indentation,
c-syntactic-context): Extended the representation of the syntactic
context: Previously it was a list containing cons cells of the
found syntactic symbols and their relpos values. Now each element
is instead a list containing the syntactic symbol in the first
element and the relpos (if any) in the second. After that there
might be more elements, depending on the syntactic symbol. The
line-up functions get these additional elements as extra
arguments.
This change is slightly incompatible. Although the calling
convention for line-up functions is strictly extended, the format
of the `c-syntactic-context' variable has changed slightly. It's
believed that this incompatibility is minor, though; not a single
line-up function distributed with CC Mode needed to be changed,
for instance.
2002-06-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el (c-set-style, c-set-style-1): Added another state
for the `dont-override' flag where it only keeps globally set
variables.
2002-06-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-postprocess-file-styles): Do nothing except in CC
Mode modes.
2002-06-02 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el, cc-fonts.el, cc-langs.el, cc-mode.el: Added font
lock support.
* cc-engine.el (c-beginning-of-syntax): New function to be used
for font-lock-beginning-of-syntax-function. It uses the state
cache to quickly find a good position.
* cc-defs.el (c-major-mode-is): Allow a list of modes. Made it a
macro ensure that it's optimized to either eq or memq for constant
arguments.
* cc-mode.el (c-common-init): Did away with the hardcoded setting
of `comment-column'; it's a user variable that we have no business
meddling with. Since the default value for it is 32 in all
supported (X)Emacs versions, it's also safe from a compatibility
perspective.
* cc-mode.el (c-basic-common-init): New function that contains
only the syntax and line breaking/filling initialization. It's
intended for use by other modes that embed CC Mode.
2002-05-25 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-add-stmt-syntax): Fixed some cases of wrong
anchoring, e.g. for else-if compounds.
2002-05-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Fixed anchor position for
defun-open in K&R style functions.
* cc-engine.el (c-in-knr-argdecl): Don't trip up on macros.
(c-search-decl-header-end): Handle C++ template arguments more
correctly.
(c-beginning-of-decl-1): Fix when the declaration is first in a
macro.
2002-04-30 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-decl-1): Better way to handle
protection labels, one which doesn't get confused by inherit
colons.
(c-end-of-decl-1): Don't treat functions that have "class" or
"struct" in the return type as classes or structs.
2002-04-27 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-make-keywords-re): Fixed the keyword adornment so
that it works when a keyword ends with "_".
2002-04-24 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-comment): More fixes when used from
`c-do-auto-fill' and point is at or near the limit of the comment.
Fixed bug when the prefix from `c-guess-fill-prefix' is longer
than the text on the first line of the comment when it's masked.
2002-04-23 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-mask-comment): Fixed bug where point was moved to
the following line when it was at the first line of a block
comment where comment-start-skip matched to eol.
Mon Apr 22 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* Release 5.29 (Test version; this is not a real release.)
* cc-engine.el: Incorporated change made in Emacs: Don't
assume point-min == 1 when counting lines.
* cc-mode.el: Incorporated changes made in Emacs:
(c-define-abbrev-table): New function to pass the SYSTEM-FLAG
to `define-abbrev' in a way that works in emacsen that doesn't
support it.
(c-mode-abbrev-table, c++-mode-abbrev-table,
objc-mode-abbrev-table, java-mode-abbrev-table,
pike-mode-abbrev-table): Mark all the predefined abbrevs as
"system" abbrevs.
(c-submit-bug-report): Make sure that the arguments to
`insert' are strings.
Sun Apr 21 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-engine.el, cc-styles.el, cc-vars.el
(c-guess-basic-syntax, c-lineup-topmost-intro-cont): Find
correct anchor for statement-cont in top level constructs.
Analyze variable initializations in top level constructs as
topmost-intro-cont instead of statement-cont. That is an
incompatible change but it gives better consistency. The new
lineup function c-lineup-topmost-intro-cont' compensates for
it and is now put on topmost-intro-cont by default.
* cc-align.el, cc-engine.el, cc-langs.el (c-lineup-argcont):
Lineup function contributed by Kevin Ryde.
(c-in-gcc-asm-p): Function to recognize asm statements.
Contributed by Kevin Ryde.
(c-opt-asm-stmt-key): New language variable to recognize the
beginning of asm statements.
Sat Apr 20 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Detect variable
declarations after class and struct declarations correctly.
Fixed limit error when finding the anchor for
template-args-cont and topmost-intro-cont.
Fri Apr 05 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-defun, c-declaration-limits):
Find the "line oriented" declaration start too, just like the
"line oriented" end is found.
Thu Apr 04 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-vars.el (c-offsets-alist): A more sane default for
`inexpr-statement'. This is not compatible, though. I think
the benefit of a good default style outweights that in this
case. Besides, `inexpr-statement' is not very common.
Mon Apr 01 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-delete-forward): Fixed silly bug that
caused it to delete backwards in hungry delete mode. (It's
amazing that this bug hasn't been reported.)
* cc-cmds.el (c-declaration-limits, c-mark-function):
Extracted the code to get the declaration limits from
`c-mark-function' to a new `c-declaration-limits'.
(c-indent-defun): Use the same method to get the limits of the
declaration or macro as `c-mark-function'.
* cc-engine.el (c-beginning-of-decl-1): Handle brace list
initializers correctly (but costly; it ought to be integrated
into `c-beginning-of-statement-1').
Sun Mar 31 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el (c-beginning-of-defun,
c-end-of-defun, c-mark-function): Rewritten to detect the
declaration limits better. Now handles K&R argdecls, class
definitions followed by variables etc.
(c-in-knr-argdecl): Broke out the K&R argdecl test in
`c-beginning-of-decl-1' to this new function.
(c-end-of-statement-1, c-end-of-decl-1): Replaced
`c-end-of-statement-1' with `c-end-of-decl-1', which correctly
handles declarations that continue after the block.
* cc-engine.el (c-syntactic-re-search-forward): Added an
option to restrict matching to the top level of the current
paren sexp.
* cc-langs.el (c-opt-block-decls-with-vars-key): New regexp to
recognize declarations that continue after the block.
(c-syntactic-eol): New regexp to match a "syntactic" eol.
Sat Mar 30 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Fixed a bug that often
caused the backward limit to be lost at the top level. This
improves performance a bit.
* cc-engine.el (c-syntactic-re-search-forward): New function
that works like `re-search-forward' but only returns matches
in syntactically significant text.
* cc-engine.el: Fixed a faster and more accurate way to
recognize K&R argdecls.
(c-beginning-of-decl-1): New function that put point at the
beginning of the declaration. It handles K&R argdecl blocks.
(c-guess-basic-syntax): Replaced the `knr-argdecl' recognition
code with one that doesn't depend on the current indentation.
The anchor position for `knr-argdecl' has also changed, but in
a way that is unlikely to cause compatibility problems.
Mon Mar 25 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el, cc-engine.el (c-forward-comment):
`forward-comment' in XEmacs skips over line continuations in
the backward direction. Correct for that. Also made this a
defun since it has grown too large now to be a defsubst.
* cc-langs.el: More convenient and decentralized setup of the
language specific variables. The regexp-opt mangling is also
done at compile time now.
Tue Mar 19 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-line-or-region): Call `c-indent-line'
directly instead of through `indent-according-to-mode' so that
this function always indents syntactically.
* cc-engine.el (c-guess-basic-syntax): Fixed a bug where a
class beginning with a nested class could cause an infinite
loop (the state outside the narrowed out class is never used
now).
Sun Mar 17 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-cmds.el, cc-engine.el, cc-vars.el: Fixes so
that the context sensitive analysis inside macros is
restricted to the bodies of #define's; other things, like #if
expressions, never have anything in common with their
surroundings. The old `cpp-macro-cont' syntax is now used in
situations where the syntactic analysis isn't applicable, and
a new syntactic element `cpp-define-intro' is used to add
indentation in #define bodies.
(c-lineup-cpp-define): New name for `c-lineup-macro-cont' to
better reflect its use.
* cc-engine.el (c-guess-basic-syntax): Ignore line
continuation backslashes in the detection of
`arglist-cont-nonempty'.
* cc-align.el: Use the vector form in the return value in all
cases where lineup functions return absolute columns.
Sat Mar 16 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-add-stmt-syntax, c-guess-basic-syntax):
Anchor `brace-list-intro' and `brace-list-close' better for
brace lists nested inside expressions.
* cc-engine.el, cc-langs.el, cc-mode.el, cc-styles.el: Cleaned
up the various language specific variables and their
initialization. The keyword regexps are now lists that are
combined with regexp-opt. Some variables have changed names
to fit better with the naming convention.
* cc-defs.el, cc-vars.el (c-buffer-is-cc-mode): The value is
the mode symbol of the original CC Mode mode.
(c-major-mode-is): Compare against the buffer local variable
`c-buffer-is-cc-mode', which is faster than using
`derived-mode-class'.
Sun Mar 10 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-syntactic-ws,
c-backward-syntactic-ws, c-forward-token-1,
c-backward-token-1, c-in-literal, c-literal-limits,
c-collect-line-comments, c-literal-type, c-on-identifier,
c-guess-basic-syntax): These functions are now considered part
of the "CC Mode API" and may be used by other code. That's
signified by making their documentation into docstrings.
(c-whack-state, c-hack-state, c-skip-case-statement-forward):
Removed these internal functions since they aren't used.
(c-forward-to-cpp-expression): Classified this function as
internal.
Thu Mar 07 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-ObjC-class-key, c-Java-class-key): Simplified
these regexps; the class keywords they contain ought to be
enough to avoid false matches, so checking for following
identifiers etc is just unnecessary (and might also fail for
oddly formatted code).
Fri Feb 08 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-cmds.el (c-forward-comment-lc): New
function that behaves like `c-forward-comment', with the
exception that line continuations are treated as whitespace.
(c-beginning-of-statement): Use `c-forward-comment-lc', to
work correctly in macros and other places where line
continuations should be treated as whitespace.
* cc-engine.el (c-guess-basic-syntax): Analyze a normal label
in a switch block as a case label, to get consistent lineup
with the case labels.
* cc-engine.el (c-backward-syntactic-ws): Fixed bug in
skipping over a macro that ends with an empty line.
* cc-styles.el: Require cc-align since styles added with
`c-add-style' often contains references to functions defined
there, and so the `c-valid-offset' check might otherwise
complain on them.
Sun Jan 20 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-mode.texi, cc-vars.el: Added two new lineup
functions:
(c-lineup-knr-region-comment): A new lineup function to get
(what most people think is) better indentation of comments in
the "K&R region" between the function header and its body.
(c-lineup-gcc-asm-reg): New lineup function for better
indentation inside gcc asm blocks. Contributed by Kevin Ryde.
(c-offsets-alist): Use `c-lineup-gcc-asm-reg' and
`c-lineup-knr-region-comment' in the default offset
configuration, since these two functions have little impact
outside their intended use, and they generally do the right
thing when they kick in.
* cc-engine.el (c-guess-continued-construct,
c-guess-basic-syntax): Handle nested functions in all
languages, not just Pike. In C and C++ there's a gcc
extension for this, and it also gives better treatment of
macros that are followed by blocks.
* cc-langs.el (c-symbol-key): Made this variable mode
specific, to handle Pike special symbols like `== better.
Sat Jan 19 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el, cc-vars.el
(c-report-syntactic-errors): A new variable to control the
syntactic error messages. It defaults to off; since CC Mode
ignores most syntactic errors it might as well ignore them all
for the sake of consistency.
Sat Jan 05 2002 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Updated the Limitations and Known Bugs
section. Various small fixes.
Thu Nov 29 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-inexpr-block): Optimization. Can
give a noticeable speedup if there's a large preceding
function or class body.
Sun Nov 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-cmds.el: Use more efficient and correct
insertion functions in many places. Always inherit text
properties correctly if the text is permanent. Also do it for
speed in temporary insertions, since I figure it's less work
to continue the surrounding text properties than to break
them.
* cc-styles.el (c-read-offset): Unbind SPC in the completion
to make it easier to enter lists.
Wed Nov 21 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-defun): Fixed bug where
c-state-cache was clobbered.
* cc-cmds.el, cc-engine.el (c-calculate-state): Moved from
cc-cmds.el to cc-engine.el due to dependency.
Mon Oct 22 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-parse-state): Ignore unbalanced open parens
in macros (if point isn't in the same one).
Sat Oct 13 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-context-open-line): New function that is the
`open-line' equivalent to `c-context-line-break'.
* cc-mode.el (c-mode-base-map): Compatibility fix for Emacs 21
since `indent-new-comment-line' has been changed to
`comment-indent-new-line' there.
Sun Oct 07 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el (c-stmt-delim-chars,
c-stmt-delim-chars-with-comma): New variables containing the
character sets used to recognize statement/declaration
boundaries. These variables might help to support languages
like javascript and awk, where newlines sometimes delimits
statements.
(c-crosses-statement-barrier-p): Use `c-stmt-delim-chars' as
the set of statement delimiting characters, to allow it to be
changed dynamically and per-mode.
Sat Oct 06 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-bos, c-looking-at-inexpr-block,
c-add-stmt-syntax, c-guess-basic-syntax): Treat blocks
directly inside function calls like "bare" statements inside
function calls, and not like in-expression statements. This
to make indentation of such blocks consistent with other
statements inside macro calls.
* cc-engine.el (c-guess-basic-syntax): Made arglist-cont
anchor correctly in arglists that contain statements.
* cc-engine.el (c-guess-basic-syntax): Fixed consistent
anchoring of defun-block-intro in defuns in code blocks (can
only occur in Pike).
* cc-engine.el (c-looking-at-inexpr-block,
c-looking-at-inexpr-block-backward): Changed the arguments to
require containing sexps and paren state, for better
efficiency.
Fri Oct 05 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el, cc-vars.el: Improved anchoring of
statement and handling of labels in front of substatements.
(c-guess-continued-construct, c-guess-basic-syntax): Improved
and unified anchoring at statements. Statements beginning
with comments or labels are now avoided, by going out of
blocks and containing statements if necessary. This nesting
handling also fixes the case when there's a statement after a
block open brace. Added the syntactic symbol
`substatement-label'.
(c-electric-colon): Map the new `substatement-label' to
`label' when consulting `c-hanging-colons-alist'.
(c-offsets-alist): Added substatement-label. Updated the
comments for the new anchoring positions at statements.
* cc-engine.el (c-guess-basic-syntax): Use more sane anchor
points for knr-argdecl-intro and access-label. They used to
refer to some point on the same line, a bug which was
neutralized by a kludge in `c-get-syntactic-indentation' which
ignored such anchor points.
(c-get-syntactic-indentation): Removed the kludge that was
necessary due to buggy anchor points.
* cc-engine.el (c-guess-basic-syntax): Do not check the
absence of a comma before arglist-close (case 7A) in any
language, since there's nothing better to do that case anyway.
Added special case to make in-expression statements be
recognized as normal arglist-cont if we're directly in a macro
arglist, for consistency with other "bare" statements.
* cc-engine.el (c-looking-at-bos): Added optional limit arg
for backward searches.
* cc-engine.el (c-looking-at-inexpr-block): Anchor gcc
in-expression statements at the surrounding open parenthesis.
Treat a class body as an in-expression class if it's used in
an object clone expression in Pike.
* cc-engine.el (c-get-offset, c-get-syntactic-indentation):
Allow several anchor positions in the list of syntactic
symbols. Only the first is used as the base for the offset
calculation.
Tue Oct 02 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-defun): Indent the current macro if
inside one at the top level. Do not throw an error if used at
the top level outside a macro.
* cc-cmds.el (c-backslash-region): Do tab width alignment only
if the backslashes can't be aligned with surrounding
backslashes.
* cc-engine.el (c-end-of-macro): New function.
* cc-engine.el (c-least-enclosing-brace): Rewritten to not be
destructive.
Sat Sep 29 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-context-line-break): Only do a macro line
break when point is inside the content of it; if it's in the
cpp keyword a normal line break is done.
* cc-engine.el (c-guess-basic-syntax): Do not add
cpp-macro-cont inside the argument list to a #define.
Thu Sep 27 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-forward-comment): Implemented a kludge to
avoid the problem most forward-comment incarnations have with
`\' together with comment parsing.
Wed Sep 26 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-check-state-cache): Fixed bug which could
cause the state returned by `c-parse-state' to lack a closed
paren element. That in turn could result in very long
searches, since it's common that they start from the last
preceding close brace.
Tue Sep 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Do not treat
else-if as a single continuation, since that'd make it hard to
get the right anchor point when there's a line break between
the two keywords. This change causes else-clause to be
anchored on the closest preceding else-if and not always on
the starting if, but that doesn't affect the indentation for
any reasonably sane style. Also introduced a noerror flag.
(c-beginning-of-closest-statement): Removed;
c-beginning-of-statement-1 now avoids the problem this one
solved.
* cc-engine.el (c-guess-continued-construct,
c-guess-basic-syntax): Better and more uniform anchor points
for 'statement-cont and 'substatement. The effect is
noticeable mostly when there's a label on the same line as the
beginning of the statement, or when there are more stuff
before the start of the statement.
* cc-engine.el (c-looking-at-inexpr-block): Added flag to
disable looking at the type of the surrounding paren since
that confuses c-beginning-of-statement-1 and a couple of other
places.
* cc-engine.el (c-guess-basic-syntax): Avoid stepping to the
previous statement in case 18. Improvements in recognition of
statement blocks on the top level.
Sun Sep 23 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1,
c-crosses-statement-barrier-p): Rewritten to get a well
defined and documented behavior. This fixes some tricky cases
in recognition of do-while constructs.
(c-backward-to-start-of-do, c-backward-to-start-of-if):
Removed; use c-beginning-of-statement-1 instead.
(c-guess-continued-construct, c-guess-basic-syntax): Various
fixes to not depend on the bugs previously in
c-beginning-of-statement-1. Cleanups in cases 18 and 17 to
use the new behavior of c-beginning-of-statement-1 better.
Fixed recognition of catch blocks inside macros.
* cc-engine.el (c-backward-syntactic-ws): Fixed bug in
skipping over a macro.
* cc-langs.el (c-label-kwds): New variable to contain the
appropriate c-*-label-kwds value.
* cc-vars.el (defcustom-c-stylevar): Fixed value evaluation
bug that caused the widget for c-block-comment-prefix to bug
out.
Fri Sep 21 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Improved recognition of
statements: They are now recognized in contexts where they
normally can't occur, e.g. on the top level or in function
call arguments. This is mainly useful to recognize statements
in macros at the top level, and in arguments to macros. The
cases has been moved around quite a bit, and case 10 has been
copied to case 18. (The cases has not been renumbered because
of this.)
(c-guess-continued-construct): New function which has the
rules which are common between cases 10 and 18.
* cc-engine.el (c-beginning-of-statement-1,
c-backward-to-start-of-do, c-backward-to-start-of-if): Fixes
so that they really obey the passed limits.
(c-safe-position): Return nil if the state doesn't contain a
suitable position.
(c-guess-basic-syntax): Fixes some too short limits in calls
to c-beginning-of-statement-1. Some fixes for top level
analysis in ObjC mode.
* cc-engine.el (c-beginning-of-statement-1): Fixed bug in
do-while statements where the body is not a block.
* cc-styles.el (c-set-style): Reset c-special-indent-hook to
its global value if in override mode. Fixes problem where
functions on that hook remained after style switch.
* cc-engine.el (c-evaluate-offset, c-get-offset): Use
c-benign-error to report the c-strict-syntax-p error.
Thu Sep 20 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el, cc-defs.el, cc-cmds.el, cc-engine.el,
cc-vars.el: Several fixes to treat macros as code and not
literals and to handle line continuations transparently.
(c-skip-ws-forward, c-skip-ws-backward): New macros to skip
through whitespace and line continuations, but not comments
and macros.
(c-in-literal): No longer recognizes macros as literals by
default. An extra flag argument is required to do that.
(c-macro-start, c-query-macro-start,
c-query-and-set-macro-start): Added a cache for the macro
start position.
(c-forward-syntactic-ws, c-backward-syntactic-ws): Fixes for
more speed when limits are given. Workaround for bad behavior
in forward-comment in some emacsen when it hits a buffer limit
with a large repeat count.
(c-lineup-macro-cont): Improved behavior when
c-syntactic-indentation-in-macros is nil.
(c-syntactic-indentation-in-macros, c-backslash-max-column,
c-auto-align-backslashes): New customization variables to
control macro handling.
* cc-menus.el (cc-imenu-c++-generic-expression): Fixes to
handle line continuations.
* cc-defs.el, cc-styles.el (c-get-style-variables,
c-set-offset): Report style errors with message and ding
instead of error signal. This to avoid interrupted mode init
if there's some style problem.
(c-benign-error): New macro to report errors that doesn't need
to interrupt the operation.
* cc-defs.el (c-point): Added eonl and eopl positions.
Tue Sep 18 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace, c-indent-region): Removed most
of the c-state-cache fiddling, since the global state cache
now handles this.
* cc-engine.el (c-guess-basic-syntax): Fixed bug when there's
an open paren at the very first char of the visible buffer
region.
* cc-engine.el (c-parse-state, c-check-state-cache): Cache the
state globally and invalidate it below every buffer change
with the new after change function `c-check-state-cache'.
This gives a considerable performance boost when editing large
functions or classes.
* cc-engine.el (c-whack-state-after): Slight optimization.
Sun Sep 16 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el, cc-langs.el, cc-align.el: Improvements to
syntactic analysis inside macros:
(c-block-stmt-1-kwds, c-block-stmt-2-kwds): New variables used
by `c-guess-basic-syntax'.
(c-parse-state): Fixed bug with braces inside macros when
using cached state info.
(c-forward-to-cpp-expression): New function to aid in
syntactic analysis inside macros.
(c-beginning-of-statement-1, c-backward-syntactic-ws): Fixes
to work better inside macros.
(c-forward-syntactic-ws): Whitespace between the # and the
command should be allowed in preprocessor directives.
(c-lineup-macro-cont): New lineup function to get context
sensitive indentation inside macros.
(c-offsets-alist): Made `c-lineup-macro-cont' the default for
cpp-macro-cont.
Sat Sep 15 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1,
c-forward-syntactic-ws): Fixes to handle continued lines.
(c-backward-to-start-of-if, c-guess-basic-syntax): Do
syntactic analysis inside macros.
Sat Sep 08 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-region): Did a speedup made possible by
the more flexible state cache.
* cc-engine.el (c-parse-state, c-whack-state-before,
c-whack-state-after, c-hack-state,
c-narrow-out-enclosing-class, c-guess-basic-syntax): Improved
the state cache system. It now can use partial info from an
old cached state to calculate a new one at a different
position. Removed some kludges to avoid the state cache. The
new functions `c-whack-state-before' and `c-whack-state-after'
replace the now obsolete `c-whack-state'.
* cc-engine.el (c-beginning-of-statement-1): Optimized backing
through a macro. This can speed things up quite a bit when
there are long macros before point.
(c-beginning-of-macro): Do not ignore the limit.
Sun Sep 02 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-continued-statement): Fixed a bug
where the keyword wasn't reindented correctly if followed by
another keyword or identifier.
* cc-engine.el (c-parse-state): Ignore closed brace pairs that
are in macros. Fixes some cases where e.g. the second of two
"do { } while (0)" macros after each other indented
differently.
Fri Aug 31 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-macro, c-forward-syntactic-ws):
Recognize "#!" as a preprocessor directive when it begins a
line, to allow for script interpreter lines like
"#!/usr/bin/pike" at the beginning of the file.
Thu Aug 30 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-inexpr-block): Recognize brace
blocks inside a parenthesis expression as inexpr-statement.
Useful when writing statements as macro arguments.
Sat Aug 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fill-paragraph, c-do-auto-fill,
c-mask-comment): Broke out the comment masking code from
`c-fill-paragraph' to a new function `c-mask-comment', to be
able to do the same thing in `c-do-auto-fill'. This should
make auto-fill-mode behave better.
Mon Aug 20 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace, c-electric-paren): Check
`executing-macro' to avoid blinking parens when macros are
executed.
* cc-mode.el, cc-styles.el (c-setup-filladapt): Moved from
cc-mode.el to cc-styles.el for consistency with
`c-setup-paragraph-variables' (which was placed there due to
the dependency from `c-set-style').
* cc-styles.el, cc-vars.el: Fixed bug with incomplete
initialization from the style variable fallbacks if there
already is a style called "user" defined when CC Mode starts
up for the first time.
Fri Aug 17 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-vars.el (c-comment-indent,
c-indent-comment-alist): Added new variable
`c-indent-comment-alist' to allow better control over
`c-comment-indent'.
Tue Aug 14 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-C-comments): Try to match both
`comment-start-skip' and the comment prefix on the current
line with the comment starter, so that we line up comments
which matches `c-comment-prefix-regexp' on the first line
(after the `/') without the need to make `comment-start-skip'
match whatever `c-comment-prefix-regexp' matches.
* cc-mode.el, cc-styles.el (c-common-init, c-set-style-1,
c-setup-paragraph-variables): Moved the variable
initialization based on `c-comment-prefix-regexp' to a new
function `c-setup-paragraph-variables', which is now used both
at mode init and when a style that sets
`c-comment-prefix-regexp' is activated.
Sat Aug 11 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-member-init-list): Better
handling of C++ template args to avoid confusion with `<' and
`>' used as operators in member init expressions.
Wed Jul 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-most-enclosing-brace,
c-least-enclosing-brace): Added optional second arg to limit
the search to before a certain point.
* cc-engine.el (c-guess-basic-syntax): Fixed bug which could
cause incorrect analysis if a cached state is used (usually
only happens when an electric key reindents a line).
Tue Jul 24 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-forward-comment): More idiosyncrasy
insulation. This time for XEmacs 21.
* cc-engine.el, cc-langs.el: Improved handling of inheritance
lists:
(c-beginning-of-inheritance-list): Rewritten to use a more
syntactically correct method that doesn't get confused by
badly placed linebreaks and comments.
(c-guess-basic-syntax): Several fixes to the handling of
inheritance lists in combination with templates. 'inher-intro
is now anchored on the start of the class declaration and not
the indentation of the current line. Switched places on cases
5D.3 and 5D.4 and made them use more syntactically correct
methods.
(c-inher-key): Removed since the code in
`c-guess-basic-syntax' now uses token-based search.
* cc-cmds.el, cc-mode.el (c-mode-menu): Added a submenu to
access some toggles.
(c-toggle-syntactic-indentation): New function to toggle the
variable `c-syntactic-indentation'.
* cc-styles.el (c-set-style): Improved the error message for
incorrect offsets a bit.
Mon Jul 23 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-exp): Don't require that the sexp
follows point immediately, instead find the closest following
open paren that ends on another line.
Sat Jul 21 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-cascaded-calls): New indentation function.
* cc-engine.el (c-beginning-of-macro): Bugfix for directives
with whitespace between the '#' and the name.
* cc-mode.texi: Rearranged the indentation functions in
alphabetic order. Documented c-lineup-cascaded-calls.
Fri Jul 20 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-forward-syntactic-ws,
c-backward-syntactic-ws): Handle line continuations as
whitespace. Don't move past a macro if that'd take us past
the limit.
Wed Jul 11 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-macro, c-forward-syntactic-ws):
Multiline strings begin with `#"' in Pike, and that shouldn't
be confused with a preprocessor directive.
Mon Jul 09 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el: Extended the kludge to interoperate with the
delsel and pending-del packages wrt to the new function
`c-electric-delete-forward'.
Fri Jul 06 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-exp): Keep the indentation of the block
itself, i.e. only indent the contents in it.
* cc-styles.el (c-set-style): Use the default argument to
completing-read instead of initial-contents, if the function
is recent enough to support it.
Mon Jun 11 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el (c-mode-help-address): Removed
bug-gnu-emacs@gnu.org from the receiver list for bug reports.
I've almost never seen a bug reported this way that should go
to that list, but it's rather common that the reports concern
the combination CC Mode and XEmacs instead.
Sun Jun 10 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-paren): Fixed bug when both
brace-elseif-brace and brace-catch-brace are active and
there's a "else if"-block before the catch block.
* cc-menus.el (cc-imenu-c++-generic-expression): Detect
function headers that span lines.
Sat May 12 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace, c-electric-semi&comma,
c-electric-colon, c-electric-paren): Check for last on line
only for doing the auto-newline-mode stuff, not for the
reindentation.
* cc-cmds.el (c-electric-brace): Fixed bugs in the handling of
c-syntactic-indentation: When it's nil, indent the new lines
but don't reindent the current one. Reindent the line only
when the inserted brace comes first on it, instead of last.
* cc-cmds.el (c-electric-brace, c-electric-semi&comma): Fixed
two places where c-syntactic-indentation wasn't heeded.
* cc-cmds.el (c-electric-pound): Don't be electric inside a
macro.
* cc-engine.el (c-backward-to-start-of-if): Try a little
harder to find a fallback position when an orphan else is
found. Fixed case where an else following a do-while
statement could be associated with an if inside the do-while.
Fri May 11 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-guess-fill-prefix): Tuned the dwim for the
fallback to add a single space after the comment prefix.
* cc-cmds.el (c-indent-new-comment-line): Somewhat better
behavior in some special cases, especially for single-line
comments. Avoid breaking up a comment starter or ender.
Sat May 05 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-outline-level): Applied patch from the Emacs
sources to make this work in invisible text.
* cc-langs.el (c-switch-label-key): Fixed regexp to not be
confused by a later ':' on the same line as the label.
Wed May 02 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-mode.el (c-electric-delete,
c-electric-delete-forward): Split `c-electric-delete' into two
functions where `c-electric-delete-forward' always deletes
forward and `c-electric-delete' only contains the code
necessary for XEmacs to choose between backward and forward
deletion. `c-electric-delete-forward' is now bound to C-d to
get the electric behavior on that key too.
* cc-mode.texi: Updated the doc for hungry-delete mode wrt the
Backspace/Delete key handling. Also incorporated a small
clarification from the Emacs people.
Wed Mar 14 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fill-paragraph): Fixed bogus direct use of
c-comment-prefix-regexp, which caused an error when it's a
list.
Sun Feb 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* Release 5.28
Sun Feb 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el, cc-vars.el (c-common-init, c-default-style):
Removed the hardcoded switch to "java" style in Java mode.
It's instead taken care of by the default value for
c-default-style.
* cc-mode.texi: Documented the electric keyword feature.
Updated the mentions of the "java" style special case for Java
mode.
Sat Feb 24 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-math): Fix bug where lineup was
triggered by equal signs in string literals.
Sun Feb 25 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.el, cc-vars.el (c-common-init, c-default-style):
Removed the hardcoded switch to "java" style in Java mode.
It's instead taken care of by the default value for
c-default-style.
* cc-mode.texi: Updated the mentions of the "java" style
special case for Java mode.
Sat Feb 24 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-math): Fix bug where lineup was
triggered by equal signs in string literals.
Wed Feb 21 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fill-paragraph): Fixed bug in the paragraph
limit detection when at the ends of the buffer.
* cc-engine.el (c-guess-basic-syntax): Removed bogus check for
"for" statement clause in case 7F; a better one is done
earlier in case 7D anyway.
Tue Feb 20 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-guess-fill-prefix): Improved the heuristics
somewhat more and did a small optimization.
Mon Feb 19 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-statement, c-end-of-statement):
Use the limit argument only to limit the syntactic context
search, not to limit the actual movement.
* cc-cmds.el (c-beginning-of-statement): Move by sentence
inside multiline strings, just like in comments. Also various
fixes to the paragraph and comment prefix recognition, block
comment ender handling etc.
Sun Feb 18 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fill-paragraph): Take more care to preserve
the relative position of the point.
* cc-cmds.el (c-electric-continued-statement): New function to
use as abbrev hook to reindent for keywords such as "else"
that continues an earlier statement.
* cc-menus.el (cc-imenu-c++-generic-expression): Treat structs
like classes.
* cc-mode.el (c-mode, c++-mode, java-mode, objc-mode,
pike-mode): Populate the default abbrev tables to reindent for
keywords such as "else" that can continue earlier statements.
Abbrev mode is therefore turned on by default now. (Note that
this doesn't apply to idl-mode, since IDL afaik doesn't have
statements at all.)
Wed Feb 14 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p): Fix for handling
bracelists where the declaration contains template arguments.
Fri Feb 09 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-comment-indent): Use
`c-get-syntactic-indentation' to correctly calculate the
syntactic indentation. Fixes bug with lineup functions that
return vectors.
* cc-engine.el (c-get-syntactic-indentation): Split the
indentation sum calculation from `c-indent-line' to a separate
function.
Mon Feb 05 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-statement, c-comment-indent):
Fixed places where it was assumed that preprocessor directives
have to start in column zero.
* cc-engine.el (c-beginning-of-member-init-list): Handle C++
template arguments after a class identifier properly.
* cc-engine.el (c-guess-basic-syntax): Treat initializer brace
lists for `new Foo[]' constructs in Java as expressions and
not top level definition brace lists on the top level, so that
they'll get indented consistently with the same type of
expression in a normal block.
Sat Feb 03 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fill-paragraph): The kludge that checks
whether the adaptive filling package fails to keep the comment
prefix is now kludged further to check for filladapt-mode
which doesn't have that problem. This is really icky, but it's
the only way that works with the current misfeatures/bugs in
both adaptive-fill-mode and filladapt-mode.
* cc-cmds.el (c-fill-paragraph): Made the way the paragraph
around point is recognized more robust.
Sun Jan 21 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-engine.el, cc-lobotomy.el (c-state-cache,
c-in-literal-cache, c-auto-fill-prefix, c-lit-limits,
c-lit-type): Fixed all internal variables used dynamically so
that they are always bound.
* cc-cmds.el, cc-engine.el: Improved recovery of syntactic
errors:
(c-indent-region): Fixed reporting of syntactic errors so that
the region is fully reindented even when an error occurs. The
last syntactic error is printed afterwards. Also cleanup up a
whole lot of code that tried to optimize indentation of whole
sexps but in reality accomplishes nothing.
(c-indent-sexp): Use c-indent-region.
(c-parsing-error): Changed this variable to hold the message
for any syntactic error that is discovered.
(c-parse-state): Search backward from point instead of the bod
position when the latter is invalid. This makes CC Mode
recover faster when there are unbalanced close braces.
(c-backward-to-start-of-if): Use c-parsing-error to report
dangling "else" clauses instead of throwing an error, and fall
back to a reasonable position.
(c-indent-line): Added argument to avoid reporting syntactic
errors.
(c-show-syntactic-information): Don't report any syntactic
errors.
Wed Jan 17 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-statement): Fixed bugs with
paragraph recognition when moving by sentence in literals.
* cc-langs.el (c-Java-javadoc-paragraph-start): Modified
paragraph start regexp for javadoc to recognize javadoc markup
in general instead of a specific set of keywords, to be more
future-safe.
(c-Pike-pikedoc-paragraph-start,
c-Pike-pikedoc-paragraph-separate): New regexps to recognize
pikedoc markup.
* cc-mode.el: Fixed initialization and use of
c-current-comment-prefix.
(pike-mode): Initialize paragraph settings pikedoc
recognition.
* cc-vars.el (c-default-style): Made a nicer Customize widget.
(c-comment-prefix-regexp): Made it possible to use an
association list on this to specify mode specific regexps.
The default value now use a special regexp in Pike mode to
recognize pikedoc markup.
(c-current-comment-prefix): New variable containing the actual
regexp from c-comment-prefix-regexp for the current buffer.
Sun Jan 14 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Fixed check for special brace
lists: We can't look at the syntax, since a brace list can get
recognized as a plain statement-cont.
* cc-engine.el (c-guess-basic-syntax): Fixed bug where a
special brace list opener broken over two lines got recognized
as a statement on the second line. Case 9A changed.
Mon Jan 08 2001 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Fixed bug in c-state-cache
adjustment after line is reindented.
Wed Dec 27 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-point): Added optional argument for position
to use instead of the current point.
* cc-defs.el, cc-engine.el (c-add-class-syntax): Do not add
the in-expression block symbols when the construct starts at
boi, to avoid the extra level of indentation in that case.
Cases 4, 16A and 17E affected.
Sun Nov 26 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el: Use `indent-according-to-mode' instead of direct
calls to `c-indent-line', to adhere better to Emacs
conventions.
* cc-engine.el (c-indent-line): Use the syntax already bound
to `c-syntactic-context', if there is any.
Sun Nov 19 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-get-offset): Fixed bug where the indentation
wasn't added up correctly when a lineup function returned nil.
Fri Nov 17 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-collect-line-comments): Fixed bug where
empty lines were ignored when collecting line comments
backwards.
Sun Oct 08 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-dont-change): Return an absolute
indentation column to work correctly in the case when several
syntactic elements are processed for the same line.
* cc-engine.el, cc-styles.el, cc-vars.el (c-evaluate-offset,
c-get-offset, c-indent-line, c-valid-offset, c-read-offset,
c-set-offset): Added absolute indentation column settings by
using the vector type.
* cc-mode.texi: Documented the new vector setting for offsets.
Mon Oct 02 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-vars.el (c-electric-paren, c-cleanup-list):
Implemented two new cleanups `space-before-funcall' and
`compact-empty-funcall'.
* cc-mode.texi: Documented the two new cleanups
space-before-funcall and compact-empty-funcall on
c-cleanup-list.
Sun Oct 01 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-paren-re, c-identifier-re): Two new macros for
helping building regexps.
* cc-engine.el (c-on-identifier): New function for detecting
identifiers. It takes keywords into account.
* cc-langs.el, cc-mode.el: Added regexps for complete keyword
lists. `c-keywords' is set to a regexp matching all keywords
in the current language.
Tue Sep 26 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Added '#' to the
list of characters to skip backwards over at the beginning of
a statement, since it can precede string literals in Pike.
Thu Aug 31 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-guess-fill-prefix): Fixed bug with prefix
recognition when standing on the last line in a C++ comment
with nothing but whitespace after the prefix.
* cc-engine.el (c-backward-to-start-of-if): Fixed bug when
given no limit argument.
Wed Aug 30 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p): Fixed brace list
recognition for the `[]= operator symbol in Pike.
Sat Aug 26 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-bytecomp.el (cc-eval-when-compile): New macro that works
around a bug in `eval-when-compile' in the byte compiler.
* cc-engine.el (c-forward-token-1): Fixed bug with return
value when count is zero and there's no token start within the
limit.
(c-guess-basic-syntax): Don't add 'comment-intro to lines with
"prefix comments", i.e. comments which are followed by code on
the same line.
* cc-mode-19.el: Fixes so that checks that must be done at
compile time also are done then.
Fri Aug 25 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el: Make sure cc-mode-19 is loaded both at compile
time and at runtime, and only when it's needed.
Sun Aug 20 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* Major cleanup for less error prone and more warning free
compilation, including some fixes for bugs due to different
compilation orders. Thanks to Martin Buchholz for providing
the basis for all this.
cc-bytecomp.el: New file that provides some byte compilation
features: It ensures that files always are loaded from the
current source directory during compilation, and it provides a
set of macros to turn off specific compiler warnings for
specific symbols. (It's not CC Mode specific in any way.)
Fixed a nearly acyclic dependency tree (both runtime and
compile-time) between all files.
cc-defs.el: Separated all macros before the inline functions,
to ensure correct compilation.
cc-defs.el, cc-engine.el: Moved c-beginning-of-macro to from
cc-defs.el to cc-engine.el and made it a function instead.
cc-mode-19.el: Patch the byte compiler in Emacs 19 not to warn
about char-after.
cc-vars.el: Cope even when there isn't a custom package
containing defcustom available.
cc-make.el: Removed since it's no longer necessary.
README: Updated installation instructions.
Mon Aug 14 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el, cc-langs.el, cc-mode.el: Moved around things to
improve the modularity: Moved all mode init stuff from
cc-langs.el to cc-mode.el, including the keymap
initialization; cc-langs now only contains the various
variables for configuring the language syntax.
* cc-engine.el, cc-styles.el (c-evaluate-offset,
c-get-offset): Moved from cc-styles to cc-engine since file
dependency analysis suggests they belong there (which also
makes more sense). Thanks to Martin Buchholz for doing the
analysis.
Sat Aug 12 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fn-region-is-active-p): New function that
wraps the corresponding macro, for use in places that aren't
compiled. Thanks to Martin Buchholz for pointing out this.
* cc-langs.el (c-mode-menu): Use c-fn-region-is-active-p.
* cc-mode.el (c-prepare-bug-report-hooks): Hook variable to
add things to the bug report.
Mon Aug 07 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-guess-fill-prefix): Fixed bug where the
returned prefix could contain a newline when the search for a
good prefix line failed.
Sun Aug 06 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-toggle-auto-state, c-toggle-hungry-state,
c-toggle-auto-hungry-state): Made the argument optional, as
the documentation says it is.
Sat Aug 05 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Don't treat the Pike
multiline string syntax, #"...", as a cpp macro.
Mon Jul 10 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* Release 5.27
Sun Jul 09 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-looking-at-inexpr-block): Replaced a call to
c-beginning-of-statement-1 that caused a bad case of recursion
which could consume a lot of CPU in large classes in languages
that have in-expression classes (i.e. Java and Pike).
* cc-engine.el (c-guess-basic-syntax): Check for in-expression
statements before top level constructs (i.e. case 6 is moved
before case 5 and is now case 4) to catch in-expression
classes in top level expressions correctly.
Sun Jul 02 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Less naive handling of
objc-method-intro. Case 4 removed and case 5I added.
* cc-langs.el (c-append-paragraph-start): New variable used by
c-common-init to get paragraph-start correct.
* cc-langs.el (c-common-init): Use c-append-paragraph-start to
initialize paragraph-start to make it correct both with and
without the javadoc special case.
* cc-mode.el (java-mode): Use c-append-paragraph-start to
initialize paragraph-start for javadoc markup.
* cc-vars.el (c-style-variables-are-local-p): Incompatible
change by defaulting this to t. It's motivated by the
confusing behavior that otherwise arise from the style system
when editing both java and non-java files at the same time
(see the comments about style setting in c-common-init).
Tue Jun 20 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-new-comment-line): Added a kludge
similar to the one in c-fill-paragraph to check the fill
prefix from the adaptive fill function for sanity.
Mon May 01 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-end-of-defun-1): Fixed forward scanning into
defun block.
Sun Mar 19 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi Documented the change of cpp-macro.
Tue Mar 14 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-multi-inher): Handle lines with
leading comma nicely. Extended to handle member initializers
too.
* cc-engine.el (c-beginning-of-inheritance-list,
c-guess-basic-syntax): Fixed recognition of inheritance lists
when the lines begins with a comma.
* cc-mode.texi Updated doc for c-lineup-multi-inher.
* cc-vars.el (c-offsets-alist): Changed default for
member-init-cont to c-lineup-multi-inher since it now handles
member initializers and indents better for leading commas.
Sun Mar 12 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Fixed some bugs in the state
handling that caused class open lines to be recognized as
statement-conts in some cases.
* cc-cmds.el (c-indent-new-comment-line): Keep the fill prefix
guessed by the adaptive fill function unless point is on the
first line of a block comment.
* cc-engine.el (c-forward-syntactic-ws): Fixed an infloop bug
when the buffer ends with a macro continuation char.
* cc-engine.el (c-guess-basic-syntax): Added support for
function definitions as statements in Pike. The first
statement in a lambda block is now labeled defun-block-intro
instead of statement-block-intro.
* cc-engine.el (c-narrow-out-enclosing-class): Whack the state
so that the class surrounding point is selected, not the one
innermost in the state.
* cc-engine.el (c-guess-basic-syntax): Fixed bug in
recognition of switch labels having hanging multiline
statements.
* cc-engine.el (c-beginning-of-member-init-list): Broke out
some code in c-guess-basic-syntax to a separate function.
* cc-engine.el (c-just-after-func-arglist-p): Fixed
recognition of member inits with multiple line arglists.
* cc-engine.el (c-guess-basic-syntax): New case 5B.3 to detect
member-init-cont when the commas are in funny places.
Thu Mar 09 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-auto-newline): Removed this macro since it's
not used anymore.
* cc-engine.el (c-looking-at-bos): New helper function.
* cc-engine.el (c-looking-at-inexpr-block): More tests to tell
inexpr and toplevel classes apart in Pike.
* cc-engine.el (c-guess-basic-syntax): Fixed bogus recognition
of case 9A.
* cc-langs.el, cc-mode.el (c-Pike-inexpr-class-key): New
constant, since "class" can introduce an in-expression class
in Pike nowadays.
Sun Feb 06 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-gnu-impose-minimum): Don't impose minimum
indentation on cpp-macro lines.
* cc-engine.el (c-guess-basic-syntax): Made the cpp-macro
a syntax modifier like comment-intro, to make it possible to
get syntactic indentation for preprocessor directives. It's
incompatible wrt to lineup functions on cpp-macro, but it has
no observable effect in the 99.9% common case where cpp-macro
is set to -1000.
Sat Feb 05 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Fixed bug with missed
member-init-cont when the preceding arglist is several lines.
Sat Jan 29 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el (c-style-alist): The basic offset for the BSD
style corrected to 8.
Sun Jan 16 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-styles.el (c-style-alist): Adjusted the indentation of
brace list openers in the gnu style.
Sun Jan 09 2000 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-command): Obey c-syntactic-indentation.
* cc-cmds.el (c-electric-brace, c-electric-slash,
c-electric-star, c-electric-semi&comma, c-electric-colon,
c-electric-lt-gt, c-electric-paren): Don't reindent old lines
when c-syntactic-indentation is nil.
* cc-engine.el (c-beginning-of-statement-1): Fixed bug where
we were left at comments preceding the first statement when
reaching the beginning of the buffer.
* cc-vars.el (c-syntactic-indentation): New variable to turn
off all syntactic indentation.
Tue Dec 28 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-fill-paragraph): Keep one or two spaces
between the text and the block comment ender when it hangs,
depending on how many there are before the fill.
Sun Dec 19 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-closest-statement): New helper
function to go back to the closest preceding statement start,
which could be inside a conditional statement.
* cc-engine.el (c-guess-basic-syntax): Use
c-beginning-of-closest-statement in cases 10B.2, 17B and 17C.
* cc-engine.el (c-guess-basic-syntax): Better handling of
arglist-intro, arglist-cont-nonempty and arglist-close when
the arglist is nested inside parens. Cases 7A, 7C and 7F
changed.
* cc-langs.el (c-Java-javadoc-paragraph-start): Brought
up-to-date with javadoc 1.2.
Fri Dec 17 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Fixed handling of
multiline Pike type decls.
Tue Dec 14 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-new-comment-line): Always break
multiline comments in multiline mode, regardless of
comment-multi-line.
Mon Dec 13 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Fixed bug with
fully::qualified::names in C++ member init lists. Preamble in
case 5D changed.
Sat Dec 04 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el (c-common-init): Handling of obsolete variables
moved to c-initialize-cc-mode. More compatible style override
when using global style variables.
* cc-mode.el (c-initialize-cc-mode): Handling of obsolete
variables moved here.
* cc-mode.texi Documented the special behavior of
c-special-indent-hook as a style variable. Don't talk about
doing (c-make-styles-buffer-local t) in a mode hook, since
that's already too late to work right.
* cc-styles.el (c-make-styles-buffer-local): Flag style
variable localness in c-style-variables-are-local-p to make
the compatibility measure in c-common-init work well.
* cc-styles.el (c-set-style-1): c-special-indent-hook can no
longer contain set-from-style.
* cc-styles.el (c-initialize-builtin-style): Don't check for
set-from-style on c-special-indent-hook.
* cc-styles.el (c-copy-tree): Obsolete. The standard function
copy-alist is sufficient now.
* cc-styles.el (c-set-style, c-set-style-1,
c-get-style-variables): Fixes to variable initialization so
that duplicate entries in styles have the same effect
regardless of DONT-OVERRIDE.
* cc-styles.el (c-set-style-2): Fixed bug where the
initialization of inheriting styles failed when the
dont-override flag is set.
* cc-vars.el (c-special-indent-hook): Don't use set-from-style
on this.
Mon Nov 22 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-forward-comment): Removed the workaround
introduced in 5.38 since it had worse side-effects. If a line
contains the string "//\"", it regarded the // as a comment
start since the \ temporarily doesn't have escape syntax.
Sun Nov 21 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* Release 5.26
Sun Nov 21 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-forward-conditional): Handle an arbitrary
target depth. Optionally count #else lines as clause limits,
as suggested by don provan <provan@lucent.com>. #elif
handling fixed.
* (c-up-conditional-with-else, c-down-conditional,
c-down-conditional-with-else): New commands that uses the
added functionality in `c-forward-conditional'.
* cc-mode.texi: Documented the new up/down preprocessor
conditional function varieties.
Tue Nov 09 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Updated for all the new features and
proofread. Major changes:
o All text filling and line breaking issues is collected in a
new top-level chapter. The section on auto-fill mode
interaction have been incorporated into this.
o The list of the standard lineup functions is expanded with
better explanations and examples. It's moved to a
top-level chapter since it's hard to find under Customizing
Indentation / Advanced Customizations / Custom Indentation
Functions.
o The sections on Permanent Customization and Styles are
mostly rewritten due to the changes in the style system.
The part about the mode hooks has gotten an own section.
Tue Oct 26 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-comment): Preserve the alignment with
a comment on the previous line instead of preserving the
comment-column.
Sun Sep 26 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* Fixes to IDL mode after input from Eric Eide
<eeide@cs.utah.edu>:
* cc-engine.el (c-beginning-of-statement-1): Allow
`c-conditional-key' to be nil, for the benefit of IDL mode.
* cc-engine.el (c-guess-basic-syntax): Ditto.
cc-langs.el (C-IDL-class-key): Fixed. Don't match `class'
but do match CORBA 2.3 `valuetype'.
* cc-langs.el (c-IDL-access-key): New defconst. Should be nil
for IDL.
* cc-langs.el (c-IDL-conditional-key): New defconst. Should
be nil for IDL.
* cc-langs.el (c-IDL-comment-start-regexp): New defconst.
Like C++.
* cc-mode.el (idl-mode): Use new `c-IDL-*' defconsts. Also,
set `c-method-key' and `c-baseclass-key' to nil.
Wed Aug 25 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-menus.el (cc-imenu-c++-generic-expression): Match classes
with nonhanging open braces.
Sun Aug 15 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el: Added docstrings to all lineup functions.
* cc-align.el (c-lineup-java-throws): Handle a hanging throws
keyword.
* cc-align.el (c-lineup-C-comments): Handle free form text
comments. Use c-comment-prefix-regexp and comment-start-skip
instead of hardcoded regexps.
Sat Aug 14 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Fixed eob
behavior and return value as documented.
Sat Jul 31 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* Changes for new style variable init system:
* cc-langs.el (c-common-init): Dito.
* cc-styles.el: c-offsets-alist moved to cc-vars.el since it's
now customizable.
* cc-vars.el: Style variables may now take a value
'set-from-style to make them take their value from the style
system. This value is now the default on all these variables.
* cc-vars.el (c-valid-offset): New function to verify a
syntactic symbol offset setting.
* cc-vars.el (c-offsets-alist): Variable moved from
cc-styles.el since it's now customizable in a similar way to
the other style variables.
* cc-vars.el (c-old-style-variable-behavior): New variable to
revert to the old style init behavior.
* cc-vars.el (c-hanging-comment-starter-p,
c-hanging-comment-ender-p): These variables are now obsolete and
therefore removed.
* cc-vars.el (c-file-style, c-file-offsets): Made always
buffer local.
* cc-menus.el (cc-imenu-c++-generic-expression): Don't match
the throws clause that might follow the function prototype in
C++.
Sat Jul 24 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-beginning-of-macro): Fixed bug where point
could move forward for macros that doesn't start in column 0.
Thu Jul 08 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-indent-multi-line-block,
c-lineup-whitesmith-in-block): Two new lineup functions for
use in whitesmith style.
* cc-styles.el (c-style-alist): More fixes to whitesmith
style. It should now handle all different braces uniformly in
both hanging and non-hanging cases.
Wed Jul 07 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-mode.texi: Documented the default behavior when a symbol
doesn't exist on c-hanging-braces-alist.
Mon Jul 05 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-exp): Use a marker to save point to
make it stay in the same position relative to the surrounding
text.
* cc-cmds.el (c-fill-paragraph): Force the line comment prefix
when adaptive-fill-mode doesn't manage to get it correct.
* cc-menus.el (cc-imenu-java-generic-expression): Handle types
with dotted notation, e.g. foo.bar.Gnu.
* cc-mode.el (c-initialize-cc-mode): Wrap all function calls
within unwind-protect (previously only some were wrapped so it
would be possible to register mode initialization when full
initialization did not finish).
* cc-styles.el (c-style-alist): Corrected the brace placement
in the whitesmith style. Thanks to Sean Luke
<seanl@cs.umd.edu>. Also extended the bsd and whitesmith
styles with consistent brace placement for all constructs.
Sun Jul 04 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-context-line-break): Continue C++ comments too
when point is in the middle of them.
* cc-cmds.el: Line breaking and paragraph filling code
rewritten:
(c-guess-fill-prefix): New function that uses various
heuristics to guess the comment prefix.
(c-fill-paragraph): Rewritten to use `c-guess-fill-prefix'.
It now assumes adaptive filling is active to preserve the line
prefix inside comments.
(c-indent-new-comment-line): Replacement for the now
obsolete `c-comment-line-break-function' that uses
`c-guess-fill-prefix' when appropriate. It now observes the
setting of `comment-multi-line', which has effect in C-style
block comments.
* cc-cmds.el (c-context-line-break): New function intended to
be put on RET. It's essentially `newline-and-indent', but
continues C block comments with the appropriate line prefix.
* cc-cmds.el (c-do-auto-fill): New function put on
`normal-auto-fill-function' to implement the
`c-ignore-auto-fill' variable.
* cc-cmds.el (c-beginning-of-statement): Use
`c-comment-prefix-regexp' to avoid ending up inside the
comment prefix. Better handling of comment starters and
enders. Catch comments better when traversing code. Stop at
preprocessor directives.
* cc-defs.el (c-forward-comment): New subst to hide platform
dependent quirks in `forward-comment'.
* cc-engine.el (c-literal-limits): Added NOT-IN-DELIMITER
argument.
(c-literal-limits-fast): Implemented NEAR and NOT-IN-DELIMITER
arguments. Activate this function by default when
`parse-partial-sexp' supports it (currently Emacs 20.x).
* cc-engine.el (c-guess-basic-syntax): Anchor the `c' syntax
on the comment opener to make constants usable as lineup
arguments.
* cc-align.el (c-lineup-C-comments): Fixes to handle the
changed anchor position in the `c' syntactic symbol. Handle
more than stars in the comment prefix; use the new variable
`c-comment-prefix-regexp'. Don't indent text not preceded by
a comment prefix to the right of the comment opener if it's
long.
* cc-langs.el: Fixes to mode initialization for new line
breaking and paragraph filling method. Adaptive fill mode is
now activated at startup instead of deactivated. The
variables used for adaptive filling and paragraph movement are
also changed to incorporate the value of
`c-comment-prefix-regexp'. `substitute-key-definition' is
used to override some functions in the global map instead of
overriding their default bindings.
* cc-mode.el (java-mode): Modify `paragraph-start' for the
javadoc markup at mode init.
* cc-mode.el (c-setup-filladapt): A new convenience function
to configure Kyle E. Jones' Filladapt mode for CC Mode. This
function is intended to be used explicitly by the end user
only.
* cc-vars.el (c-comment-prefix-regexp): New variable used to
recognize the comment fill prefix inside comments.
(c-block-comment-prefix): New name for
`c-comment-contiuation-stars', which is now obsolete. It's
generalized to handle any character sequence.
(c-ignore-auto-fill): New variable used to selectively disable
Auto Fill mode in specific contexts.
Tue Jun 29 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-comment-indent): Leave at least one space
between the comment and the last nonblank character in the
case where we look at the indentation of the comment on the
previous line (case 4).
* cc-engine.el (c-beginning-of-statement-1): Added ``' to the
list of characters that may start a statement (it's a sort of
prefix operator in Pike, and isn't used at all in any of the
other languages).
Tue Jun 15 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Report brace list opens
inside continued statements as statement-cont instead of
brace-list-open. The reason is that one normally adjusts
brace-list-open for brace lists as top-level constructs, and
brace lists inside statements is a completely different
context. Case 10B.2 changed. Also changed (the somewhat
esoteric) case 9A to cope with this.
Sat May 29 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Added electric handling of
the open brace for brace-elseif-brace.
Thu May 27 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-with-syntax-table): New macro to easily switch
syntax tables temporarily.
* cc-engine.el (c-guess-basic-syntax): Handle template and
member init argument lists split over several lines. Case 5D
changed.
* cc-langs.el (c-Java-javadoc-paragraph-start): Added new tag
@throws introduced in Javadoc 1.2.
* cc-menus.el (cc-imenu-java-generic-expression): Applied
patch from RMS to avoid infinite backtracking.
Sun May 16 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-arglist): Handle "arglists" surrounded
by [ ].
Sat May 15 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-dont-change): Compensate properly for
the column in langelem.
* cc-engine.el (c-syntactic-information-on-region): New
function to help debugging the syntactic analysis.
Mon May 03 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-template-args): Handle nested template
arglists.
* cc-langs.el (c++-template-syntax-table): New syntax table
that makes `<' and `>' parenthesis characters, which is useful
to switch to temporarily when analyzing template arglists.
* cc-styles.el: Changed default alignment of labels in the
java style to conform to the examples in the Java Language
Specification.
* cc-styles.el (c-offsets-alist): Use `c-lineup-template-args'
by default.
Fri Mar 12 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Pike allows a comma
immediately before the closing paren in an arglist, so don't
check that in Pike mode. Case 7A changed.
Sat Mar 06 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-indent-region): Fixed bug where comment-only
lines were ignored under certain conditions.
Fri Mar 05 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-align.el (c-lineup-template-args): New function for
aligning continued template argument lists.
* cc-engine.el (c-guess-basic-syntax): Fix for member init
lists containing function arglists split over several lines.
Case 5D.1 changed.
* cc-engine.el (c-guess-basic-syntax): Fixed bug where
template-args-cont didn't get recognized when the first
arglist opener line doesn't contain a template argument. New
case 5K.
Sat Feb 27 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-defs.el (c-point): Changed from subst to macro for
efficiency.
(c-beginning-of-defun-1, c-end-of-defun-1): New
beginning-of-defun/end-of-defun wrappers separated from
c-point.
* cc-menus.el (imenu-generic-expression,
imenu-case-fold-search, imenu-progress-message): Dummy
definitions to avoid compiler warnings if imenu can't be
loaded.
* cc-menus.el (cc-imenu-init): New function called at mode
init.
* cc-mode.el (c-mode, c++-mode, objc-mode, java-mode): Moved
imenu initializations to cc-imenu-init.
Sun Feb 21 1999 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Slightly better check
for lambda-intro-cont in Pike mode. Case 6 changed.
* cc-engine.el (c-looking-at-inexpr-block): Fixed bug where
anything following "new Foo()" was considered an anonymous
class body in Java mode.
Fri Feb 12 1999 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-cmds.el (c-comment-line-break-function): When breaking in
a string, don't insert a new line.
Sun Jan 31 1999 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-engine.el (c-at-toplevel-p): New interface function which
returns information useful to add-on authors. It tells you
whether you're at a toplevel statement or not.
Tue Dec 22 1998 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-cmds.el (c-comment-line-break-function): It is possible
that forward-line does not land us at the bol, say if we're on
the last line in a file. In that case, do a
back-to-indentation instead of a forward-comment -1.
Fri Dec 11 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Don't catch
"default:" as normal label in case 4.
Thu Dec 10 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Use c-bitfield-key to
recognize continued bitfield declarations. Case 5D.1 changed.
* cc-langs.el: New variable c-bitfield-key.
* cc-mode.el: New variable c-bitfield-key.
Wed Dec 09 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p): Tighter test for Java
anonymous array expressions (i.e. "new Foo[] {.. bracelist
..}").
Sun Dec 6 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* Release 5.25
Mon Nov 18 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): Fixed some bugs with
comments with tricky contents in obscure places inside
bracelists. Cases 5A.3 and 9C-D changed.
Mon Nov 11 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p): Don't trip up on C++
"operator[]".
Mon Oct 31 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Fixed bug where
point would end up further down afterwards. Recognize '@' as
a prefix operator for Pike.
Mon Oct 24 1998 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-defs.el (c-major-mode-is): New defsubst to encapsulate
major-mode checking.
* cc-cmds.el, cc-engine.el, cc-lang.el: All major-mode
checking is now spelled (c-major-mode-is 'mode)
Mon Oct 23 1998 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-cmds.el (c-comment-indent): CASE 3: the looking-at should
match against c-comment-start-regexp instead of comment-start.
* cc-engine.el (c-inside-bracelist-p): Further
dekludgification. When in C++ mode and searching to see if
we're in a template definition, don't get tripped up by
#include <thing.h> syntax!
* cc-mode.el (c-submit-bug-report): Add comment-column to list
of variables reported.
Mon Oct 20 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1): Do not trip on
whitespace when skipping backwards over characters that can
start a statement.
Mon Oct 17 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p): Check for class open in
Pike mode.
Mon Oct 16 1998 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-langs.el (c-common-init): Make adaptive-fill-mode a
buffer local variable and set it to nil.
Mon Oct 15 1998 Barry A. Warsaw <bug-cc-mode@gnu.org>
* cc-langs.el (c-common-init): Implement the new semantics for
c-default-style.
* cc-mode.texi: Document the new semantics for c-default-style.
* cc-vars.el (c-default-style): Slightly different default
semantics when the value is an alist, and there's a new
special symbol in the choices: `other'. This is used when the
major-mode is not specifically listed.
Wed Oct 14 22:34:50 1998 Barry A. Warsaw <bug-cc-mode@gnu.org>
* Release 5.24
Thu Oct 08 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-brace): Added inexpr-class-open and
inexpr-class-close handling.
* cc-vars.el (c-hanging-braces-alist): Added inexpr-class-open and
inexpr-class-close and changed the default setting for those two.
Wed Oct 07 1998 Barry Warsaw <bug-cc-mode@gnu.org>
* cc-cmds.el (c-electric-delete): Use function delete-forward-p if
it exists. This is the blessed XEmacs 21 way of checking for this
condition.
Wed Sep 16 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-guess-basic-syntax): CASE 15: Handle labels at
beginning of blocks with hanging braces.
Tue Sep 08 1998 Barry Warsaw <bug-cc-mode@gnu.org>
* Bug reporting address is now bug-cc-mode@gnu.org
Mon Aug 31 1998 Barry Warsaw <bug-cc-mode@gnu.org>
* cc-defs.el (c-region-is-active-p): New function which
encapsulates region activeness determination in both XEmacs and
Emacs, regardless of whether region highlighting
(e.g. zmacs-regions / transient-mark-mode) is turned on.
* cc-langs.el (c-mode-menu): Use c-region-is-active-p so
appropriate menu entries are active correctly across all
X/Emacsen.
* cc-vars.el Added definition of `other' widget type, which allows
any value other than t or nil, but doesn't let the user type in
any old thing. This is used in c-tab-always-indent as per Per's
recommendation.
Fri Aug 28 1998 Barry Warsaw <bug-cc-mode@gnu.org>
* cc-langs.el (c-use-java-style): Removed as obsolete.
(c-common-init): Implement the new semantics for
c-default-style. Should be backwards compatible with old behavior,
but allow for per-major-mode setting of the default style.
* cc-mode.el (java-mode): No longer hard code the style setting to
"java" style. This is now all handled by the new semantics for
c-default-style.
* cc-styles.el (c-initialize-builtin-style): No longer call
c-set-style to set the default style. This is all handled by the
new semantics for c-default-style.
* cc-vars.el (c-default-style): This variable can now take either
a string or an association list, mapping major mode symbols to
style names. Update the docstring to describe the new interface,
and elaborate the Custom widget to accept either type.
Thu Aug 27 1998 Barry Warsaw <bug-cc-mode@gnu.org>
* cc-styles.el (c-offsets-alist): The offset for a syntactic
symbol can now also be a list, which is recursively evaluated
using the previous semantics. The first non-nil value succeeds.
(c-get-offset, c-evaluate-offset): Function to implement recursive
evaluation for when a symbol's offset is a list (the first one to
return a non-nil value succeeds -- should this be a stricter check
for an integer return value?). Factored out of c-get-offset.
(c-set-offset, c-read-offset): Error message indicates value could
be a list. In former function, add listp check.
* cc-vars.el (c-strict-syntax-p): Describe addition responsibilities.
Mon Aug 24 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p, c-guess-basic-syntax): In
Java brace lists may follow the new operator. Do not recognize
them as in-expression statements. Case 7B changed in
c-guess-basic-syntax.
Sun Jun 07 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-beginning-of-statement-1, c-guess-basic-syntax):
Fixed indentation of try-catch-finally blocks nested inside
if-statements. New case 13 in c-guess-basic-syntax; cases 13-16
renamed for this. New syntactic symbol catch-clause.
* cc-styles.el New syntactic symbol catch-clause. Changed the
default to not alter the indentation of multiline strings in any
way.
Sat Jun 06 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el Added recognition of IDL specific top-level keywords.
Tue May 19 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-search-uplist-for-classkey,
c-looking-at-inexpr-block, c-guess-basic-syntax): Fixed bug in
recognizing anonymous Java classes. Cleanups in the code that
handles in-expression brace constructs.
Sun May 03 1998 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-engine.el (c-inside-bracelist-p): Rewrote the `=' detection
loop to make it more clear and in some cases a lot
faster.
(c-forward-token-1, c-backward-token-1): Use narrowing for limits
to improve speed when the limit is inside a huge balanced paren.
Mon Apr 27 14:54:33 1998 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.23
* (c-electric-pound): Do electric stuff only if # is hit at the
beginning of the line.
Mon Apr 27 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-align.el (c-lineup-math): Indent with c-basic-offset if the
equal sign ends the first line.
Thu Apr 23 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-align.el, cc-cmds.el, cc-compat.el, cc-engine.el: Use
c-{forward,backward}-sexp instead of {forward,backward}-sexp.
Mon Apr 20 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-inside-bracelist-p): Don't recognize operator=()
method definitions as bracelists.
Sun Apr 19 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-style-alist): In "gnu" style, set inline-open
offset to zero.
Thu Apr 16 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-electric-brace): Check for and exclude Pike-style
brace lists from the auto-newline feature.
Wed Apr 15 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-electric-paren): New function for electric
auto-indenting behavior for parenthesis.
Tue Apr 14 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-submit-bug-report): Don't include
c-special-indent-hook iff hook is of length 1 and contains only
c-gnu-impose-minimum.
Mon Apr 13 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-engine.el (c-add-class-syntax): New function that handles all
inclass and related symbols in one place. The anchor position of
inclass has changed in some situations.
Sun Apr 12 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-statement): Handle blocks inside
expressions.
Wed Apr 08 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-mark-function): Much better implementation which
catches all the expected cases.
(c-end-of-defun): When called programmatically with no arguments,
arg is nil, so set it to 1.
* cc-defs.el (c-point): Added 'eod.
Mon Apr 06 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-engine.el (c-search-uplist-for-classkey,
c-inside-bracelist-p, c-looking-at-inexpr-block,
c-guess-basic-syntax): Support for Java anonymous classes. New
case 6D in c-guess-basic-syntax.
* cc-langs.el, cc-mode.el, cc-styles.el: Support for Java
anonymous classes. New syntactic element inexpr-class.
Sun Apr 05 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-align.el (c-lineup-inexpr-stat): Added lineup of statements
inside expressions.
* cc-engine.el (c-inside-bracelist-p, c-looking-at-inexpr-stat,
c-guess-basic-syntax): Added recognition of the gcc extension for
statements inside expressions. They're handled as
`inexpr-statement' now. Changed cases: 6, 10, 15A, 16E. New case
7B; old 7B-F renumbered.
Fri Apr 03 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-electric-brace): Removed brace-list-entry from the
list of symbols that can be electrified because all cases where
brace-list-entry was used should now be brace-entry-open's. Add
new brace-entry-open to list of braces which can be electrified.
* cc-engine.el (c-guess-basic-syntax): CASE 9C: brace-list-open =>
brace-entry-open.
* cc-styles.el (c-style-alist): In "linux" and "python" styles,
add brace-entry-open to mimic brace-list-open. Added description
and entry for brace-entry-open, a new syntactic symbol.
* cc-vars.el (c-hanging-braces-alist): Added brace-entry-open to
mimic brace-list-open in default value. Updated docstring and
defcustom spec to describe brace-entry-open and remove
brace-list-entry.
Thu Apr 02 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-align.el (c-lineup-inexpr-stat): New lineup function used in
Pike mode.
* cc-langs.el: New variables c-lambda-key and
c-special-brace-lists for Pike.
* cc-styles.el: New syntactic symbols inlambda, lambda-intro-cont,
and inexpr-statement for Pike.
* cc-engine.el: Support for the Pike language. Handle Pike-style
brace lists ('({ })', '([ ])', '(< >)') and in-expression
statements. New case 6 in c-guess-basic-syntax; CASES >= 6 ARE
RENAMED because of this. New functions:
c-looking-at-special-brace-list, c-looking-at-inexpr-stat,
c-looking-at-inexpr-stat-backward.
* cc-mode.el (pike-mode): New function; support for the Pike language.
Tue Mar 31 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-comment-line-break-function): Insert newline when
in a string literal.
Fri Mar 27 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-defs.el (c-forward-sexp, c-backward-sexp): Implementations of
replacement defsubst to insulate ourselves from changes to
forward-sexp and backward-sexp user level command.
* cc-styles.el (c-read-offset): A better prompt which includes the
syntactic symbol being changed.
Wed Mar 18 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-indent-line-or-region): New command. Remove `*'
from interactive spec.
* cc-langs.el (c-mode-menu): Change "Indent Line" to "Indent Line
or Region".
Mon Mar 16 19:13:24 1998 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.22
Thu Mar 12 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-menus.el (cc-imenu-c++-generic-expression): Fix to handle
explicitly specialized template classes.
* cc-mode.texi: Added a paragraph on
signal-error-on-buffer-boundary in the Limitations and Known Bugs
section.
Wed Mar 11 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax): Fixed bug with member inits
on the same line as the function header. Case 5D.1 changed.
Wed Mar 11 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-submit-bug-report): Add
signal-error-on-buffer-boundary to the list of variables that get
reported. This is a losing XEmacs variable that breaks many
things and should never be set by the user.
Fri Mar 6 00:25:29 1998 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.21
Sat Feb 28 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-mode.el (c-initialize-on-load): Variable removed.
Sat Feb 28 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-inside-bracelist-p): Fix for enum test.
Fri Feb 27 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-mode.el (c-initialize-cc-mode): Moved require's to top level.
Wed Feb 25 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-fill-paragraph): Always keep point in the same
relative position. Fill comment before point if there's nothing
else on the same line. Fill block comments after code a little
better. Try harder to find a good fill-prefix when point is on a
block comment ender line. Use c-Java-javadoc-paragraph-start in
block comments in Java mode. Leave block comment ender alone when
c-hanging-comment-ender-p is nil and point is on that line.
Detect paragraph-separate in multiparagraph comments. Fix for bug
that may strip the `*' off `*/' if fill-prefix ends with `*' and
c-hanging-comment-ender-p is t. Added filling of multiline string
literals. Always return t to disable filling in any unhandled
area, i.e. actual code where fill-paragraph only mess things up.
Tue Feb 24 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-engine.el (c-collect-line-comments): Require same comment
start column.
* cc-langs.el Added c-Java-javadoc-paragraph-start for use in
c-fill-paragraph.
Tue Feb 24 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-fill-paragraph): Bind fill-paragraph-function to
nil when calling fill-paragraph to avoid bogus recursion which
will signal an error.
Sat Feb 21 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax): Fixes for nesting of and
repeated defun-open's inside extern and namespace clauses. This
is done by passing a relpos to 'inextern-lang and 'innamespace.
Also, the relpos in 'defun-open is no longer always bol. It's
always bol when on the top level, however. Changed cases: 5A.5,
5I, 14A.
Thu Feb 19 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-engine.el (c-forward-token-1, c-backward-token-1): New
functions to move by tokens.
(c-guess-basic-syntax): Fixes for Java 1.1 array initialization
brace lists.
Tue Feb 17 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-mode-19.el: Only define the functions if they aren't defined
already.
Tue Feb 10 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-make.el: Require cc-mode-19 if needed before batch compile,
because it contains macro definitions that must be defined during
compilation.
Sun Feb 8 15:30:43 1998 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.20
Wed Feb 04 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-mode, c++-mode, objc-mode, java-mode): set
imenu-case-fold-search to nil.
Tue Feb 03 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-postprocess-file-styles): If a file style or file
offsets are set, make the variables local to the buffer (via
make-local-variable).
* cc-styles.el (c-make-styles-buffer-local): Take an optional
argument which switches between make-variable-buffer-local and
make-local-variable. Generalize.
Mon Feb 02 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-align.el (c-lineup-close-paren, c-indent-one-line-block): New
indentation functions.
* cc-cmds.el (c-beginning-of-statement, c-end-of-statement): Do
not move by sentence in strings. Doc fixes.
* cc-mode.texi: Document new indentation functions.
Sat Jan 24 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-defs.el (c-point): In XEmacs, use scan-lists +
buffer-syntactic-context-depth to radically speed up locating
top-level defun opening brace in some situations. When the braces
hang, this can make c-parse-state from between 3 to 60 times
faster. When they don't hang, this may be a few percentage points
slower (not noticeable to me though). The variable
c-enable-xemacs-performance-kludge-p toggles the behavior. This
change has no effect on Emacs, which lacks the built-in function
buffer-syntactic-context-depth.
* cc-mode.texi: Discuss c-enable-xemacs-performance-kludge-p in
the section on performance.
* cc-vars.el (c-enable-xemacs-performance-kludge-p): New variable.
Fri Jan 23 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el cc-defs.el cc-engine.el (c-beginning-of-defun,
c-indent-defun, c-parse-state): Use (c-point 'bod) instead of
beginning-of-defun directly.
Tue Jan 20 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-statement): Speedup; it's only
necessary to call `c-literal-limits' once when the function is
entered.
Mon Jan 19 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-align.el (c-semi&comma-no-newlines-before-nonblanks,
c-semi&comma-no-newlines-for-oneline-inliners): New functions,
appropriate for c-hanging-semi&comma-criteria, but not placed on
that variable by default.
* cc-langs.el (c-mode-base-map): Comment out c-beginning-of-defun
and c-end-of-defun bindings, since RMS doesn't want these to be
the default.
* cc-mode.texi: Describe c-beginning-of-defun and c-end-of-defun.
Describe the new c-hanging-semi&comma-criteria functions.
Sun Jan 18 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-statement): Handle multiple C++ line
comments a little better.
Almost completely rewritten. It's now more thorough when handling
strings and comments and the transitions between them and the
surrounding code. The statement parsing is also rewritten because
`c-{beginning|end}-of-statement-1' does no longer do what we want
in this function (e.g. c-b-o-s-1 doesn't go into blocks). It also
works better for different counts and when sentence-flag is nil.
* cc-engine.el (c-forward-syntactic-ws, c-backward-syntactic-ws):
Removed the narrowings which doesn't seem to have much effect.
Instead a simple check is made against the given limit. In
`c-backward-syntactic-ws' this means that there's no need to
search for bod, which helps up speed quite a lot in some areas.
(c-collect-line-comments): New function that given the limits of
one C++ style line comment returns the range for all adjacent line
comments. This functionality is moved from the functions
`c-literal-limits' and `c-literal-limits-fast'.
(c-literal-limits): New function that finds the start and end pos
of a comment or string surrounding point. This function is Emacs
19.34 compatible and it has a workaround for what seems to be a
bug in `parse-partial-sexp' when we use an existing state to get
the state for the very next character.
(c-literal-limits-fast): A faster variant of `c-literal-limits'
for newer Emacsen where the state returned from
`parse-partial-sexp' contains the starting pos of the last
literal. This does not contain the workaround described above.
The function is not yet tested and therefore not in use for now.
Note that these functions regard the position between the first
and second char of a comment starter to be part of the comment.
Although `parse-partial-sexp' (in Emacs 19 anyway) doesn't do
this, it seems more intuitive to me. Maybe `c-in-literal' should
do this too?
Thu Jan 15 1998 Martin Stjernholm <cc-mode-help@python.org>
* cc-mode-19.el: Added `when' and `unless'.
Thu Jan 15 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax): Fixed a few byte compiler
warnings.
Wed Jan 14 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-defun, c-end-of-defun): New commands
which mimic the standard built-ins, but do a much better job of
finding the open brace when it's hung on the right side (as is the
case with the most common Java style).
* cc-engine.el (c-backward-to-start-of-do): Break infloop for
illegal code, e.g. when someone types while (TRUE) { at the top of
a buffer, we shouldn't hang when the { is typed!
Tue Jan 13 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-statement): When moving forward by
sentences, because we're either inside or at the start of a
comment, be sure to limit movement to only within the extent of
the comment.
Sat Jan 10 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-java-method-key): I really don't remember why
this was added, but it seems to do more harm than good. Besides,
its value was clearly wrong, being inherited from Objective-C.
* cc-mode.el (java-mode): Set c-method-key to nil. I don't think
this is necessary for Java, and besides, the old value was
inherited from Objective-C which was clearly not right. With this
change, all regression tests pass and the example by Bengt
Martensson also passes:
class Baz
{
int blah()
{
return 1
+ 2
+ 3
+ foobar()
+ 5
+ 6;
}
}
* cc-mode.texi Add some explanation to "gnu" style and "user"
style, describing the relationship between these and user
Customizations.
* cc-vars.el (c-default-style): Change this back to "gnu" after
(re-reading old) discussions with RMS. This may confuse users who
set variables in the top-level of their .emacs files, or using the
Custom interface, since those changes will get incorporated into
the "user" style. RMS insists, however, that the default style be
"gnu".
Sun Jan 04 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-electric-colon): Newlines should not be inserted
before or after scope operators, regardless of the value of
c-hanging-colons.
* cc-engine.el (c-backward-to-start-of-if): Workaround a nasty to
track down bug. If point is < lim, then this function can
actually land you forward into the buffer. This can cause an
infloop in c-beginning-of-statement-1. It is probably a bug that
this function gets called with a lim > point, but that's even
harder to figure out, so if that's the case when this function is
called, it's simpler just to ignore lim and use bod. This breaks
the infloop without causing broken indentation.
Sat Jan 03 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-align.el (c-lineup-dont-change): New lineup function that
leaves the current line's indentation unchanged. Used for the new
cpp-macro-cont syntactic symbol.
* cc-cmds.el (c-electric-brace): namespace-open and
namespace-close braces can hang.
* cc-defs.el (c-emacs-features): Added autoload cookie which Steve
Baur claims is necessary for XEmacs.
* cc-engine.el (c-search-uplist-for-classkey): When searching up
for a class key, instead of hardcoding the extended search for
"extern", use the new variable c-extra-toplevel-key, which is
language dependent. For C++, this variable includes the keyword
"namespace" which will match C++ namespace introducing blocks.
(c-guess-basic-syntax): Support for recognizing C++ namespace
blocks, by elaborating on the mechanism used to find external
language blocks. Searches which hardcoded "extern" now use
c-extra-toplevel-key, a language dependent variable. Case clauses
that were modified: CASE 5A.1, CASE 5A.4, CASE 5F, CASE 5I, CASE
14A.
CASE 3: we can now determine whether we're at the beginning of a
cpp macro definition, or inside the middle of one. Set syntax to
'cpp-macro in the former case, 'cpp-macro-cont in the latter. In
both cases, the relpos is the beginning of the macro.
(c-forward-syntactic-ws): Added code that skips forward over
multi-line cpp macros.
(c-beginning-of-macro): Moved, and made into a defsubst. This
function can now actually find the beginning of a multi-line C
preprocessor macro.
(c-backward-syntactic-ws): Use c-beginning-of-macro to skip
backwards over multi-line macro definitions.
(c-in-literal, c-fast-in-literal): Use c-beginning-of-macro to
find out whether we're in a multi-line macro definition.
* cc-langs.el (c-C-extra-toplevel-key, c-C++-extra-toplevel-key,
c-extra-toplevel-key): New variables which parameterize the search
for additional top-level enclosing constructs. In all languages,
extern lang blocks are supported (but maybe this should just be C
and C++?). In C++, also namespace blocks are supported.
* cc-menus.el Imenu patches by Masatake Yamato and Jan Dubois.
* cc-mode.el (c++-mode): Set c-extra-toplevel-key to
c-C++-extra-toplevel-key.
(c-initialize-on-load): New variable, *not* customized. When set
to t -- the default -- c-initialize-cc-mode is called when the
cc-mode.el file is loaded, e.g. via (require 'cc-mode). This is
backwards compatible with .emacs files that used CC Mode 4. I'm
still not 100% sure this is the right thing to do.
* cc-mode.texi: Added descriptions of the new C++ namespace
syntactic symbols: namespace-open, namespace-close, innamespace.
Added an example for this and also multi-line macros.
Describe c-lineup-dont-change and the new cpp-macro-cont syntactic
symbol. Remove the `known limitation' that multi-line macros
aren't supported.
* cc-styles.el (c-offsets-alist): Three new syntactic symbols:
innamespace, namespace-open, namespace-close. These support C++
namespace blocks.
Added new syntactic symbol cpp-macro-cont, by default bound to
c-lineup-dont-change. This symbol is assigned to subsequent lines
of a multi-line C preprocess macro definition.
* cc-vars.el (c-default-style): Variable is user customizable so
it's docstring should start with a `*'.
Fri Jan 02 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-fast-in-literal): Function which should be
faster than c-in-literal. This uses buffer-syntactic-context
which is a speedy built-in that exists only in XEmacs. Make it's
alias conditional on that built-in's existance. To be honest, the
performance effects should be tested. Also c-fast-in-literal
knows about multi-line cpp macros while c-in-literal does not.
The latter should be taught about this, but this change will wait
for a future mega-patch to handle multi-line macros.
Thu Jan 01 1998 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-comment-line-break-function): When breaking a
line-oriented comment, copy the comment leader from the previous
line instead of hardcoding it to "// ". This ensures that
whitespace between the slashes and the text is preserved.
Tue Nov 18 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-mode-base-map): Bind c-mark-function using a
portable representation of C-M-h that differentiates this from
M-BS on both XEmacs and Emacs.
Sat Nov 15 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-electric-pound, c-electric-brace,
c-electric-slash, c-electric-star, c-electric-semi&comma,
c-electric-colon, c-electric-lt-gt, c-scope-operator,
c-indent-command, c-indent-exp, c-indent-defun,
c-backslash-region, c-fill-paragraph): Added "*" to interactive
spec to barf-if-buffer-read-only.
Fri Nov 14 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-fill-paragraph): regexp-quote the fill-prefix when
search forward for the end of line oriented comments. This is in
case the fill-prefix contains regexp special characters
(e.g. fill-prefix == " //* ")
(c-backslash-region): Do not preserve the zmacs region (XEmacs).
Wed Nov 12 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-mode-base-map): c-mark-function moved back to
M-C-h. RMS says: "It ought to be on M-C-h, because that is the
key to mark one function definition in whatever language you're
using." I don't remember why it was moved in the first place.
Tue Nov 04 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-electric-backspace, c-electric-delete):
Interactive spec should have a read-only *.
Thu Oct 30 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-styles-alist): Merged "jdk" into "java" style
and removed "jdk" style. Only differences now are inline-open and
c-basic-offset.
Wed Oct 29 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.texi Document "jdk" style.
* cc-styles.el (c-style-alist): "jdk" style given by Martin
Buchholz <mrb@Eng.Sun.COM> for conformance with Sun's JDK style.
Fri Oct 10 1997 Barry Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-set-style-2, c-initialize-builtin-style): Don't
special case "cc-mode", it's a derived style.
Fix setup of derived style "cc-mode".
Introduce the new default style "user" which contains all user
customizations. The style "cc-mode" is retained as an alias, but
it's use is deprecated. The default style variable has been
renamed c-default-style.
* cc-vars.el (c-site-default-style): Renamed to c-default-style.
Also, the default value is now "user".
Mon Oct 6 19:12:51 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.19
Mon Oct 6 19:09:17 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax):
CASE 5F: extern-lang-close relpos should be
element 0 of inclass-p, not element 1.
* cc-cmds.el (c-progress-init, c-progress-fini):
Be slient if c-progress-interval
is nil.
* cc-vars.el (c-progress-interval): Document new semantics
Fri Oct 3 23:10:04 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-beginning-of-statement-1):
Watch out for keywords which have a
preceding underscore.
Fri Sep 26 23:30:58 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-menus.el: Patches to Imenu support given by
"Masatake (jet) YAMATO" <masata-y@is.aist-nara.ac.jp>.
(Jan Dubois) jan.dubois@ibm.net
* cc-cmds.el (c-comment-line-break-function):
Fix for when comment starts at
comment-column and there is non-whitespace preceding this on the
current line.
* cc-mode.el (c-submit-bug-report): Remove c-recognize-knr-p. Add
c-comment-continuation-stars.
Mon Sep 22 15:47:02 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-initialize-builtin-style):
Only use copy-tree if it is
funcall-able. This is the right patch, and was given by Erik Naggum
<erik@naggum.no>
Tue Sep 16 19:23:24 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.18
Tue Sep 16 23:17:15 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-menus.el (cc-imenu-c-prototype-macro-regexp): New variable.
(cc-imenu-c++-generic-expression): Patches to better match C++ code.
Given by jan.dubois@ibm.net (Jan Dubois)
* cc-menus.el (cc-imenu-java-generic-expression):
Removed test for declaration
statements. Patch given by Ake Stenhoff <etxaksf@aom.ericsson.se>, as
forwarded to me by RMS.
* cc-menus.el:
Imenu support for Objective-C given by Masatake (jet) YAMATO.
* cc-mode.el (objc-mode): Bind imenu-create-index-function to
cc-imenu-objc-function to enable Imenu support for Objective-C.
Contributed by Masatake (jet) YAMATO.
Mon Sep 15 23:21:51 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-initialize-builtin-style):
Use existing copy-tree if it's defined.
copy-sequence doesn't work; the
c-offsets-alist must be copied recursively. Use copy-tree solution
given by Simon Marshall.
Fri Sep 5 04:47:03 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-statement):
Fixes in sentence movement to properly
handle M-e moving forward into a comment when looking at preceding
whitespace, and M-a moving backward into comment when looking at
following whitespace.
Uncommented the looking-at call in the
sentence-flag clause so that moving by forward-sentence when looking
at the beginning of a comment works again. A previous log message in
cc-mode.el indicates this was commented out "because
c-beginning-of-statement-1 should do the right thing", but clearly it
doesn't.
I don't know if this breaks something else, because I can't figure out
why it was commented out in the first place.
* cc-langs.el:
Define `/' in c-mode-base-map since all modes now support
c-electric-slash.
Define C-c C-e in mode-specific maps instead of c-mode-base-map since
c-expand-macro is meaningless in Java and IDL.
* cc-engine.el (c-end-of-statement-1):
Wrap backward-up-list in a c-safe call so no
error results when buffer contains only a comment and point is at
eob.
Fri Sep 5 00:50:41 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.17
Fri Sep 5 04:47:03 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-beginning-of-statement):
Fixes in sentence movement to properly
handle M-e moving forward into a comment when looking at preceding
whitespace, and M-a moving backward into comment when looking at
following whitespace.
* cc-langs.el:
Define `/' in c-mode-base-map since all modes now support
c-electric-slash.
Define C-c C-e in mode-specific maps instead of c-mode-base-map since
c-expand-macro is meaningless in Java and IDL.
* cc-engine.el (c-end-of-statement-1):
Wrap backward-up-list in a c-safe call so no error results when
buffer contains only a comment and point is at eob.
* cc-cmds.el (c-beginning-of-statement):
Uncommented the looking-at call in the
sentence-flag clause so that moving by forward-sentence when looking
at the beginning of a comment works again. A previous log message in
cc-mode.el indicates this was commented out "because
c-beginning-of-statement-1 should do the right thing", but clearly it
doesn't.
I don't know if this breaks something else, because I can't figure out
why it was commented out in the first place.
Tue Aug 26 22:31:55 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-style-alist): "python" style, knr-argdecl-intro == +
Mon Aug 25 17:25:12 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-inside-bracelist-p):
Add a test to the enum list test so that the
following code won't erroneously recognize as inside a brace list:
static PyObject **
unpack_sequence(v, argcnt, why)
PyObject **v;
int argcnt;
enum *why_code;
{
int i;
Otherwise, the `enum' in the K&R decl trips this code up.
* cc-styles.el (c-style-alist): "python" style, fill-column = 78
Fri Aug 22 20:25:57 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-comment-line-break-function):
Don't break line in the middle of a string.
Mon Aug 18 17:37:24 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-style-alist):
"python" style change: arglist-intro <= +
"python" style change: inextern-lang <= 0
Fri Aug 15 18:39:10 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-style-alist):
"python" style requires c-comment-continuation-stars
to be "".
Fri Aug 15 17:26:05 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.16
Fri Aug 15 18:39:10 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-style-alist):
"python" style requires c-comment-continuation-stars
to be "".
* cc-engine.el (c-end-of-statement-1):
Eliminate false hits on important characters
inside literals (strings, comments).
Tue Aug 12 21:47:18 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-comment-line-break-function):
In this function, and the defadvice,
call indent-new-comment-line if not in a comment.
* cc-vars.el (c-buffer-is-cc-mode): Definition moved to cc-mode.el
* cc-mode.el (c-buffer-is-cc-mode):
Definition moved here from cc-vars.el. Also,
put permanent-local property on variable so it's value won't get
killed by kill-all-local-variables. This makes it easier for non-CC
Mode derived modes to be initialized correctly.
* cc-cmds.el (c-electric-brace):
In preserve-p test, don't test char-before when at
bobp. Open brace at bobp is illegal in most modes, but not awk-mode,
which depends on CC Mode.
Mon Aug 11 15:37:04 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c++-mode, java-mode, objc-mode, idl-mode):
Remove obsolete variable c-double-slash-is-comments-p.
* cc-langs.el (c-double-slash-is-comments-p): Remove obsolete variable.
* cc-cmds.el (c-fill-paragraph):
Remove conditional on obsolete variable
c-double-slash-is-comments-p.
* cc-styles.el (c-style-alist):
Conform comment settings to RMS's preferences.
Thu Aug 7 19:21:32 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-set-offset): Added autoload cookie.
Thu Aug 7 18:13:12 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.15
Thu Aug 7 19:21:32 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-set-offset): Added autoload cookie.
* cc-langs.el (c++-mode-syntax-table, java-mode-syntax-table,
objc-mode-syntax-table, idl-mode-syntax-table): Added autoload
cookies. c-mode-syntax-table already has one.
Wed Aug 6 21:50:08 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-initialize-cc-mode):
Check all cc-mode-19 interface requirements.
Tue Aug 5 21:56:02 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-align.el (c-lineup-java-throws):
Change the `when' clause to an `if-progn' :-(
* cc-langs.el (c-common-init):
Make comment-line-break-function buffer local iff it's boundp.
* cc-cmds.el:
defadvice for indent-new-comment-line keys off of c-buffer-is-cc-mode
instead of an explicit major-mode list. this means non-CC Mode
derived modes will work properly
* cc-mode.el (c-initialize-cc-mode): Set c-buffer-is-cc-mode to t.
* cc-vars.el (c-buffer-is-cc-mode): New variable
* cc-mode.texi:
In FAQ section, document use of c-mode-base-map instead of c-mode-map.
* cc-mode.el (c-initialize-cc-mode):
Give in to the pressure. require 'cc-mode-19
if functionp is not bound. Too many novice errors without this.
* cc-cmds.el:
Added advice for indent-new-comment-line so older Emacsen work if they
don't have the variable comment-line-break-function.
Mon Aug 4 14:55:40 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-mode-base-map, c++-mode-map):
Move `/' as an electric character
from c++-mode-map to c-mode-base-map for all languages.
* cc-cmds.el (c-electric-slash):
Make this work as the final slash in a */ block
oriented comment closing token.
* cc-vars.el (c-comment-continuation-stars):
Can take a nil value. Also, the default value is "* ".
* cc-cmds.el (c-comment-line-break-function): nil value for
c-comment-continuation-stars means use old semantics
Fri Aug 1 22:44:49 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-comment-line-break-function):
Added optional soft argument
* cc-langs.el (c-common-init): Set comment-multi-line and
comment-line-break-function here for all modes.
* cc-mode.el (c-mode, c++-mode, objc-mode, java-mode, idl-mode):
Don't set comment-multi-line here.
* cc-vars.el (c-comment-continuation-stars): New variable
* cc-cmds.el (c-comment-line-break-function): New function for proposed
mode-specific comment-line-break-function variable.
* cc-mode.el (c-mode): comment-multi-line => nil
* cc-mode.texi: Removed the description of c-enable-//-in-c-mode.
* cc-langs.el (c-C-comment-start-regexp): Obsolete.
(c-comment-start-regexp): Initialize from c-C++-comment-start-regexp.
(c-populate-syntax-table, c-setup-dual-comments): Merge both functions
into c-populate-syntax-table. With the new 9X draft C standard, both
line and block oriented comments are supported in all modes, so always
set up the syntax tables to support both comment styles.
(c-mode-syntax-table, c++-mode-syntax-table, java-mode-syntax-table,
objc-mode-syntax-table, idl-mode-syntax-table): Use the new syntax
table initialization idioms.
(c-enable-//-in-c-mode): Obsolete.
* cc-mode.el (c-mode):
c-comment-start-regexp uses c-C++-comment-start-regexp to
support line oriented comments.
Wed Jul 30 00:01:45 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax):
CASE 5D.4: template argument continuation
lines are now analyzed as template-args-cont.
* cc-styles.el (c-offsets-alist):
Added template-args-cont syntactic symbol
* cc-mode.texi:
Added description of template-args-cont syntactic symbol
Sat Jul 26 16:03:33 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-styles-alist):
In "java" style, set c-hanging-comment-starter-p to
nil to preserve Javadoc starter lines.
Sat Jul 26 12:24:20 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.14
Sat Jul 26 16:03:33 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-styles-alist):
In "java" style, set c-hanging-comment-starter-p to
nil to preserve Javadoc starter lines.
Fri Jul 25 22:17:07 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-beginning-of-statement-1):
When checking for bare semi, don't match
on a semi following a close brace, otherwise the following legal code
fails:
void foo()
{
static struct Pattern nums
= {1, 2, 3};
int j = 2;
}
This might break some bare semi idioms but those are probably more
rare than static initializers.
* cc-mode.texi: Describe support for idl-mode
* cc-vars.el (idl-mode-hook): New variable.
* cc-mode.el (idl-mode): Support for CORBA's IDL language.
* idl-font-lock.el: Unsupported font-lock definitions for IDL.
This should be merged in with font-lock.el
* cc-mode.el (c-initialize-cc-mode):
move the calling of c-make-styles-buffer-local
into c-initialize-builtin-style.
* cc-styles.el (c-set-style-2):
Fixed broken implementation of inherited styles.
* cc-mode.texi:
Document c-initialization-hook. Also rewrite the "Getting Connected"
section on byte compiling the source.
* cc-mode.el (c-initialize-cc-mode):
Run the c-initialization-hook, but only once
per Emacs session.
* cc-vars.el (c-initialization-hook): New variable.
* cc-engine.el (c-guess-basic-syntax):
CASE 5I: When adding 'inclass syntax, use the
relpos pointing to the class opening brace, unless that hangs on the
right side, in which case, use the start of the class/struct keyword.
Thu Jul 17 03:36:22 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-symbol-key):
first character must be a letter or underscore
Wed Jul 16 23:56:58 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.13.
Thu Jul 17 03:36:22 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-symbol-key):
first character must be a letter or underscore
* cc-defs.el (c-load-all): Function deleted.
* cc-mode.el (c-initialize-cc-mode): New function.
(c-mode, c++-mode, objc-mode, java-mode): Call it.
Tue Jul 15 04:18:38 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi:
Describe the variable c-indent-comments-syntactically-p.
Mon Jul 14 23:43:33 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-make-inherited-keymap): Change to a defun
* cc-langs.el:
Added (require 'cc-defs) to pick up the definition of c-emacs-features.
* README: Simplified instructions
* cc-make.el: New file to aid in byte-compiling in older Emacsen.
Sun Jul 13 21:24:37 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el: cc-defs is required to pick up the c-add-syntax macro
* cc-langs.el (c-mode-menu):
Added uncomment region and slight rearrangement of
items
* cc-cmds.el (c-electric-backspace):
Must get 'supercede property values to work
with delsel and pending-del.
Thu Jul 10 20:46:09 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-maybe-labelp):
defvar this to shut up the byte compiler
Wed Jul 9 22:08:58 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-initialize-builtin-style):
use copy-sequence instead of copy-tree
so the cl module isn't necessary.
* cc-cmds.el (c-electric-brace):
fix ebola eradication consequence in the
preserve-p test.
Tue Jul 8 23:47:47 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Release 5.12
Mon Jul 7 23:47:02 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el, cc-mode.el, cc-menus.el, cc-langs.el, cc-engine.el, cc-compat.el, cc-cmds.el, cc-align.el:
Reorganization to support byte-recompile-directory.
* Release: Don't put release number in tar file
Thu Jul 3 22:54:03 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-mode-base-map):
Proper binding of c-electric-backspace and
c-electric-delete, based on the policy of the various maintainers.
Thank goodness for delete-key-deletes-forward!
* cc-vars.el (c-tab-always-indent, c-hanging-braces-alist):
Minor changes to the
cutomize format.
* cc-mode.texi: Fixed spelling of Texinfo
* cc-mode-19.el: Initial revision
* cc-menus.el, cc-engine.el, cc-compat.el, cc-cmds.el, cc-align.el:
Major Ebola eradication.
Wed Jul 2 21:33:04 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-crosses-statement-barrier-p, c-guess-basic-syntax):
Ebola
eradication.
* cc-cmds.el (c-indent-region):
Call c-echo-parsing-error to echo last parsing
error that may have occurred.
* cc-engine.el (c-echo-parsing-error): New function.
* cc-engine.el (c-parsing-error): new variable
(c-parse-state): When an unbalanced close brace is discovered, don't
raise an error (prevents insertion of character). Insert the
character, display a warning message, and set c-parsing-error so
syntax echoing will be disabled.
(c-show-syntactic-information, c-indent-line): Suppress syntax echoing
if c-parsing-error is non-nil.
* cc-styles.el: Added require of cl to pick up definition of copy-tree.
Mon Jun 30 21:41:00 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el, cc-mode.el (c-mode-map, c++-mode-map, objc-mode-map, java-mode-map):
Moved
defvars from cc-langs.el to cc-mode.el for use in c-mode, c++-mode,
objc-mode, and java-mode docstrings. Actual population of these mode
maps remains in cc-langs.el.
* cc-mode.el:
Require cc-langs at top level, so as to get the definitions for
c-mode-map, et al. that are used in the *-mode docstrings.
Fri Jun 27 17:33:32 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-mode-syntax-table):
Added autoload cookie for gdb-mode.
Thu Jun 26 21:12:56 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax):
CASE 5H: Whack one ebola infection (e.g. using
memq with the results of following-char in XEmacs 20).
* cc-styles.el:
Added two require's that make autoload call of (c-set-style) work.
Sun Jun 22 16:40:30 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-electric-delete):
Don't call c-electric-backspace interactively.
Fri Jun 20 20:40:33 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-mode, c++-mode, objc-mode, java-mode):
Make sure to call
c-update-modeline after the hooks are run, so that the modeline
accurately reflects auto-newline and delete-key minor modes if the
hooks set c-hungry-delete-key or c-auto-newline directly.
* cc-align.el (c-lineup-java-throws): Fixed some regressions.
Fri Jun 20 19:55:55 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Public Release 5.11
* cc-mode.texi:
Describe changes to support separation of Backspace and Delete in
XEmacs 20.
* cc-vars.el (c-delete-function): renamed to c-backspace-function.
(c-backspace-function): New variable.
* cc-cmds.el (c-electric-backspace, c-electric-delete):
Old X/Emacs 19 behavior
typically bound to the backspace keysym is renamed to
c-electric-backspace (which consults c-backspace-function).
c-electric-delete (c-delete-function) is now bound to the delete
keysym, which in XEmacs 20 is separated.
* cc-langs.el (c-mode-base-map):
No longer bind "\177" as a way to spell [delete]
and [backspace]. Bind these two keys separate to support XEmacs 20's
separation of forward deletion and backward deleteion. This means
that in Emacs 19 and XEmacs 19, the backspace keysym is now bound to
c-electric-backspace, but the functionality is the same (although the
variable this consults is now called c-backspace-function).
* cc-engine.el (c-show-syntactic-information): Minor optimization.
Tue Jun 17 03:21:50 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-align.el (c-lineup-multi-inher): Fixed small order dependency
* cc-align.el (c-langelem-col):
New defsubst. Convert all appropriate calls
calculating the column of the langelem's relpos to use this function.
* cc-align.el (c-lineup-java-throws): New function
* cc-styles.el (c-style-alist):
"java" style's func-decl-cont is associated with
c-lineup-java-throws so long throws lines line up exceptions.
* cc-styles.el (c-offsets-alist):
Substituted RMS's description of func-decl-cont,
with a minor change.
* cc-mode.texi:
Substituted RMS's description of func-decl-cont, with a minor change.
Thu Jun 12 13:57:35 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-styles-alist):
Changed topmost-intro-cont offset to + in Java
style. This is closer to what people expect for default instance
variable initializations.
Wed Jun 11 18:20:59 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi: LFD => C-j
RMS> I've decided to mostly stop using LFD as the name of an input
RMS> character because PCs do not have a linefeed key. So please
RMS> change the cc-mode manual to use @kbd{C-j} rather than @key{LFD}.
Mon Jun 9 15:20:10 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-styles.el (c-offsets-alist): A few minor changes to the docstring.
Mon Jun 2 23:37:51 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Beta Release 5.09
Sun Jun 1 16:23:11 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-load-all): cc-menus depends on cc-langs.
* cc-langs.el (c-mode-base-map):
New variable. All maps, including c-mode-map
inherit from this map. This makes menu creation more straightforward
for Emacs, although it is unnecessary for XEmacs.
(c-make-inherited-keymap): Use c-mode-base-map as the parent map.
Sat May 31 17:35:55 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-langs.el (c-common-init):
Conversion to the easymenu library for creation of
popup and menubar menus.
* cc-menus.el:
Conversion to the easymenu library for creation of popup and menubar
menus.
* cc-mode.el (c-emacs-features): Make this work for Emacsen after
19.34.
Fri May 30 15:38:09 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-emacs-features):
Change the XEmacs 19 test from vectorp to arrayp,
since we're using aref to access an element. Use this test also
for Emacs 19, with a few key differences: the element returned in
Emacs 19 is a cons cell. Also, arrayp doesn't return t for
char-tables in Emacs 19.34, but will in Emacs 19.35.
Tue May 27 21:23:51 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-engine.el (c-guess-basic-syntax):
CASE 5C.3: changing looking-at regexp to
throws[ \t\n]
CASE 15E: if we're in Java and looking at the throws clause that
follows a method's parameter list, we need to go back to the beginning
of the statement to find the start of the method.
Fri May 23 14:58:30 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Beta Release 5.07
* cc-vars.el: Added a require of the custom library, for Emacs
19.34 compatibility.
Thu May 22 22:53:25 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi:
Document the new default for c-style-variables-are-local-p. This
variable is now nil by default.
* cc-styles.el (c-make-styles-buffer-local):
New function. By default all style
variables are now global in value. Call this function to make them
buffer local. This function is called automatically at load time if
c-style-variables-are-local-p is non-nil.
* cc-vars.el (c-style-variables-are-local-p): Default value is now nil.
Tue May 20 23:59:19 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-menus.el (c-popup-menu): Obsolete.
(c-mode-menu): Optional argument to add " Mode Commands" to the
title, in XEmacs only.
* cc-langs.el (c-common-init):
Get rid of the pre-XEmacs-19.10 way of doing popup
menus. Make sure that in XEmacs, the menubar title is just the
modename, but the popup has "MODENAME Mode Commands".
Tue May 13 22:57:24 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-align.el (c-lineup-C-comments):
Fixes to handle all situations where the first line of a block
comment has more stars on it than subsequent lines. This not only
picks up the Javadoc style, but also
/*********************************************************************
* Routines formerly in objectPalette.c
*********************************************************************/
* cc-engine.el (c-guess-basic-syntax):
CASE 6A: Removed tests for ObjC & Java method
closing parens since none of the test cases touched this code, and it
broke close-paren on a separate line being recognized as
arglist-close.
* cc-langs.el:
Removed most byte-compiler warnings by removing many obsolete
variables.
Fri May 9 21:54:27 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-cmds.el (c-fill-paragraph):
Included franl@world.std.com (Francis Litterio)
patch that makes c-fill-paragraph preserve fill-prefix.
* cc-engine.el (c-guess-basic-syntax):
CASE 6C: when checking for a `for' statement,
watch out for underscore separated symbols: for_each
Tue May 6 23:18:13 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Restructuring completed for version 5.xx
Tue May 6 19:16:48 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-style-alist, c-set-style-1): Added support for
inherited styles.
* Restructuring began for version 5.00
Sat Mar 29 20:01:42 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Public Release 4.389.
Fri Mar 28 16:48:31 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 5C: watch out for Java abstract method
definitions. These are distinguished from normal throws clauses since
they cross statement boundaries.
Tue Mar 25 03:19:17 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax): CASE 5A.3: use boi instead of bol.
Thu Mar 20 16:46:13 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-Java-comment-start-regexp):
Recognize the three Java styles of
comments: 1) traditional C block; 2) javadoc style /** ...; 3) C++
style.
(java-mode): Set buffer local variable c-comment-start-regexp to
c-Java-comment-start-regexp.
(c-fill-paragraph): Use c-comment-start-regexp derived regular
expression when checking for c-hanging-comment-starter-p, so javadoc
styles are handled correctly in Java mode.
* cc-mode.el (c-lineup-C-comments):
Change the re-search-forward to a looking-at in
the innermost test. This catches these styles of comments:
/* Test for garbage collection. If the pool's free size is greater thaasds asdf
asdf asdf asdf asdf asd fas fa asdf asf asdf asdf adf asdf asdf asdf asdf
asdf glob chob stillp nasty toes winko stagilly frankly sut sut hoey */
=!=
* cc-mode.el (c-add-syntax):
Move macro definition to before it's first use.
* cc-mode.el (c-submit-bug-report):
capture buffer local variable values which are
printed in the post-hook, while the current buffer is the CC Mode
buffer we're interested in. reporter-submit-bug-report leaves the
current buffer as the mail buffer, so buffer local variables will not
get the proper value.
Tue Mar 18 16:43:13 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-inher-key):
Require the regexp group that contains the `:'.
Previously it was optional, but that broke other code.
Sun Mar 16 16:17:57 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-fill-paragraph):
Do not set fill-prefix to "*" when looking-at
"*/", otherwise the following example does not fill properly (the last
start gets deleted).
/* this is a comment
*/
Mon Mar 10 16:25:49 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-C-comments):
Handle more cases, especially when comment
lines aren't prefixed with stars.
Sun Mar 9 20:09:16 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Public Release 4.379.
Mon Mar 10 01:04:38 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-C-comments):
Handle more cases, especially when comment
lines aren't prefixed with stars.
Sat Mar 8 00:36:55 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-Java-class-key):
optional space after protection key should be
inside first paren group.
Fri Feb 28 18:12:02 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-functionp, c-copy-tree):
Better compatibility checks between XEmacs
and Emacs.
(c-mapcar-defun): Obsolete.
Mon Feb 24 22:49:43 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 5B.1: watch out for throw() clauses which
could follow a member init list in a constructor.
Thu Feb 20 19:32:20 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-submit-bug-report):
Display c-indentation-style, but not in the
setq.
* cc-mode.el (c-Java-special-key):
New variable recognizes Java "implements",
"extends", and "throws" keywords.
(c-guess-basic-syntax): CASE 5C: recognize Java constructs
"implements", "extends", and "throws"; CASE 5C.3: differentiate
between "throws" == func-decl-cont, and "implements" or "extends" ==
inher-intro or inher-cont; CASE 5D.3: removed; CASE 5D.4 => 5D.3;
CASE 5D.5 => CASE 5D.4; CASE 5D.6 => CASE 5D.5; CASE 5K: don't need to
look for Java keywords.
(c-lineup-java-inher): Better indentation calculation for Java
inheritance constructs.
Wed Feb 19 23:29:00 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Beta Release 4.372.
Thu Feb 20 04:07:11 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-Java-special-key, c-guess-basic-syntax,
c-lineup-java-inher): Recognize Java "extends", "implements", and
"throws" clauses and map them into 'inher-intro, 'inher-cont, and
'func-decl-cont syntactic symbols. Do the indentation as
of Java inheritance lines better.
Tue Feb 18 03:31:57 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi: Change documentation to reflect syntactic symbol
change from 'ansi-funcdecl-cont to 'func-decl-cont.
* cc-mode.el (c-offsets-alist): Changed the syntactic symbol
'ansi-funcdecl-cont to 'func-decl-cont. This symbol is useful in
Java throws declarations.
(c-lineup-java-inher): New function for lining up "implements"
continuations (i.e. inheritance in Java).
(c-style-alist): In "java" style, set 'inher-cont to
c-lineup-java-inher.
(c-Java-class-key): Optional c-protection-key can appear before the
"class" keyword.
Thu Feb 13 21:39:38 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-beginning-of-statement-1): First, check for bare
semi-colon, which is a legal statement but not caught by the more
intense loop later on.
* cc-mode.el (c-style-alist): Fixes to "ellemtel" style given by
Colin Rafferty <craffert@spspme.ml.com>.
* cc-mode.el (c-beginning-of-statement): Don't use
forward-sentence when looking at a C block comment start.
c-beginning-of-statement-1 will do the right thing.
Sun Feb 9 07:28:42 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax): CASE 5C: watch for scope operators
* cc-mode.el (c-lineup-C-comments): Watch out for no leading stars.
Thu Feb 6 19:07:09 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi: Document that c-set-style is bound to `C-c .'
* cc-mode.el (c-set-style): Add initial contents (the value of
c-indentation-style), and history on the style name.
(c-mode-map): Bind c-set-style on `C-c .'
* cc-mode.el (c-read-offset, c-read-offset-history): Use
completing-read, with REQUIRE-MATCH nil, so that offsets can be
completed when they are function names. Also implement read
history.
* cc-mode.el (c-guess-basic-syntax): CASE 15D: fix infinite loop
problem in while... clause looking for statement starting at boi,
when using run-in statement styles.
* cc-mode.el (cc-imenu-java-generic-expression): New variable for
integration of java-mode with imenu.
(java-mode): Use cc-imenu-java-generic-expression.
* cc-mode.texi: Describe the use of c-hanging-comment-starter-p and
c-hanging-comment-ender-p, as well as the fill-paragraph command. In
the known bugs section, do not recommend using filladapt.
Wed Feb 5 23:50:52 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-hanging-comment-starter-p): New variable,
analogous to c-hanging-comment-ender-p.
(c-fill-paragraph): Use c-hanging-comment-starter-p.
Mon Feb 3 16:36:03 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi: Added a note about c-Java-defun-prompt-regexp in
the section on performance.
* cc-mode.el (java-mode): Do not set defun-prompt-regexp to
c-Java-defun-prompt-regexp. In the following example, putting
point on he brace that opens main() and hitting M-C-a will send
both Emacs 19.34 and XEmacs 19.15 into tight CPU loops.
-------------------- snip snip --------------------
import java.io.*;
import java.lang.*;
class foo
{
public static void main(String[] args) throws java.io.IOException, java.io.FileNotFoundException
{
FileInputStream bs = new FileInputStream("j.dat");
System.out.println(bs.readLine());
}
}
Sun Feb 2 18:11:17 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 2: relpos for 'c and 'c++ is now boi.
Mon Jan 27 18:55:02 1997 Barry A. Warsaw <cc-mode-help@python.org>
* Public Release 4.353
Mon Jan 27 16:25:57 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 15D: do not assume that boi of previous
statement is the beginning of a statement.
Wed Jan 22 23:42:59 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el:
Removed the require of imenu. This currently breaks in XEmacs if you
have imenu around (which hasn't been completely ported yet), and I
think it's no longer necessary for Emacs.
Tue Jan 21 20:47:23 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-cleanup-list, c-electric-brace):
New clean-up option: brace-elseif-brace.
* cc-mode.el (c-style-variables-are-local-p):
New variable which controls whether
indentation style variable are buffer local are not. By default, for
backwards compatibility, this variable is t.
Tue Jan 7 23:53:43 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-Java-access-key):
set to nil since Java doesn't have C++-like
access labels.
Mon Jan 6 23:03:21 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.texi: Document new built-in styles.
* cc-mode.el (c-style-alist): Added "python" style.
Thu Jan 2 21:13:52 1997 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-mode-menu): New function
(c-popup-menu, c-common-init): use new function to handle XEmacs menus
better (uses add-submenu where appropriate).
Tue Dec 24 18:55:10 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-C-comments):
A much better implementation that handles all
common star-prefixed block comment styles (see below).
(c-block-comments-indent-p): obsolete and removed.
int main()
{
/*
*
*/
/*
**
**
*/
/**
**
**
**/
/***
***
***
***
***/
/**
***
***
**/
}
* cc-mode.el (c-indentation-style):
take default value from c-site-default-style.
Mon Dec 23 23:48:26 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (adaptive-fill-regexp):
For all but XEmacs 19.13, the default should
be nil.
Thu Dec 19 21:10:35 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-emacs-features): detect Infodock.
(c-common-init, c-mode-map): Don't install menus for Infodock.
* cc-mode.el (c-indent-exp):
fixed infinite loop when multi-line C comment is last
thing in buffer.
(c-guess-basic-offset): fixed error when K&R C-like macro is first
non-syntactic whitespace in file.
* cc-mode.el (c-C++-comment-start-regexp):
use a more efficient representation.
Tue Dec 10 20:32:21 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-buffer-style): New variable.
Fri Oct 4 19:10:15 1996 Barry A. Warsaw <cc-mode-help@python.org>
* Public Release 4.322
Fri Oct 4 20:28:14 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-backslash-region):
If a line ends at the end of the region, always
delete backslash from it.
Given by Richard Stallman <rms@ethanol.gnu.ai.mit.edu> 1996-08-31
(c-backslash-region): In XEmacs, keep region active.
* cc-mode.el (c-mode-map):
Install FSF mode menu into menubar using the name
"CC-Mode" for all supported modes.
(c++-mode-map, objc-mode-map, java-mode-map): Don't install an
additional FSF menu.
* cc-mode.el:
Removed the following variables from the built-in "cc-mode" style:
c-echo-syntactic-information-p
c-string-syntax-p
c-tab-always-indent
c-inhibit-startup-warnings-p
These control how the mode acts, not how code looks.
Mon Sep 30 22:24:48 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-indent-command):
Sync docstring with texinfo documentation, and
actual behavior.
Thu Sep 19 18:13:13 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-style-alist):
Added "linux" style.
Tue Aug 20 21:08:13 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-comment): preserve comment-column.
Mon Aug 19 22:24:41 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-gnu-impose-minimum):
Don't impose minimum on comment-only lines.
Tue Aug 6 21:11:39 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-mark-function): Moved to C-c C-m
(c-show-syntactic-information): Optional universal argument inserts
analysis as a comment on the line.
Fri Jul 5 23:57:19 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-insert-tab-function):
New variable allowing tab-to-tab-stop to be
used instead of insert-tab.
(c-indent-command): Use c-insert-tab-function variable.
Fri Jun 7 14:31:47 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (java-mode): Use (c-set-style "java"); i.e. lowercase.
* cc-mode.el (c-functionp):
Emacs 19.3x doesn't have functionp, so lift the version
from XEmacs 19.13.
(c-electric-brace, c-read-offset, c-set-offset, c-get-offset): Use
c-functionp.
Fri May 31 14:42:07 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-offsets-alist): New syntactic symbols:
extern-lang-open, extern-lang-close, inextern-lang
(c-hanging-braces-alist): Hang extern-lang-open by default.
(c-electric-brace): Add extern-lang-open and extern-lang-close to
list of symbols that can hang.
(c-guess-basic-syntax): CASE 5A.4 => 5A.5; New CASE 5A.4 added to
recognize extern-lang-open; CASE 14C => 14D; New CASE 14C added to
recognize extern-lang-close
(c-recognize-knr-p): defconst it.
(c-search-uplist-for-classkey): When searching for c-class-key,
concat "\\|extern[^_]". The logic for determining whether we are
inclass-p and inextern-p is essentially the same so this seems to
work very well in all test cases.
(c-guess-basic-syntax): If inclass-p, do an additional check to
see whether this is really inside an external language definition
block or a class definition and set inextern-p accordingly (a
boolean only).
(c-guess-basic-syntax): CASE 5A.4 => 5A.1; 5A.1-5A.3 => 5A.2-5A.4;
New CASE 5F to check for extern-lang-close; CASE 5F-5J => 5G-5K;
CASE 5I: modifier could either be 'inclass or inextern-lang; CASE
14A: closing brace isn't an inline-close if we're inside an extern
language block; CASE 14B: watch out for same.
Thu May 30 14:42:07 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax): CASE 5A.3: an inline-open
brace should also be given inclass syntax. The problem is that
this breaks indentation for brace that start inline-inclass
functions inside a nested class since they will twice add the
indentation of the inner class to the running total.
The solution is to not give one of the two symbols a relpos. The
decision was made to omit the relpos of the 'inline-open symbol.
(c-mode-help-address): Added cc-mode-help@python.org as the new
address.
(c-recognize-knr-p, c++-mode, java-mode): Made into a non-user
configurable variable. This variable is always t for C and
Objective-C modes and nil for C++ and Java modes.
(c-guess-basic-syntax): CASE 5G: Although we still test on
c-recognize-knr-p, this is no longer user configurable, and no
longer imposes potentially disasterous impact on performance.
Adopt c-mode.el assumption that argdecls are indented at least one
space and that function headers are not indented. This prevents
us from potentially searching back to the top of the file when
looking at a large number of top-level delarations.
(c-gnu-impose-minimum): New function
(c-label-minimum-indentation): New buffer-local variable
(c-style-alist): In "gnu" style, add c-gnu-impose-minimum to
c-special-indent-hook so case-label and label syntaxes will have a
minimum indentation.
(c-submit-bug-report): report on c-label-minimum-indentation
(c-set-style-1): special case c-special-indent-hook
make c-special-indent-hook buffer local
Wed May 29 20:13:34 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-skip-conditional): `try' clauses in C++ skip only
1 sexp. Also take care of finally and synchronized statements.
Fri May 24 15:30:27 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-arglist-close-under-parent): New function.
(c-C-conditionals): New constant.
(c-C-conditional-key, c-C++-conditional-key, c-Java-conditional-key):
Use c-C-conditionals.
(c-Java-conditional-key): Added support for "synchronized" keyword.
Fri May 3 22:03:13 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-Java-conditional-key): New variable.
(java-mode): Set buffer-local variable c-conditional-key to
c-Java-conditional-key.
Thu May 2 21:18:56 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-C++-access-key): Allow for whitespace between the
protection key and the colon.
Wed Apr 10 04:50:50 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-set-style): as a last resort, match exact case for
stylename.
Wed Apr 3 16:19:08 1996 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-get-offset, c-read-offset, c-set-offset): Use
functionp instead of fboundp to test for OFFSET being a function.
This makes the documentation more accurate and allows for
lambda expressions to be used as offsets, instead of allowing
only symbols with function bindings.
Mon Apr 1 16:12:27 1996 Barry A. Warsaw <cc-mode-help@python.org>
* Public Release 4.282
Tue Feb 6 22:35:36 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-common-init): typo
Mon Feb 5 15:54:08 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c++-mode-map, objc-mode-map, java-mode-map):
In XEmacs, use set-keymap-parents if it is fboundp.
* cc-mode.el (c-delete-backslash):
Sync with old-c-mode.el. Given by Ben Wing <wing@666.com>.
Mon Jan 22 23:25:21 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el: Added back autoload cookies.
* cc-mode.el (c-emacs-features):
Determine which paragraph filling regexp suite to use based on the
Emacs version number.
(c-fill-paragraph): Use the paragraph filling regexp suite as
determined in c-emacs-features.
Fri Jan 19 18:57:01 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el:
imenu is required in Emacs 19, but doesn't exist in XEmacs
* cc-mode.el (c-site-default-style): New variable.
Thu Jan 18 23:51:17 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el:
(java-mode, java-syntax-table, java-mode-map, java-mode-abbrev-table):
New in support of Java.
Tue Jan 16 00:09:41 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-common-init): Make comment-multi-line a local variable.
Mon Jan 15 23:56:06 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-set-style):
Conditional up-casing of stylename for backwards compatibility.
Fri Jan 12 02:07:54 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-backward-to-start-of-do):
Eliminate infinite loop in perverse cases.
* cc-mode.texi: Explain that style names are case insensitive.
* cc-mode.el (c-style-alist, c-set-style, c-add-style):
All style names are case insensitive, but default to lowercase.
Sat Jan 6 01:08:45 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (cc-imenu-c++-generic-expression):
New variable. Integrated w/ FSF changes.
(cc-imenu-c-generic-expression): New variable. Integrated w/ FSF
changes.
(c++-mode): Set imenu-generic-expression. Integrated w/ FSF changes.
(c-mode): Set imenu-generic-expression. Integrated w/ FSF changes.
(c-common-init): Make imenu-generic-expression buffer local.
* cc-mode.el (c-progress-fini):
Integrate RMS change: Fix "done" message.
* cc-mode.el (c-electric-lt-gt): New command.
* cc-mode.el (c-mode-map):
Only rebind M-q if fill-paragraph-function doesn't exist, as in
pre-Emacs 19.30. Integrated with FSF changes.
(c-common-init): Set fill-paragraph-function if it exists.
Integrated with FSF changes.
(c-fill-paragraph): Return t if did special filling. Otherwise
return nil and don't change the buffer. Integrate with FSF changes
for Emacs 19.30.
* cc-mode.el: Switch to GNU style only the first time file is loaded.
* cc-mode.el (c-guess-basic-syntax):
CASE 5B.3: ansi-funcdecl-cont could include legal C++ `throw'
declaration.
(c-offsets-alist): ansi-funcdecl-cont => +
Fri Jan 5 23:14:12 1996 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-beginning-of-statement-1):
Restore old CASE 3 logic -- checking for at a c-conditional-key.
(c-guess-basic-syntax): CASE 5A.2: watch out for enum function
return types. CASE 15D: check for landing on a brace that opens a
nested function.
Wed Nov 22 14:55:12 1995 Barry Warsaw <cc-mode-help@python.org>
* (c-beginning-of-statement-1): CASE 3, can't just return t at
end of let clause since this will break arglist-cont-nonempty
lines (see buggy line below). Doing a backward-up-list could
be slow, but I don't see any other way of doing this.
void
C_entries (c_ext, inf)
int c_ext; /* extension of C */
FILE *inf; /* input file */
{
/* Consider token only if some complicated conditions... */
if ((definedef != dnone
|| (cblev == 0 && structdef != scolonseen)
|| (cblev == 1 && structdef == sinbody)) /* buggy line */
&& typdef != tignore
&& definedef != dignorerest
&& funcdef != finlist)
{
}
}
Fri Nov 17 22:01:36 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-offset, c-beginning-of-statement-1):
Do not check for c-conditional-key when skipping backwards over
statements that look sort of like conditionals. This makes
statements following nested functions indent correctly. CASE 9B.3
(unknown catchall) now gets triggered by the brace that opens a
nested function. These will get indented moderately correctly,
but they are not assigned the correct syntax. I'm not sure
exactly what they *should* be assigned. Also, this changes the
relpos for top-level defun-open braces, but that will be very hard
to fix, and it may break backward compatibility.
* cc-mode.el (c-guess-basic-offset):
CASE 5H, inclass relpos should be relative to boi of the open
brace, not the beginning of the class keyword.
Thu Nov 16 00:20:59 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 5D.5, watch out for c-access-key set to nil, as in this case
(in c-mode):
typedef struct {
unsigned count:24,
age:6,
dirty:1,
reserved:1,
};
Wed Nov 15 23:38:05 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-beginning-of-statement, c-end-of-statement):
Watch out for c-end-of-statement being called interactively.
Mon Aug 28 20:39:43 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-guess.el (cc-guess-region):
wrap relpos calculation in a save-excursion.
Mon Aug 28 16:57:26 1995 Barry Warsaw <cc-mode-help@python.org>
* Version 4.241 released.
Mon Aug 21 23:41:21 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-backslashify-current-line): Obsolete.
(c-append-backslash, c-delete-backslash): Taken from XEmacs'
old-c-mode.el
(c-backslash-region): Use the version from XEmacs' old-c-mode.el
since it does a better job of aligning the backslashes.
* cc-mode.el (c-indent-defun): Watch out for point being on the
first top-level open brace in the buffer.
Tue Aug 1 22:14:32 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-copy-tree, c-mapcar-defun): Define functions only
available in XEmacs 19.12, or Emacs 19 + lucid.el.
Tue Jul 25 22:27:37 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-ObjC-method-call): New implementation
better handles 1. indentation of arguments to keyword parameters,
2. multiline method calls.
Fri Jul 21 22:08:04 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.texi (Customizing Indentation): Added a better
explanation of the difference between setq and setq-default
w.r.t. setting cc-mode indentation variables.
Thu Jul 20 20:19:33 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace): Fixed preservation of
no-whitespace before brace.
* cc-mode.el (c-guess-basic-syntax): CASE 5A.1: Watch out for
c-state-cache; it may or may not be in place, but it should be
ignored.
* cc-mode.el (c-electric-colon): In call to c-lookup-lists, fixed
incorrect quoting of symbols in the quoted list.
Mon Jul 10 15:44:55 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-search-uplist-for-classkey): Watch out for
embedded c-class-key keywords.
Mon Jul 3 18:05:33 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-common-init): Make a deep copy of c-offsets-alist
so that changing the buffer-local value in one buffer doesn't
affect the global value, or other buffers.
* cc-mode.el (c-snug-do-while): forward-sexp call could fail;
wrap it in a c-safe.
Fri Jun 30 21:42:23 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c++-mode, objc-mode): comment-multi-line must be nil
if // is the default comment style.
Sun Jun 11 18:05:20 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode-18.el (c-emacs18-bsws): Installed while loop patch given
by "David P. Baker" <dpb@isr.harvard.edu> to fix infinite loops
when lim is reached while still inside whitespace.
Sun Jun 11 16:58:39 1995 Barry A. Warsaw <cc-mode-help@python.org>
* Version 4.222 Released.
Sun Jun 11 18:05:20 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode-18.el (c-emacs18-bsws):
installed while loop patch given by "David P. Baker"
<dpb@isr.harvard.edu> to fix infinite loops when lim is reached while
still inside whitespace.
Thu Jun 1 16:51:16 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-hack-state): watch out for null state with 'open brace.
Tue May 30 23:11:57 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-outline-level): new function.
(c-common-init): compatibility with outline-minor-mode. Given by Per
Abrahamsen <abraham@iesd.auc.dk>
Fri May 19 00:15:06 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-colon):
when adding a newline for a non- `before' -hanging
colon, watch out for when they already start on their own line.
Thu May 18 23:49:51 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (paragraph-start, paragraph-separate): backed out of the
4.191 -> 4.192 change due to breakage in c-fill-paragraph
and dabbrev-expand.
Wed May 17 22:51:46 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 5C: more robust in searching for c-baseclass-key when not
followed by a colon.
* cc-mode.el (c-enable-//-in-c-mode, c-setup-dual-comments):
new functions to allow users to optionally enable // as comment
delimiters in c-mode.
(c-C-comment-start, c-C++-comment-start): new variables.
(c-mode, c++-mode, objc-mode): use new variables.
* cc-mode.el (c-guess-basic-syntax):
CASE 5D.4: watch out for <> characters in literals. CASE 5D.5:
skip forward over any literals encountered after point.
Mon May 8 23:11:35 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-set-style):
Ignore case in completion. Use appropriate mode name in prompt
string.
* cc-mode.el (c-in-literal):
Faster implementation for skipping over cpp macros, at the expense
of prohibiting `#' characters as first non-whitespace char on a
line inside another literal (i.e. string or block comment).
Wed May 3 22:52:32 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-read-offset): change to have an interface consistent w/
switch-to-buffer
Mon May 1 20:31:13 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-style-alist):
fixed the 'label offset for GNU, K&R, BSD, Stroustrup, and
Whitesmith.
Sat Apr 29 00:46:53 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-mode-map):
C-c C-v unbound since it conflicts with OOBR, which has a more
useful binding.
Mon Apr 17 16:48:06 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-lineup-ObjC-method-call): Installed Lele Gaifax
<lele@nautilus.eclipse.it> patch as suggested by
mccallum@cs.rochester.edu for Objective-C method call indentation
styles.
Wed Apr 12 21:02:46 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (paragraph-start, paragraph-separate):
Installed the FSF's patch as explained below:
Thu Mar 2 10:22:30 1995 Boris Goldowsky <boris@spiff.gnu.ai.mit.edu>
* ada.el (ada-mode): Remove "^" used as anchor from
paragraph-start and paragraph-separate values, so that they will
work with non-0 left-margin settings.
[...]
* cc-mode.el (c-common-init, c-fill-paragraph): Likewise.
* cc-mode.el (c-hanging-semi&comma-criteria): new variable
(c-semi&comma-inside-parenlist): new function
(c-electric-semi&comma): use new variable
c-hanging-semi&comma-criteria to determine if a newline should be
added after a semicolon or comma, instead of hardcoding this logic in.
Mon Apr 10 22:00:28 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
When hanging a close brace, add just-one-space if there was
already whitespace before point.
Fri Mar 31 01:15:07 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-offsets-alist, c-read-offset, c-set-offset,
c-get-offset): added two new offset shortcuts, '* and '/ which
stand for *0.5 and *-0.5 respectively.
* cc-mode.el (c-beginning-of-statement-1):
added a new CASE 4 to catch labels just above the current line.
Thu Mar 30 19:00:02 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-protection-key, c-symbol-key): had to move these before
c-baseclass-key which uses them.
Wed Mar 29 23:11:57 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el:
(c-baseclass-key, c-mode, c++-mode, objc-mode, c-guess-basic-syntax):
This can be nil in all modes other than c++-mode. Make this variable
buffer local and it saves one looking-at call in the
c-guess-basic-syntax tight loop.
Mon Mar 27 23:18:30 1995 Barry A. Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-recognize-knr-p): default value is nil for all modes.
Wed Mar 22 16:45:53 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el:
CC-MODE style has to make a deeper copy of non-atomic lists
* cc-mode.el: set "GNU" style just after creating the CC-MODE style
* cc-mode.el:
added c-recognize-knr-p and c-hanging-comment-ender-p variables to
"CC-MODE".
* cc-mode.el (c-C++-friend-key): new constant
(c-guess-basic-syntax): use c-C++-friend-key to find friend
declarations. Note that template class friends don't start with the
word "friend".
* cc-mode.el (c-indent-region):
wrap a backward-sexp call in a c-safe to avoid bogus error
conditions.
Mon Mar 20 23:58:32 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el:
Only add the "CC-MODE" style and set the "GNU" style on the first load
of cc-mode.el (not (featurep 'cc-mode)).
(c-guess-basic-syntax): skip over case/default labels before skipping
over other labels.
* cc-mode.el (c-style-alist, c-set-style):
"Default" style is renamed to "CC-MODE" style so as not to confuse
matters (too much).
* cc-mode.el (c-indent-comments-syntactically-p): new variable
(c-comment-indent): use c-indent-comments-syntactically-p instead of
comment-column==nil to control M-; acting like TAB. The latter
behavior was too broken to work correctly.
Mon Mar 13 22:09:46 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-mode): setq comment-multi-line to t.
* cc-mode.el (c-common-init):
(c-set-style "GNU") moved out of this defun and into the top level
of cc-mode.el. This is pushed down towards the bottom of the
file, to just after the calculation of the "Default" style. Also,
the style variables are not made buffer local until after this
call. Seems kludgy that its all order dependent, but it addresses
the problem of setq-default at the .emacs top level not doing the
expected thing.
Thu Mar 9 21:31:28 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax): CASE 5J: Watch out for
c-beginning-of-statement-1 leaving us at bob with a following comment.
* cc-mode.el (c-comment-indent):
When comment-column is nil, indent according to c-offsets-alist,
i.e. behavior is identical to hitting TAB.
* cc-mode.el (c-guess-basic-offset):
CASE 5D.5: skip over any access specifiers found if inclass-p.
CASE 5D.1: looking at a hanging member init colon only if not
attached to an access specifier.
* cc-mode.el (c-guess-basic-syntax, c-lineup-comment):
TAB should always indent comment-only lines according to
c-offsets-alist. It should never pin comments appearing at
comment-column. Use M-; for that.
* cc-mode.el (c-common-init): Default mode is now GNU
* cc-mode.el (c-styles-alist): Mention the Default style.
* cc-mode.el (c-offsets-alist-default): obsolete
(c-offsets-alist): now contains default values. These will always be
captured in the "Default" style and all styles now inherit from
"Default".
(c-offsets-alist, c-basic-offset, c-comment-only-line-offset,
c-block-comments-indent-p, c-cleanup-list c-hanging-braces-alist,
c-hanging-colons-alist, c-hanging-comment-ender-p,
c-backslash-column): All variables are now buffer-local.
(c-set-style-1): new function
(c-set-style): 1. removed &optional local argument -- use
make-variable-buffer-local instead if buffer local style settings are
desired; 2. Reset the style to "Default" before instituting the new
style. This means all styles derive from the "Default" style.
Sat Mar 4 00:41:01 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-comment-only-line-offset):
Fixed the docstring to follow current semantics of the variable.
(c-style-alist): Fixed GNU style for c-comment-only-line-offset to
'(0 . 0) so that column zero comments will not anchor.
* cc-mode.el:
Moved the setup of the "Default" style to further down in the file.
Also, this uses the new c-add-style API.
* cc-mode.el (c-add-style):
Added set-p flag for optional setting of the style.
* cc-mode.el (c-conditional-key, c-class-key, c-comment-start-regexp):
setq-default their values to the `C' values so that
non-cc-mode-ized modes that rely on BOCM behavior still work
(e.g. awk-mode).
Wed Mar 1 21:30:56 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-add-style): New command.
* cc-mode.el (c-backward-to-start-of-if):
better error message for orphaned else
error. It now prints the line number of the orphaned else.
* cc-mode.el:
added pending-delete and delete-selection properties for proper
co-operation with pending-del and delsel modes.
Thu Feb 16 01:38:27 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-hack-state):
it is legal for cdr to be nil when 'close brace is
encountered. Do we need the (consp car) test???
(c-guess-basic-syntax): CASE 5H: Removed the test for preceding-char =
to ?:. This fixes two problems. First, in objc-mode, there is no
colon after access specifiers. Also, some people might use macros for
PRIVATE and PROTECTED, and these also don't have trailing colons.
Wed Feb 15 15:38:37 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
when ACTION is a function, the second argument is
the buffer position the brace was inserted, regardless of any
implementation details (i.e. may not be the same as where the brace
actually resides during the callout).
(c-hanging-braces-alist): update docstring to new callout semantics.
Tue Feb 14 19:54:50 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-beginning-of-statement-1):
when looking for an else-if clause,
watch out for #else gotchas.
Mon Feb 13 23:14:51 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 5D.3: syntactic symbol should be
'inher-cont instead of 'inher-cont-1.
Wed Feb 8 22:52:15 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
In punt section, nil out the syntax cache too,
since its out-of-date.
Tue Feb 7 17:38:42 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
When hanging the brace, figure out when to punt
and recalculate the entire state.
Mon Feb 6 17:07:45 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-whack-state): New function.
(c-electric-brace): use c-whack-state to adjust state when inserting
hanging closing braces.
Thu Feb 2 16:49:21 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-adjust-state): New function
(c-electric-brace): make sure state is adjusted when preceding lines
are re-indented via c-indent-line.
Mon Jan 30 16:49:10 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-safe-position):
takes a buffer position and a state list since it
must determine a safe position farther up the buffer than the give
buffer position.
(c-electric-brace): use new c-safe-position call sequence
(c-guess-basic-syntax): CASE 14: when finding relpos, and calling
c-b-o-s-1, lim must be higher in buffer than containing-sexp, so call
c-safe-position to find this position.
Wed Jan 18 15:47:11 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
When c-auto-newline is nil, no newlines or
re-indentation is performed.
* cc-mode.el (c-guess-basic-syntax):
CASE 9D: after-cond-placeholder can be nil,
tripping up (max ...).
Tue Jan 17 14:52:02 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax): CASE 15D: safepos should be
c-most-enclosing-brace of fullstate. This could potentially be
slower, but it is accurate.
* cc-mode.el (c-guess-basic-syntax):
CASE 15F: Watch out for lim == point. In that
case, use (c-safe-position state) as the most enclosing known safe
buffer position.
Mon Jan 16 23:55:43 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax): CASE 9D: Kludged fix for
c-beginning-of-statement-1 possibly leaving us at a buffer position
before lim `after-cond-placeholder'. c-b-o-s-1 should be fixed, but
I'm worried about side-effects at this point. It will be fixed in v5.
* cc-mode.el (c-crosses-statement-barrier-p):
Do not reset lim if, after skipping
characters, point is inside a literal. Point in a literal, is not
considered safe.
Wed Jan 4 23:57:11 1995 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-snug-do-while):
Watch out for non-hanging open brace on `do'.
* cc-mode.el (c-electric-brace):
In (memq 'before newlines) clause, when updating
the c-state-cache, point can be <= the (car of c-state-cache) for us
to strip out the most enclosing brace.
* cc-mode.el (c-electric-delete):
Added delete-selection and pending-delete
'supersede properties for proper "delete-erases-current-selection"
behavior.
Wed Dec 28 16:05:02 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-indent-exp):
Don't try to call c-progress-fini if c-progress-init
was never called (i.e. due to error having been signaled).
Wed Dec 21 00:28:24 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
If the temporary newline must be deleted (because
it hangs), use delete-indentation instead of the delete-region
hackery.
* cc-mode.el (c-snug-do-while): New function.
(c-hanging-braces-alist, c-cleanup-list, c-electric-semi&comma): To
eliminate the newline between the brace that closes a `do' block and
the following `while', make the c-hanging-braces-alist ACTION for
'block-close be 'c-snug-do-while by default. There is no more need
for the 'snug-do-while cleanup.
Tue Dec 20 23:51:52 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-electric-brace):
In updating the cache during the 'before section,
watch out for c-state-cache being nil.
* cc-mode.el (c-electric-brace): Implement new semantics for
c-hanging-braces-alist. Also, fix state cache during re-indentation
of preceding line when 'before newline is added.
Mon Dec 19 23:30:47 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-intersect-lists, c-lookup-lists): New functions.
(c-electric-brace, c-electric-colon): Use the new functions to
simplify the flow of logic in determining hanginess.
* cc-mode.el (c-hack-state):
When adding a close brace, watch out for balanced
block sitting on list in car of cdr position.
* cc-mode.el (c-electric-semi&comma):
Some minimal efficiency additions by
including a backscan limit.
* cc-mode.el (c-electric-semi&comma, c-cleanup-list):
Added a new clean-up:
snug-do-while which will snuggle the `while' of a do-while up to after
the closing brace.
* cc-mode.el (c-lineup-objc-method-args,
c-lineup-objc-method-call, c-offsets-alist-default,
c-beginning-of-statement-1, c-guess-basic-syntax):
Jumbo Lele Gaifax Objective-C patch.
Fri Dec 16 15:41:05 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-guess-basic-syntax):
CASE 10: watch out for false else clauses
(e.g. else_thing).
Wed Dec 14 23:11:59 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-postprocess-file-styles):
Renamed from c-find-file-hook. Hang this
off of hack-local-variables-hooks, which won't be supported until
future Emacs 19's.
Tue Dec 13 23:58:48 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-beginning-of-statement-1): Watch out for lim!
* cc-mode.el (c-hack-state, c-safe-position): New functions.
(c-electric-brace, c-parse-state, c-inside-brace-list-p,
c-guess-basic-syntax): Implemented two major performance enhancements
used both in general, but also specifically during brace insertion.
First, call c-beginning-of-statement-1 directly instead of wasting
time in the user-command version. Second, and most importantly,
implement a c-parse-state cache so that the brace state for a
particular line doesn't have to be completely recalculated 4 times for
every brace insertion.
Mon Dec 12 20:20:49 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-inside-bracelist-p):
Fixed aggregate logic w.r.t. failures in
forward-sexp.
* cc-mode.el (c-inside-bracelist-p):
Order of magnitude improvement in performance
by eliminating often costly calls to c-backward-syntactic-ws.
Fri Dec 9 23:39:31 1994 Barry Warsaw <cc-mode-help@python.org>
* cc-mode.el (c-inside-bracelist-p):
Special case speed up for when most enclosing
brace of brace-state is nil.
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
Local Variables:
add-log-mailing-address: "bug-cc-mode@gnu.org"
End: