1 2016-02-08 Norbert Koch <viteno@xemacs.org>
3 * Makefile (VERSION): XEmacs package 1.98 released.
5 2016-01-25 Norbert Koch <viteno@xemacs.org>
7 * Makefile (VERSION): XEmacs package 1.97 released.
9 2016-01-16 Norbert Koch <viteno@xemacs.org>
11 * Makefile (VERSION): XEmacs package 1.96 released.
13 2016-01-13 Norbert Koch <viteno@xemacs.org>
15 * Makefile (VERSION): XEmacs package 1.95 released.
17 2016-01-11 Norbert Koch <viteno@xemacs.org>
19 * Makefile (VERSION): XEmacs package 1.94 released.
21 2016-01-05 Norbert Koch <viteno@xemacs.org>
23 * Makefile (VERSION): XEmacs package 1.93 released.
25 2016-01-04 Norbert Koch <viteno@xemacs.org>
27 * Makefile (VERSION): XEmacs package 1.92 released.
29 2015-09-17 Norbert Koch <viteno@xemacs.org>
31 * Makefile (VERSION): XEmacs package 1.91 released.
33 2015-05-17 Norbert Koch <viteno@xemacs.org>
35 * Makefile (VERSION): XEmacs package 1.90 released.
37 2015-04-27 Norbert Koch <viteno@xemacs.org>
39 * Makefile (VERSION): XEmacs package 1.89 released.
41 2015-04-13 Norbert Koch <viteno@xemacs.org>
43 * Makefile (VERSION): XEmacs package 1.88 released.
45 2015-02-28 Norbert Koch <viteno@xemacs.org>
47 * Makefile (VERSION): XEmacs package 1.87 released.
49 2015-02-01 Norbert Koch <viteno@xemacs.org>
51 * Makefile (VERSION): XEmacs package 1.86 released.
53 2015-01-12 Norbert Koch <viteno@xemacs.org>
55 * Makefile (VERSION): XEmacs package 1.85 released.
57 2014-11-18 Norbert Koch <viteno@xemacs.org>
59 * Makefile (VERSION): XEmacs package 1.84 released.
61 2014-11-17 Norbert Koch <viteno@xemacs.org>
63 * Makefile (VERSION): XEmacs package 1.83 released.
65 2014-11-01 Norbert Koch <viteno@xemacs.org>
67 * Makefile (VERSION): XEmacs package 1.82 released.
69 2014-10-18 Norbert Koch <viteno@xemacs.org>
71 * Makefile (VERSION): XEmacs package 1.81 released.
73 2014-10-16 Norbert Koch <viteno@xemacs.org>
75 * Makefile (VERSION): XEmacs package 1.80 released.
77 2014-09-08 Norbert Koch <viteno@xemacs.org>
79 * Makefile (VERSION): XEmacs package 1.79 released.
81 2014-06-29 Norbert Koch <viteno@xemacs.org>
83 * Makefile (VERSION): XEmacs package 1.78 released.
85 2014-05-30 Norbert Koch <viteno@xemacs.org>
87 * Makefile (VERSION): XEmacs package 1.77 released.
89 2014-05-15 Norbert Koch <viteno@xemacs.org>
91 * Makefile (VERSION): XEmacs package 1.76 released.
93 2014-05-15 Norbert Koch <viteno@xemacs.org>
95 * Makefile (VERSION): XEmacs package 1.75 released.
97 2014-05-13 Jerry James <james@xemacs.org>
100 * .hgignore: New file.
101 * cc-mode.texi: Update for texinfo 5.x. Restore CVS keyword
104 2013-10-28 Norbert Koch <viteno@xemacs.org>
106 * Makefile (VERSION): XEmacs package 1.74 released.
108 2013-10-22 Norbert Koch <viteno@xemacs.org>
110 * Makefile (VERSION): XEmacs package 1.73 released.
112 2013-10-14 Norbert Koch <viteno@xemacs.org>
114 * Makefile (VERSION): XEmacs package 1.72 released.
116 2013-09-22 Norbert Koch <viteno@xemacs.org>
118 * Makefile (VERSION): XEmacs package 1.71 released.
120 2013-09-19 Norbert Koch <viteno@xemacs.org>
122 * Makefile (VERSION): XEmacs package 1.70 released.
124 2013-06-03 Norbert Koch <viteno@xemacs.org>
126 * Makefile (VERSION): XEmacs package 1.69 released.
128 2013-05-28 Norbert Koch <viteno@xemacs.org>
130 * Makefile (VERSION): XEmacs package 1.68 released.
132 2013-05-07 Norbert Koch <viteno@xemacs.org>
134 * Makefile (VERSION): XEmacs package 1.67 released.
136 2013-05-03 Alan Mackenzie <bug-cc-mode@gnu.org>
138 * Patch release 5.32.5
140 * ChangeLog: Update for patch releases 5.32.3 and 5.32.5.
142 * cc-defs.el (c-version): Increment to 5.32.5.
144 * *.el, cc-mode.texi: Add 2012 and 2013 to copyright notices.
146 2013-05-02 Alan Mackenzie <bug-cc-mode@gnu.org>
148 Eliminate variable c-standard-font-lock-fontify-region-function.
149 * cc-mode.el (c-standard-font-lock-fontify-region-function): Remove.
150 (c-font-lock-fontify-region, c-after-font-lock-init): Adapt.
152 2013-04-30 Alan Mackenzie <bug-cc-mode@gnu.org>
154 Handle arbitrarily long C++ member initialisation lists. Test files.
155 * tests/member-init-1.cc: Remove erroneous code which clashes with
157 * tests/member-init-1.res: Recreated.
158 * tests/class-31.cc: Renamed from member-9.cc; replace a
159 constructor with a member init list by a class with inheritance.
160 * tests/class-31.res: Renamed from member-9.res and recreated.
162 2013-04-30 Alan Mackenzie <bug-cc-mode@gnu.org>
164 Handle arbitrarily long C++ member initialisation lists.
165 Made necessary by change 2012-02-26-ell-m, where a search limit of
168 * cc-engine.el (c-back-over-member-initializers): new function.
169 (c-guess-basic-syntax): New CASE 5R (extracted from 5B) to handle
170 (most) member init lists.
172 2013-04-17 Norbert Koch <viteno@xemacs.org>
174 * Makefile (VERSION): XEmacs package 1.66 released.
176 2013-04-15 Alan Mackenzie <bug-cc-mode@gnu.org>
178 Correct the placement of c-cpp-delimiters when there're #s not at col 0.
179 * cc-langs.el (c-anchored-cpp-prefix): Reformulate and place a
180 submatch around the #.
181 * cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Start a search
182 at BOL. Put the c-cpp-delimiter category text propertiy on the #,
185 2013-04-15 Alan Mackenzie <bug-cc-mode@gnu.org>
187 Reformulate java imenu-generic-expression. Contributed by Filipp Gunbin.
188 The old expression contained ill formed regexps.
190 * cc-menus.el (cc-imenu-java-ellipsis-regexp)
191 (cc-imenu-java-type-spec-regexp, cc-imenu-java-comment-regexp)
192 (cc-imenu-java-method-arg-regexp): New defconsts.
193 (cc-imenu-java-build-type-args-regex): New defun.
194 (cc-imenu-java-generic-expression): Fixed, to remove "ambiguous"
195 handling of spaces in the regexp.
197 2013-04-04 Norbert Koch <viteno@xemacs.org>
199 * Makefile (VERSION): XEmacs package 1.65 released.
201 2013-04-03 Alan Mackenzie <bug-cc-mode@gnu.org>
203 Handle `parse-partial-sexp' landing inside a comment opener.
204 Also adapt to the new values of element 7 of a parse state.
206 * cc-engine.el (c-state-pp-to-literal): New optional parameter
207 `not-in-delimiter'. Handle being inside comment opener.
208 (c-invalidate-state-cache-1): Reckon with an extra "invalid"
209 character in case we're typing a '*' after a '/'.
210 (c-literal-limits): Handle the awkward "not-in-delimiter" cond arm
211 instead by passing the parameter to c-state-pp-to-literal.
213 * cc-fonts.el (c-font-lock-doc-comments): New handling for elt. 7
216 2013-03-06 Norbert Koch <viteno@xemacs.org>
218 * Makefile (VERSION): XEmacs package 1.64 released.
220 2013-03-06 Alan Mackenzie <bug-cc-mode@gnu.org>
222 Correct the position of point in some line-up functions.
223 * cc-align.el (c-lineup-whitesmith-in-block, c-lineup-assignments)
224 (c-lineup-gcc-asm-reg ): take position of point at column 0 rather
225 than at a random place in the line.
226 * cc-mode.texi (Custom Line-Up): State explicitly that point
227 starts at a random position in the line being indented.
229 2013-03-04 Alan Mackenzie <bug-cc-mode@gnu.org>
231 Replace `last-command-event' by `last-command-char' in XEmacs.
232 * cc-defs.el (c-last-command-char): New macro.
233 * cc-align.el (c-semi&comma-inside-parenlist)
234 (c-semi&comma-no-newlines-before-nonblanks)
235 (c-semi&comma-no-newlines-for-oneline-inliners): Use the new macro
236 in place of `last-command-event'.
237 * cc-cmds.el (c-electric-pound, c-electric-brace)
238 (c-electric-slash, c-electric-semi&comma, c-electric-lt-gt)
239 (c-electric-paren, c-electric-continued-statement): Use the new
240 macro in place of `last-command-event'.
242 2013-02-08 Norbert Koch <viteno@xemacs.org>
244 * Makefile (VERSION): XEmacs package 1.63 released.
246 2013-02-08 Norbert Koch <viteno@xemacs.org>
248 * Makefile (VERSION): XEmacs package 1.62 released.
250 2013-02-08 Norbert Koch <viteno@xemacs.org>
252 * Makefile (VERSION): XEmacs package 1.62 released.
254 2013-02-08 Norbert Koch <viteno@xemacs.org>
256 * Makefile (VERSION): XEmacs package 1.62 released.
258 2013-02-08 Norbert Koch <viteno@xemacs.org>
260 * Makefile (VERSION): XEmacs package 1.62 released.
262 2013-02-02 Alan Mackenzie <bug-cc-mode@gnu.org>
264 Fix bug in the state cache mechanism. Remove 'BOD "strategy". Refactor.
265 * cc-engine.el (c-get-fallback-scan-pos): Remove.
266 (c-parse-state-get-strategy): Don't return 'BOD any more.
267 (c-append-lower-brace-pair-to-state-cache): Extra parameter HERE
268 instead of narrowing. Widen to top of buffer before searching
269 backwards for a brace pair.
270 (c-state-push-any-brace-pair): Add HERE parameter to function
272 (c-append-to-state-cache): Extra parameter HERE in place of
273 narrowing. Narrow to parameter HERE, in place of being called
275 (c-remove-stale-state-cache): Extra parameter HERE in place of
276 narrowing. Check there's an open brace in the cache before
277 searching for its match.
278 (c-invalidate-state-cache-1): Add HERE parameter to function call.
279 (c-parse-state-1): Don't narrow here for 'forward strategy,
280 instead passing extra parameter HERE to several functions. Remove
283 2013-01-29 Alan Mackenzie <bug-cc-mode@gnu.org>
285 Amend to fontify /regexp/s in actions correctly.
286 * cc-awk.el (c-awk-harmless-char-re, c-awk-harmless-string*-re)
287 (c-awk-harmless-string*-here-re): braces, parens and semicolons
288 are no longer included.
289 (c-awk-harmless-line-char-re, c-awk-harmless-line-string*-re):
290 What used to be these variables without "-line" in the name.
291 (c-awk-neutral-re): { is no longer neutral. Escaped newlines now
293 (c-awk-non-arith-op-bra-re): Now also matches {.
294 (c-awk-pre-exp-alphanum-kwd-re): New regexp to match "print",
295 "return", and "case".
296 (c-awk-kwd-regexp-sign-re): New, to match "print", etc., followed
298 (c-awk-syntax-tablify-/): Check special cases "print /re/", etc.
299 (c-awk-set-syntax-table-properties): Extend FSM to handle
302 awk-face-2.awk, awk-face-2.face: New test files for /regexp/s.
304 2013-01-27 Norbert Koch <viteno@xemacs.org>
306 * Makefile (VERSION): XEmacs package 1.60 released.
308 2013-01-25 Alan Mackenzie <bug-cc-mode@gnu.org>
310 AWK Mode: Fix indentation bug at top level.
311 * cc-engine.el (c-guess-basic-syntax): Move CASE 5P to just before
313 * awk-top-1.awk, awk-top-1.res: Add an extra test for this.
315 2013-01-23 Alan Mackenzie <bug-cc-mode@gnu.org>
317 Fix a bug in the state cache mechanism. Refactor this a bit.
319 * cc-engine.el (c-parse-state-get-strategy): Remove the
320 `cache-pos' element from the return value.
321 (c-append-lower-brace-pair-to-state-cache): "Narrow" to end of
322 buffer to enable proper searching from beyond HERE. Amend the
323 test for detecting the sought brace pair. Amend the value written
324 to the "brace desert cache" when the brace isn't found.
325 (c-remove-stale-state-cache): Rename `good-pos' to `start-point',
326 and several other variables analogously.
327 (c-remove-stale-state-cache-backwards): Change `cache-pos' from a
328 parameter to a locally calculated variable.
329 (c-parse-state-1): Change the calling conventions to the two
330 defuns involving `cache-pos'.
332 2013-01-17 Alan Mackenzie <bug-cc-mode@gnu.org>
334 Fix bugs in the state cache. Enhance a debugging mechanism.
336 * cc-engine.el (c-state-old-cpp-beg-marker)
337 (c-state-old-cpp-end-marker): New variables.
338 (c-parse-state-get-strategy): Don't use "brace at column zero"
340 (c-append-lower-brace-pair-to-state-cache): Repair algorithm.
341 Start a backward search for "}" definitively outside CPP
343 (c-remove-stale-state-cache): Inform the caller of a need to
344 search back for a brace pair in certain circumstances.
345 (c-state-maybe-marker): New macro.
346 (c-parse-state): Reuse markers when appropriate.
347 (c-parse-state-point): New variable.
348 (c-record-parse-state-state): Record old parse state with
349 `copy-tree'. Record previous value of point.
350 (c-replay-parse-state-state): Replay markers more correctly.
351 (c-debug-parse-state-double-cons): New debugging function.
352 (c-debug-parse-state): Call the above new function.
353 (c-toggle-parse-state-debug): Output a confirmatory message.
355 * cc-mode.el (c-before-change, c-after-change): Call
356 c-invalidate-state-cache from `c-before-change' instead of
359 2012-12-28 Norbert Koch <viteno@xemacs.org>
361 * Makefile (VERSION): XEmacs package 1.59 released.
363 2012-12-23 Alan Mackenzie <bug-cc-mode@gnu.org>
365 Speed up fontification where there's large brace blocks.
366 * cc-fonts.el (c-font-lock-enclosing-decls): Add a limit to a call
367 of c-beginning-of-decl-1.
369 2012-12-10 Norbert Koch <viteno@xemacs.org>
371 * Makefile (VERSION): XEmacs package 1.58 released.
373 2012-12-09 Alan Mackenzie <bug-cc-mode@gnu.org>
375 Make CC Mode not hang when _some_ lines end in CRLF.
376 * cc-engine.el (c-backward-comments): Add code to work around
377 `forward-comment' not recognizing ^M as whitespace.
379 2012-09-11 Norbert Koch <viteno@xemacs.org>
381 * Makefile (VERSION): XEmacs package 1.57 released.
383 2012-09-09 Alan Mackenzie <bug-cc-mode@gnu.org>
385 Correct the handling of two c-state-cache state variables.
386 * cc-engine.el (c-state-cache-init): Initialise
387 c-state-semi-nonlit-pos-cache\(-limit\)? properly.
388 (c-record-parse-state-state): record
389 c-state-semi-nonlit-pos-cache\(-limit\)?.
391 2012-09-03 Norbert Koch <viteno@xemacs.org>
393 * Makefile (VERSION): XEmacs package 1.56 released.
395 2012-08-19 Alan Mackenzie <bug-cc-mode@gnu.org>
397 AWK Mode: make auto-newline work when there's "==" in the pattern.
398 * cc-cmds.el (c-point-syntax): Handle virtual semicolons
400 * cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test more
401 rigorously for "=" token.
403 2012-05-05 Alan Mackenzie <bug-cc-mode@gnu.org>
405 * Patch release 5.32.3
407 * cc-defs.el (c-version): Increment to 5.32.3.
409 * *.el, cc-mode.texi: Add 2012 to copyright notices.
411 2012-04-23 Norbert Koch <viteno@xemacs.org>
413 * Makefile (VERSION): XEmacs package 1.55 released.
415 2012-04-22 Alan Mackenzie <bug-cc-mode@gnu.org>
417 Fix erroneous commit.
419 2012-04-21 Alan Mackenzie <bug-cc-mode@gnu.org>
421 Adding a ) can hide the resulting (..) from searches. Fix it.
423 * cc-engine (c-append-lower-brace-pair-to-state-cache): Bound the
424 backward search to the position of the existing (.
426 2012-04-16 Norbert Koch <viteno@xemacs.org>
428 * Makefile (VERSION): XEmacs package 1.54 released.
430 2012-04-15 Alan Mackenzie <bug-cc-mode@gnu.org>
432 Ensure searching for keywords is case sensitive.
434 * cc-cmds.el (c-electric-brace, c-electric-lt-gt)
435 (c-electric-paren c-beginning-of-defun, c-end-of-defun)
436 (c-defun-name, c-mark-function c-cpp-define-name)
437 (c-comment-indent, c-scan-conditionals c-indent-defun)
438 (c-context-line-break): bind case-fold-search to nil.
440 * cc-mode.el (c-font-lock-fontify-region): bind case-fold-search
443 2012-04-11 Alan Mackenzie <bug-cc-mode@gnu.org>
445 Make imenu work again for Objective C Mode.
446 * cc-menus.el (cc-imenu-objc-generic-expression): Correct the
447 *-index values, these having been disturbed by a previous change
450 2012-04-08 Alan Mackenzie <bug-cc-mode@gnu.org>
452 Correct two search limits in c-before-change-check_<>-operators.
453 * cc-engine.el (c-before-change-check-<>-operators): Make the
456 * cc-mode.texi (c-offsets-alist): Correct a typo.
458 2012-03-19 Norbert Koch <viteno@xemacs.org>
460 * Makefile (VERSION): XEmacs package 1.53 released.
462 2012-03-16 Alan Mackenzie <bug-cc-mode@gnu.org>
464 Further optimise the handling of large macros.
466 * cc-engine.el (c-crosses-statement-barrier-p): Use a limit to a
467 call of `c-literal-limits'.
468 (c-determine-+ve-limit): New function.
469 (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an `and'.
470 (c-guess-basic-syntax): In macros, restrict a search limit to
471 2000. In CASE 5B, restrict a search limit to 500.
472 (c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'.
474 * cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Restrict
475 macro bounds to +-500 from after-change's BEG END.
477 2012-03-08 Alan Mackenzie <bug-cc-mode@gnu.org>
479 * cc-cmds.el (c-mark-defun): Leave a mark, and extend region when
482 2012-03-06 Norbert Koch <viteno@xemacs.org>
484 * Makefile (VERSION): XEmacs package 1.52 released.
486 2012-03-02 Alan Mackenzie <bug-cc-mode@gnu.org>
488 Depessimize the handling of very large macros.
490 * cc-engine.el (c-macro-cache, c-macro-cache-start-pos):
491 (c-macro-cache-syntactic): New variables to implement a one
493 (c-invalidate-macro-cache): New function.
494 (c-beginning-of-macro, c-end-of-macro, c-syntactic-end-of-macro):
495 Adapt to use the new cache.
496 (c-state-safe-place): Use better the cache of safe positions.
497 (c-state-semi-nonlit-pos-cache)
498 (c-state-semi-nonlit-pos-cache-limit): New variables for...
499 (c-state-semi-safe-place): New function. Here, in a macro is
501 (c-invalidate-state-cache-1): New stuff for
502 c-state-semi-safe-place.
503 (c-in-literal, c-literal-limits, c-determine-limit-get-base): Use
504 c-state-semi-safe-place.
506 * cc-langs.el (c-get-state-before-change-functions): Add
507 c-invalidate-macro-cache to the C, C++, Obj entries.
509 2012-03-01 Alan Mackenzie <bug-cc-mode@gnu.org>
511 Optimise macro handling with a 1 element cache of beginning and
512 end. Make the default of c-macro-names-with-semicolon nil. See
513 2012-03-02 for details.
515 2012-02-29 Alan Mackenzie <bug-cc-mode@gnu.org>
517 Optimise c-state-safe-place. See 2012-03-02 for details.
519 2012-02-14 Norbert Koch <viteno@xemacs.org>
521 * Makefile (VERSION): XEmacs package 1.51 released.
523 2012-02-13 Alan Mackenzie <bug-cc-mode@gnu.org>
525 Fix a loop in c-set-fl-decl-start.
526 * cc-engine.el (c-set-fl-decl-start): Add a check that
527 c-backward-syntactic-ws actually moves backwards.
529 2012-02-12 Alan Mackenzie <bug-cc-mode@gnu.org>
531 Fix infinite loop with long macros.
532 * cc-engine.el (c-state-safe-place): Handle macros properly.
534 2012-02-09 Norbert Koch <viteno@xemacs.org>
536 * Makefile (VERSION): XEmacs package 1.50 released.
538 2012-02-07 Alan Mackenzie <bug-cc-mode@gnu.org>
540 Fix spurious recognition of c-in-knr-argdecl.
542 * cc-engine.el (c-in-knr-argdecl): Check for '=' in a putative K&R
545 2012-02-07 Alan Mackenzie <bug-cc-mode@gnu.org>
547 Test for keyword @implementation in a #pragma. This used to
550 2012-02-07 Alan Mackenzie <bug-cc-mode@gnu.org>
552 * cc-engine.el (c-forward-objc-directive): Prevent looping in
553 "#pragma mark @implementation".
555 2012-01-19 Norbert Koch <viteno@xemacs.org>
557 * Makefile (VERSION): XEmacs package 1.49 released.
559 2012-01-19 Norbert Koch <viteno@xemacs.org>
561 * Makefile (VERSION): XEmacs package 1.48 released.
563 2012-01-18 Alan Mackenzie <bug-cc-mode@gnu.org>
565 Eliminate sluggishness and hangs in fontification of "semicolon
568 * cc-engine.el (c-state-nonlit-pos-interval): change value 10000
570 (c-state-safe-place): Reformulate so it doesn't stack up an
571 infinite number of wrong entries in c-state-nonlit-pos-cache.
572 (c-determine-limit-get-base, c-determine-limit): New functions to
573 determine backward search limits disregarding literals.
574 (c-find-decl-spots): Amend commenting.
575 (c-cheap-inside-bracelist-p): New function which detects "={".
577 * cc-fonts.el (c-make-font-lock-BO-decl-search-function): Give a
578 limit to a backward search.
579 (c-font-lock-declarations): Fix an occurrence of point being
580 undefined. Check additionally for point being in a bracelist or
581 near a macro invocation without a semicolon so as to avoid a
582 fruitless time consuming search for a declarator. Give a more
583 precise search limit for declarators using the new
586 2012-01-17 Alan Mackenzie <bug-cc-mode@gnu.org>
588 Correct a test to do with C-y:
589 * cc-mode.el (c-after-change): Correct a singular-plural
592 2012-01-13 Norbert Koch <viteno@xemacs.org>
594 * Makefile (VERSION): XEmacs package 1.48 released.
596 2012-01-13 Alan Mackenzie <bug-cc-mode@gnu.org>
598 Fix filling for when filladapt mode is enabled.
600 * cc-cmds.el (c-fill-paragraph): In the invocation of
601 c-mask-paragraph, pass in `fill-paragraph' rather than
602 `fill-region-as-paragraph'. (This is a reversion of a previous
604 * cc-mode.el (c-basic-common-init): Make
605 fill-paragraph-handle-comment buffer local and set it to nil.
607 2012-01-11 Alan Mackenzie <bug-cc-mode@gnu.org>
609 Fix Emacs bug #10463 - put `widen's around the critical spots.
611 * cc-engine.el (c-in-literal, c-literal-limits): put a widen
612 around each invocation of c-state-pp-to-literal. Remove an unused
615 2012-01-10 Norbert Koch <viteno@xemacs.org>
617 * Makefile (VERSION): XEmacs package 1.47 released.
619 2012-01-10 Norbert Koch <viteno@xemacs.org>
621 * Makefile (VERSION): XEmacs package 1.46 released.
623 2012-01-08 Alan Mackenzie <bug-cc-mode@gnu.org>
625 Optimise font locking in long enum definitions.
627 * cc-fonts.el (c-font-lock-declarations): Add an extra arm to a
628 cond form to handle enums.
629 * cc-langs.el (c-enums-contain-decls): New lang variable.
630 * cc-mode.el (c-font-lock-fontify-region): Correct a typo.
632 2011-12-24 Alan Mackenzie <bug-cc-mode@gnu.org>
634 Introduce a mechanism to widen the region used in context font
635 locking. Use this to protect declarations from losing their
638 * cc-langs.el (c-before-font-lock-functions): replace
639 c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming).
640 (c-before-context-fontification-functions): new defvar, a list of
641 functions to be run just before context (etc.) font locking.
643 * cc-mode.el (c-extend-font-lock-region-for-macros): new,
644 functionality extracted from c-neutralize-syntax-in-and-mark-CPP.
645 (c-in-after-change-fontification): new variable.
646 (c-after-change): Set c-in-after-change-fontification.
647 (c-set-fl-decl-start): Rejig its interface, so it can be called
648 from both after-change and context fontifying.
649 (c-change-set-fl-decl-start, c-context-set-fl-decl-start): new
651 (c-standard-font-lock-fontify-region-function): new variable.
652 (c-font-lock-fontify-region): new function
654 2011-12-22 Alan Mackenzie <bug-cc-mode@gnu.org>
656 Fix unstable fontification inside templates.
658 * cc-langs.el (c-before-font-lock-functions): newly created from
659 the singular version. The (c c++ objc) entry now additionally has
660 c-set-fl-decl-start. The other languages (apart from AWK) have
661 that as a single entry.
663 * cc-fonts.el (c-font-lock-enclosing-decls): The functionality for
664 "local" declarations has been extracted to c-set-fl-decl-start.
666 * cc-mode.el: (c-common-init, c-after-change): Changes due to
667 pluralisation of c-before-font-lock-functions.
668 (c-set-fl-decl-start): New function, extraced from
669 c-font-lock-enclosing-decls and enhanced.
670 (top level): Only advise the font-lock change functions when
671 font-lock-extend-after-change-region-function is not defined.
673 2011-12-20 Alan Mackenzie <bug-cc-mode@gnu.org>
675 Convert some British English spellings to American English.
677 2011-12-13 Alan Mackenzie <bug-cc-mode@gnu.org>
679 Large brace-block initialisation makes CC Mode slow: Fix. Tidy up
680 and accelerate c-in-literal, etc. by using the c-parse-state
681 routines. Limit backward searching in c-font-lock-enclosing.decl.
683 * cc-engine.el (c-state-pp-to-literal): Return the pp-state and
684 literal type in addition to the limits.
685 (c-state-safe-place): New defun, extracted from
687 (c-state-literal-at): Use the above new defun.
688 (c-slow-in-literal, c-fast-in-literal): Removed.
689 (c-in-literal, c-literal-limits): Amended to use
690 c-state-pp-to-literal.
692 * cc-fonts.el (c-font-lock-enclosing-decls): Check for being in a
693 literal. Add a limit for backward searching.
695 * cc-mode.el (awk-mode): Don't alias c-in-literal to
698 2011-12-04 Alan Mackenzie <bug-cc-mode@gnu.org>
700 Add the switch statement to AWK Mode.
702 cc-awk (awk-font-lock-keywords): Add "switch", "case", "default"
703 to the keywords regexp.
705 cc-langs (c-label-kwds): Let AWK take the same expression as the
707 (c-nonlabel-token-key): Allow string literals for AWK. Refactor
710 2011-10-22 Alan Mackenzie <bug-cc-mode@gnu.org>
712 Fix bug #9560, sporadic wrong indentation; improve instrumentation of
714 * cc-engine.el (c-append-lower-brace-pair-to-state-cache): correct faulty
717 (c-parse-state-state, c-record-parse-state-state)
718 c-replay-parse-state-state): New defvar/defuns.
719 (c-debug-parse-state): Use new functions.
721 2011-10-18 Norbert Koch <viteno@xemacs.org>
723 * Makefile (VERSION): XEmacs package 1.46 released.
725 2011-10-12 Alan Mackenzie <bug-cc-mode@gnu.org>
727 * Patch release 5.32.2
729 * ChangeLog: Update for patch release 5.32.2.
731 * cc-defs.el (c-version): Increment to 5.32.2
733 2011-10-11 Alan Mackenzie <bug-cc-mode@gnu.org>
735 Enhance cc-bytecomp-ignore-obsolete to cope with the missing
736 function `byte-compile-obsolete' in Emacs >= 24.
738 * cc-bytecomp.el: (top-level): Add variable cc-bytecomp-push-vars.
739 Set this and similar variables to nil each time the file is
741 (cc-bytecomp-setup-environment, cc-bytecomp-restore-environment):
742 Add clauses to setup and restore "pushed" variables.
743 (cc-bytecomp-push): New macro to "push" a variable onto an
745 (cc-bytecomp-ignore-obsolete): Add a superfluous check to suppress
747 (cc-bytecomp-ignore-obsolete): In Emacs >= 24, use
748 byte-compile-not-obsolete-funcs to mark a function as obsolete.
750 2011-10-07 Alan Mackenzie <bug-cc-mode@gnu.org>
752 Fontify Java @annotations with c-preprocessor-face-name instead of
753 c-annotation-face. Protect against a one line change misfontifying an
754 annotation as a variable declaration. Fix a "minor" bug.
756 * cc-fonts.el (c-annotation-face): Remove
757 (c-basic-matchers-before): Move the stanza for Java @annotations here
758 from c-basic-matchers-after. Replace c-annotation-face by c-preprocessor
760 (c-font-lock-enclosing-decls): Check that c-opt-block-decls-with-vars-key
761 is non-nil before using it.
763 * annotations-1.face: recalculate this file.
765 2011-09-15 Alan Mackenzie <bug-cc-mode@gnu.org>
767 * cc-defs.el (top level): Add a test for the existence of delete-dups.
769 * cc-fix.el (top level): (defun delete-dups) when necessary.
771 2011-09-13 Alan Mackenzie <bug-cc-mode@gnu.org>
773 * admin/index.php, admin/release.php: Update version to 5.32.1
775 2011-09-12 Alan Mackenzie <bug-cc-mode@gnu.org>
777 * ChangeLog: Update for patch release 5.32.1.
779 * cc-defs.el (c-version): Increment to 5.32.1
781 2011-09-12 Alan Mackenzie <bug-cc-mode@gnu.org>
783 * Patch release 5.32.1
785 * cc-defs (c-version): Increment to 5.32.1
787 2011-09-11 Alan Mackenzie <bug-cc-mode@gnu.org>
789 * cc-defs (c-emacs-features): add-local-hook-test: Put a save-excursion
790 round the buffer manipulation. Error detected by XEmacs byte compiler.
792 2011-09-04 Alan Mackenzie <bug-cc-mode@gnu.org>
794 * cc-fonts.el: Reapply the changes of 2011-08-28
796 * cc-menus.el: Reapply the change of 2011-08-27.
798 2011-09-03 Alan Mackenzie <bug-cc-mode@gnu.org>
800 * cc-fix.el, cc-fonts.el, cc-guess.el, cc-langs.el, cc-lobotomy.el, cc-menus.el, cc-mode.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:
801 Correct the copyright and license statements for release 5.32.
803 * cc-defs.el (c-next-single-property-change)
804 (c-search-backward-char-property): For XEmacs, only use
805 next/previous-single-char-property-change in versions >= 2005-01-25
807 * cc-fonts.el, cc-menus.el: Restore to the state of Release_5_32.
809 2011-08-28 Alan Mackenzie <bug-cc-mode@gnu.org>
812 Fix - typing on a C++ inher-intro or inher-cont line should preserve the
813 fontification of the inherited class names. Analogously for namespace
814 names and Java import, extends, etc.
816 * cc-fonts.el: (c-make-font-lock-BO-decl-search-function): New function.
817 (c-basic-matchers-after - "Fontify the clauses after various keywords"):
818 Extract the three keyword lists for the 3 erroneous constructs from the
819 list of four, and use the new function above in place of an old one.
821 2011-08-27 Alan Mackenzie <bug-cc-mode@gnu.org>
823 * cc-menus.el (cc-imenu-c++-generic-expression): Make it handle function
824 pointer parameters properly.
826 2011-08-22 Alan Mackenzie <bug-cc-mode@gnu.org>
830 Use `make-local-hook' only when it's needed.
832 * cc-defs.el (c-emacs-features): Add 'add-hook-local into c-emacs-features
833 when make-local-hook is required.
835 * cc-mode.el (c-basic-common-init, c-font-lock-init): Test c-emacs-features
838 * cc-styles.el (c-make-styles-buffer-local): Test c-emacs-features for
842 * cc-defs.el (c-search-forward-char-property): Streamline by using
843 c-next-single-property-change.
845 * cc-engine.el: Correct typos.
847 2011-08-20 Alan Mackenzie <bug-cc-mode@gnu.org>
850 Resolve invalid use of a regexp in regexp-opt.
852 * cc-fonts.el (c-complex-decl-matchers): Add in special detection for a
855 * cc-engine.el (c-forward-decl-or-cast-1): Add in special detection for a
858 * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling for
860 (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+".
862 * cc-fonts.el: Tidy up font locking of a long CPP construct.
864 * cc-fonts.el (c-guess-font-lock-context): eliminate this somewhat pompous
866 (c-font-lock-complex-decl-prepare): replace a call to the above with
870 Fontify CPP expressions correctly when starting in the middle of such a
871 construct. Mainly for when jit-lock etc. starts a chunk here.
873 * cc-fonts.el (c-font-lock-context): new buffer local variable.
874 (c-make-font-lock-search-form): new function, extracted from
875 c-make-font-lock-search-function.
876 (c-make-font-lock-search-function): Use the above function.
877 (c-make-font-lock-context-search-function): New function.
878 (c-cpp-matchers): Enhance the preprocessor expression case with the above
880 (c-font-lock-complex-decl-prepare): Test for being in a CPP form which
883 * cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
885 2011-08-16 Alan Mackenzie <bug-cc-mode@gnu.org>
887 * cc-cmds.el (c-electric-lt-gt): Remove an unused dynamic variable.
890 Reduce the number of compilation warnings:
892 * cc-awk.el (c-awk-get-NL-prop-cur-line): Replace `delete-backward-char' by
895 * cc-cmds.el (c-electric-lt-gt, c-beginning-of-defun): Remove unused
898 * cc-engine.el (top level): Add a cc-bytecomp-defun and a
900 (c-ssb-lit-begin, c-forward-<>-arglist-recur):
901 (c-just-after-func-arglist-p, c-looking-at-decl-block):
902 (c-append-to-state-cache): Remove unused dynamic variables.
904 * cc-fonts.el (c-font-lock-enum-tail): Remove an unused dynamic variable.
906 * cc-guess.el (top level): Add three cc-bytecomp-defvars.
908 * cc-menus.el (cc-imenu-objc-function): Remove an unused dynamic variable.
910 * cc-mode.el (top level): Add three cc-bytecomp-defvars.
912 * tests/macro-27.cc, tests/macro-27.face, tests/macro-27.res:
913 Test "macros with semicolons".
915 2011-08-15 Alan Mackenzie <bug-cc-mode@gnu.org>
918 Adapt recent changes to work with XEmacs.
920 * cc-cmds.el (c-where-wrt-brace-construct): Replace a looking-at with
921 a call to c-looking-at-non-alphnumspace, because XEmacs doesn't have
923 (c-defun-name): Adapt a regexp not to use \_>.
925 * cc-defs.el (c-next-single-property-change): new macro.
926 (c-<-as-paren-syntax, c->-as-paren-syntax: Adapt for use as a simple
927 value (as well as for category properties).
928 (c-put-property-fun, c-put-char-property): wrap in eval-and-compile.
929 (c-use-category): new compile-time constant.
930 (c-search-forward-char-property):
931 (c-clear-char-property-with-value-function):
932 (c-clear-char-property-with-value-function, c-mark-<-as-paren):
933 (c-mark->-as-paren, c-unmark-<->-as-paren): small changes.
934 (c-sc-scan-lists-no-category+1+1, c-sc-scan-lists-no-category+1-1):
935 (c-sc-scan-lists-no-category-1-1, c-sc-scan-lists-no-category-1-1):
936 (c-sc-scan-lists, c-sc-parse-partial-sexp-no-category):
937 (c-sc-parse-partial-sexp): new macrofications of scan-lists and
938 parse-partial-sexp, for use in c-parse-state.
939 (c-looking-at-non-alphnumspace): new macro.
940 (c-emacs-features): Introduce new component category-properties.
942 * cc-engine.el (several defuns): Replace next-single-property-change by
943 c-next-single-property-change.
944 (c-state-cache-non-literal-place): Correct, to avoid the inside of
946 (c-state-balance-parens-backwards):
947 (c-append-lower-brace-pair-to-state-cache, c-state-push-any-brace-pair):
948 (c-append-to-state-cache, c-remove-stale-state-cache):
949 (c-remove-stale-state-cache-backwards): Replace scan-lists by
950 c-sc-scan-lists and parse-partial-sexp by c-sc-parse-partial-sexp.
951 (c-invalidate-state-cache, c-parse-state): small changes.
952 (c-find-decl-spots): Enhance initialisation of cfd-prop-match to take
953 account of a possible c-decl-end c-type property on the last token before
955 (c-clear-<-pair-props, c-clear->-pair-props): use c-unmark-<->-as-paren.
956 (c-before-change-check-<>-operators): Search for syntax-table rather than
959 * cc-fonts.el (c-skip-comments-and-strings): Use
960 c-next-char-propery-change.
961 (c-cpp-matchers): Use c-unmark-<->-as-paren.
962 (c-font-lock-invalid-string): Use characterp rather than integerp in
963 XEmacs, since characters are not integers.
965 * cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Test for category
966 properties (i.e. GNU Emacs) before deleting them.
967 (c-before-change): replace next-single-property-change by
968 c-next-single-property-change.
969 (c-after-change): Make an Emacs dependent category property related
970 correction dependent on the existence of category properties.
972 2011-07-26 Alan Mackenzie <bug-cc-mode@gnu.org>
974 * tests/bitfield-2.c, tests/bitfield-2.face, tests/bitfield-2.res:
975 bitfield-2.c: New file to test awkward fontification of bitfields.
978 Fontify bitfield declarations properly.
980 * cc-langs.el (c-has-bitfields): New lang variable.
981 (c-symbol-chars): Now exported as a lang variable.
982 (c-not-primitive-type-keywords): New lang variable.
984 * cc-fonts.el (c-font-lock-declarations): Jump over the QT keyword "more"
985 to prevent "more slots: ...." being spuriously parsed as a bitfield
988 * cc-engine.el (c-beginning-of-statement-1): Refactor and enhance to handle
989 bitfield declarations.
990 (c-punctuation-in): New function.
991 (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield
992 declarations properly.
994 2011-07-22 Alan Mackenzie <bug-cc-mode@gnu.org>
997 Prevent cc-langs.elc being loaded at run time.
999 * cc-mode.el: Remove two autoload forms which loaded cc-langs.
1001 * cc-langs.el (c-make-init-lang-vars-fun): Don't emit "(require 'cc-langs)".
1002 Quote a form so it will evaluate at (cc-mode's) compilation time.
1004 2011-07-21 Alan Mackenzie <bug-cc-mode@gnu.org>
1007 Fontify declarators properly when, e.g., a jit-lock chunk begins inside a
1010 * cc-langs.el (c-symbol-chars): Correct a typo.
1012 * cc-fonts.el (c-font-lock-enclosing-decls): New function.
1013 (c-complex-decl-matchers): Insert reference to
1014 c-font-lock-enclosing-decls.
1016 * cc-engine.el (c-backward-single-comment, c-backward-comments): Bind
1017 open-paren-in-column-0-is-defun-start to nil around calls to
1018 (forward-comment -1).
1020 2011-07-15 Alan Mackenzie <bug-cc-mode@gnu.org>
1022 * cc-mode.texi, cc-styles.el, Makefile, cc-guess.el, cc-langs.el, cc-mode.el:
1024 * cc-guess.el: Update this and Make it an integral part of CC Mode.
1026 * cc-langs.el (c-mode-menu): Added "Style..." submenu.
1028 * cc-styles.el (cc-choose-style-for-mode): New function derived from
1029 `c-basic-common-init'.
1031 * cc-mode.el (top-level): Require cc-guess. (c-basic-common-init): Use
1032 `cc-choose-style-for-mode'.
1034 * cc-mode.texi (Guessing the Style): New page. (Styles): Add a short
1035 introduction to above.
1037 Makefile: Change the position of cc-guess.el.
1039 2011-06-27 Alan Mackenzie <bug-cc-mode@gnu.org>
1041 * cc-engine.el, tests/templates-19.cc:
1042 cc-engine (c-guess-continued-construct): Correct the handling of
1043 template-args-cont, particularly for when font lock is disabled. Name
1044 this case as "CASE G".
1046 templates-19.c: Reindent.
1048 2011-06-15 Alan Mackenzie <bug-cc-mode@gnu.org>
1050 * cc-fonts.el (c-font-lock-declarations):
1051 1: Whilst checking for declarators, disable
1052 knr checking to speed up for normal files. 2: Refactor, replacing a
1053 sequence of nested if forms by a cond form.
1055 2011-03-06 Alan Mackenzie <bug-cc-mode@gnu.org>
1057 * cc-engine.el (c-guess-basic-syntax):
1058 Move CASE 19 to a different place, correctly to
1059 process template-args-cont lines.
1061 2011-02-27 Alan Mackenzie <bug-cc-mode@gnu.org>
1063 * cc-engine.el (c-guess-continued-construct): In three places, replace
1064 `lim' with 'containing-sexp'.
1066 * cc-engine.el (c-guess-continued-construct):
1067 In three places, replace `paren-state'
1068 with 'containing-sexp'.
1071 Fix an infinite loop which happens when a template construct straddles a
1074 * cc-engine.el (c-forward-<>-arglist-recur): recast nested `if's as a
1077 * cc-fonts.el (c-font-lock-declarations): Remove a harmful narrowing to
1078 region being fontified.
1080 2011-02-20 Alan Mackenzie <bug-cc-mode@gnu.org>
1082 * cc-engine.el (c-state-literal-at):
1083 Prevent positions in macros finding their way into
1084 c-state-nonlit-pos-cache. Strengthen the comments.
1085 (c-state-dump): New commented out diagnostic routine.
1087 * cc-cmds.el: Eliminate some infinite loops:
1088 (c-forward-over-illiterls): On encountering a bare '#' step forward over
1090 (c-end-of-statement): Set macro-end correctly at the end of a loop.
1092 2010-12-28 Nathaniel Flath <bug-cc-mode@gnu.org>
1094 * cc-engine.el (c-guess-continued-construct):
1095 used 'paren-state' instead of 'lim' to fix byte-compile warnings.
1097 2010-12-12 Alan Mackenzie <bug-cc-mode@gnu.org>
1099 * cc-engine.el (c-forward-type):
1100 Before scanning a template arglist, check that the
1101 current language supports this.
1103 2010-10-31 Alan Mackenzie <bug-cc-mode@gnu.org>
1105 * cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error.
1107 2010-10-30 Alan Mackenzie <bug-cc-mode@gnu.org>
1109 * cc-fonts.el (c-font-lock-declarations):
1110 Cache the result of the call to
1111 c-beginning-of-decl-1 inside the internal lambda. This is for speed.
1112 (c-font-lock-enum-tail): New function which fontifies the tail of an enum.
1113 (c-basic-matchers-after): Insert a call to the above new function.
1115 2010-10-24 Nathaniel Flath <bug-cc-mode@gnu.org>
1117 * cc-engine.el: Patch to fix templates-19.cc test
1119 2010-10-10 Alan Mackenzie <bug-cc-mode@gnu.org>
1121 * cc-mode.el (c-before-change, c-after-change):
1122 Move the setting of c-new-BEG and
1123 c-new-END from c-before-change to c-after-change.
1125 2010-10-08 Alan Mackenzie <bug-cc-mode@gnu.org>
1128 Together with the previous patch, enhance fontification of declarators to
1129 take account of the presence/absence of "typedef".
1131 * cc-engine.el (c-forward-type): New &optional param "brace-block-too".
1132 (c-forward-decl-or-cast-1): cdr of return value now indicates the
1133 presence of either or both of a "struct"-like keyword and "typedef".
1135 * cc-fonts.el (c-complex-decl-matchers): Remove the heuristic fontification
1136 of declarators which follow a "}".
1138 * cc-langs.el (c-typedef-kwds c-typedef-key): New lang variable for
1140 (c-typedef-decl-key): New lang varaible built from c-typedef-decl-kwds.
1142 * cc-mode.el (c-advise-fl-for-region): Don't restrict to AWK Mode any more.
1144 2010-10-06 Alan Mackenzie <bug-cc-mode@gnu.org>
1146 * cc-fonts.el (c-font-lock-declarations):
1147 Fontify declarators according to the
1148 presence/absence of "typedef".
1150 * 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:
1151 CC Mode now correctly fontifies declarators according to the
1152 presence/absence of "typedef". Adapt the test files accordingly.
1154 2010-09-20 Nathaniel Flath <bug-cc-mode@gnu.org>
1156 * cc-engine.el: Moved case 19 out of case 7
1158 2010-09-15 Alan Mackenzie <bug-cc-mode@gnu.org>
1160 * cc-engine.el (c-forward-<>-arglist-recur): Fix an infinite recursion.
1162 * cc-engine.el (c-forward-<>-arglist-recur): Correct the indentation.
1164 2010-08-06 Alan Mackenzie <bug-cc-mode@gnu.org>
1166 * cc-cmds.el (c-mask-paragraph, c-fill-paragraph):
1167 Fix for the case that a C style
1168 comment has its delimiters alone on their respective lines.
1170 2010-08-01 Alan Mackenzie <bug-cc-mode@gnu.org>
1172 * cc-align.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-mode.el, cc-mode.texi, cc-vars.el:
1173 Eliminate some warning messages when Emacs 23 is used to compile them.
1175 2010-07-31 Alan Mackenzie <bug-cc-mode@gnu.org>
1177 * cc-cmds.el (c-mask-paragraph): Fix auto-fill bug.
1179 2010-07-21 Alan Mackenzie <bug-cc-mode@gnu.org>
1181 * 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:
1182 Integrate java-0-1 branch: Enhance Java Mode to handle Java 5.0 (Tiger)
1183 and Java 6 (Mustang). Contributed by Nathanial Flath.
1185 2010-07-20 Alan Mackenzie <bug-cc-mode@gnu.org>
1187 * 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:
1188 Integrate java-0-1 branch: Enhance Java Mode to handle Java 5.0 (Tiger)
1189 and Java 6 (Mustang). Contributed by Nathanial Flath.
1191 2010-07-18 Alan Mackenzie <bug-cc-mode@gnu.org>
1193 * tests/comments-6.c, cc-mode.el:
1194 Enhance `c-file-style' in file/directory local variables.
1196 * cc-mode.el (c-count-cfss): New function.
1197 (c-before-hack-hook): Call `c-set-style' differently according to whether
1198 c-file-style was set in file or directory local variables.
1200 tests/comments-6.c. Enter Emacs-24 as a version in which to ignore this
1203 2010-07-13 Nathaniel Flath <bug-cc-mode@gnu.org>
1205 * cc-mode.texi: Fixed chaotic braces in 'Java Symbols'.
1207 2010-06-30 Nathaniel Flath <bug-cc-mode@gnu.org>
1209 * cc-mode.texi: Added more detail on new syntactic constructs
1211 2010-06-20 Alan Mackenzie <bug-cc-mode@gnu.org>
1214 Fix an indentation bug with templates.
1216 * cc-mode.el (c-common-init): Initialise c-new-BEG/END.
1217 (c-neutralize-syntax-in-and-mark-CPP): c-new-BEG/END: Take account of
1220 * cc-engine.el (c-clear-<-pair-props-if-match-after)
1221 (c-clear->-pair-props-if-match-before): now return t when they've cleared
1222 properties, nil otherwise.
1223 (c-before-change-check-<>-operators): Set c-new-beg/end correctly by
1224 taking account of the existing value.
1226 * cc-defs.el (c-clear-char-property-with-value-function): Fix this
1227 to clear the property rather than overwriting it with nil.
1229 * cc-mode.el (c-before-hack-hook):
1230 When the mode is set in file local variables, set it
1233 2010-05-28 Alan Mackenzie <bug-cc-mode@gnu.org>
1235 * cc-engine.el, cc-langs.el, cc-mode.texi, cc-vars.el, cc-cmds.el:
1236 Amend the handling of c-beginning/end-of-defun in nested declaration
1239 * cc-vars.el (c-defun-tactic): Move here from cc-langs.el. Change it to a
1242 * cc-mode.texi (Movement Commands): Document `c-defun-tactic'. Document
1243 the new handling of nested scopes for movement by defuns.
1245 * cc-langs.el (c-defun-tactic): Move this variable to cc-vars.el.
1246 (c-nonlabel-token-2-key): New variable for change in cc-engine.el.
1248 * cc-engine.el (c-beginning-of-statement-1): Prevent "class foo : bar"
1249 being spuriously recognized as a label.
1251 * cc-cmds.el (c-narrow-to-most-enclosing-decl-block): Add parameter
1252 `inclusive' (to include enclosing braces in the region).
1253 (c-widen-to-enclosing-decl-scope): New function.
1254 (c-while-widening-to-decl-block): New macro.
1255 (c-beginning-of-defun, c-end-of-defun): Change algorithm to keep going
1256 outward for defun boundaries, and correspondingly change symbol
1257 `respect-enclosure' to `go-outward'.
1258 (c-declaration-limits): Change algorithm to report only the "innermost"
1261 2010-05-25 Nathaniel Flath <bug-cc-mode@gnu.org>
1264 Added descriptions of annotation-top-cont and annotation-var-cont into the manual.
1266 2010-05-22 Nathaniel Flath <bug-cc-mode@gnu.org>
1268 * cc-fonts.el, cc-mode.el:
1269 Moved annotation highlighting from java-mode to c-basic-matchers-after.
1271 2010-05-21 Alan Mackenzie <bug-cc-mode@gnu.org>
1273 * cc-engine.el (c-parse-state-get-strategy): Replace parameter `here' with
1274 `here-' and `here-+', which sandwich any pertinent CPP construct.
1276 (c-remove-stale-state-cache-backwards): Fix a bug which happens when
1277 doing (c-parse-state) in a CPP construct: Exclude any "new" CPP construct
1278 from taking part in the scanning.
1280 2010-05-21 Nathaniel Flath <bug-cc-mode@gnu.org>
1282 * cc-langs.el, tests/generics-1.face, cc-engine.el:
1283 Fixed problem where Java Generics were not always fontified.
1285 2010-05-19 Nathaniel Flath <bug-cc-mode@gnu.org>
1287 * cc-langs.el, tests/generics-1.face, tests/generics-1.java, cc-engine.el:
1288 Fixed unit tests for template expressions and declarations. Still a few broken ones in the new unit tests for Java generics.
1290 2010-05-18 Nathaniel Flath <bug-cc-mode@gnu.org>
1292 * cc-langs.el, tests/annotations-1.face, tests/annotations-1.java, tests/annotations-1.res, cc-engine.el:
1293 Fixed the bugs in annotation highlighting; annotation unit tests are now passing.
1295 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.
1297 2010-05-17 Alan Mackenzie <bug-cc-mode@gnu.org>
1299 * tests/annotations-1.face:
1300 file annotations-1.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1302 * tests/annotations-1.java:
1303 file annotations-1.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1305 * tests/annotations-1.res:
1306 file annotations-1.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1308 * tests/enum-6.face:
1309 file enum-6.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1311 * tests/enum-6.java:
1312 file enum-6.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1315 file enum-6.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1317 * tests/foreach.face:
1318 file foreach.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1320 * tests/foreach.java:
1321 file foreach.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1323 * tests/foreach.res:
1324 file foreach.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1326 * tests/generics-1.face:
1327 file generics-1.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1329 * tests/generics-1.java:
1330 file generics-1.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1332 * tests/java-varargs.face:
1333 file java-varargs.face was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1335 * tests/java-varargs.java:
1336 file java-varargs.java was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1338 * tests/java-varargs.res:
1339 file java-varargs.res was added on branch Branch_5_31 on 2010-07-20 20:41:14 +0000
1341 2010-05-17 Nathaniel Flath <bug-cc-mode@gnu.org>
1343 * 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:
1344 Added unit tests for new Java 1.5 constructs, as well as a few bug and formatting fixes.
1346 Most of the issues brought up by Alan's CR have been fixed, with the
1347 exception of annotations being font-locked in java-mode.
1348 Additionally, most of the broken tests were fixed, at the cost of the
1349 a few of the new unit tests not passing.
1351 * 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:
1354 2010-04-29 Alan Mackenzie <bug-cc-mode@gnu.org>
1356 * cc-mode.el (c-extend-region-for-CPP):
1357 Fix an off-by-one error (EO-macro position).
1359 2010-04-28 Nathaniel Flath <bug-cc-mode@gnu.org>
1362 Improved c-forward-annotation to handle annotations with arglists properly.
1364 * cc-vars.el, cc-engine.el:
1365 Added two syntactic contexts to support annotations in java.
1367 The first, annotation-top-cont, represen
\7fts a topmost continuation where the only items preceding the current line are annotations. An example is:
1369 _ public void testFoo() {}
1371 The second is annotation-var-cont, representing a statement continuation where the only preceding items are annotations, such as:
1373 public static void main() {
1379 2010-04-27 Nathaniel Flath <bug-cc-mode@gnu.org>
1381 * cc-engine.el: Fixed indentation.
1384 Added support for for:each loops and fixed a few bugs this uncovered in generic highlighting.
1386 2010-04-26 Alan Mackenzie <bug-cc-mode@gnu.org>
1388 * 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:
1389 Replace leading spaces by <TAB> characters throughout the source.
1391 * 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:
1392 Replace leading spaces by <TAB>s, synched with java-0-1-merge-3.
1394 * 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:
1395 Replace leading spaces by <TAB> characters throughout source.
1397 * cc-mode.texi, cc-mode.el, cc-engine.el:
1398 Merge from Branch_5_31, tag java-0-1-merge-2.
1400 2010-04-24 Nathaniel Flath <bug-cc-mode@gnu.org>
1402 * cc-engine.el, cc-fonts.el, cc-langs.el:
1403 Added correct fontification for Java generics and varargs.
1405 2010-03-25 Alan Mackenzie <bug-cc-mode@gnu.org>
1407 * cc-mode.texi (Other Indentation):
1408 State that functions on c-special-indent-hook are
1409 called with no parameters and with point on the current line.
1411 2010-03-23 Nathaniel Flath <bug-cc-mode@gnu.org>
1413 * cc-fonts.el, cc-mode.el, cc-vars.el:
1414 Renamed java-annotation-face to c-annotation-face and moved it to cc-fonts.el
1416 2010-03-22 Alan Mackenzie <bug-cc-mode@gnu.org>
1418 * cc-engine.el: *** empty log message ***
1420 * cc-engine.el (c-remove-stale-state-cache): Fix an off-by-one error.
1422 2010-03-12 Alan Mackenzie <bug-cc-mode@gnu.org>
1424 * cc-mode.el: *** empty log message ***
1427 Guard against the Emacs core spuriously calling before-change-functions
1428 twice in succession.
1429 (c-just-done-before-change): New flag
1430 (c-before-change): Test and set the new flag before executing anything.
1431 (c-after-change): Clear the flag.
1433 2010-03-11 Alan Mackenzie <bug-cc-mode@gnu.org>
1435 * 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:
1436 Merge from BRANCH_5_31, tag java-0-1-merge-1.
1438 2010-03-01 Alan Mackenzie <bug-cc-mode@gnu.org>
1440 * cc-engine.el: *** empty log message ***
1442 * cc-engine.el (c-remove-stale-state-cache):
1443 Correct the previous patch.
1445 * cc-engine.el: *** empty log message ***
1447 * cc-engine.el (c-remove-stale-state-cache):
1448 Take account of when `good-pos' is in the same
1451 * cc-engine.el, cc-mode.el: *** empty log message ***
1455 * cc-mode.el (c-common-init): In the funcall, replace the erroneous `beg',
1456 `end' with (point-min), (point-max).
1457 (c-after-change): After (e.g.) C-y, remove the 'syntax-table text props
1458 that Emacs has converted from 'category text props.
1460 * cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props): Clear the
1461 'category text property, not the 'syntax-table one.
1463 2010-02-19 Nathaniel Flath <bug-cc-mode@gnu.org>
1465 * cc-engine.el, cc-fonts.el, cc-langs.el, cc-mode.el, cc-vars.el:
1466 Removed trailing whitespace from cc-vars and cc-engine, and fixed typo (xJava -> Java)
1468 2010-02-04 Alan Mackenzie <bug-cc-mode@gnu.org>
1470 * cc-engine.el, cc-mode.el: *** empty log message ***
1474 * cc-mode.el (c-common-init): Use c-get-state-before-change-functions in
1475 place of c-get-state-before-change-function. Update some comments about
1478 * cc-engine.el: Update some comments about
1479 c-get-state-before-change-function.
1481 * cc-cmds.el, cc-defs.el, cc-engine.el, cc-langs.el, cc-mode.el:
1483 *** empty log message ***
1486 Change strategy for marking < and > as template delimiters: mark them
1487 strictly in matching pairs.
1489 * cc-mode.el (c-before-change): Use c-get-state-before-change-functions.
1491 * cc-langs.el (c-no-parens-syntax-table): New syntax table, used for
1492 searching syntactically for matching <s and >s.
1493 (c-get-state-before-change-functions): New language variable (note the
1494 plural) which supersedes c-get-state-before-change-function.
1496 * cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props)
1497 (c-clear-<>-pair-props, c-clear-<-pair-props-if-match-after)
1498 (c-clear->-pair-props-if-match-before)
1499 (c-before-change-check-<>-operators): new functions.
1500 (c-after-change-check-<>-operators): Use macro c-unmark-<->-as-paren.
1502 * cc-defs.el (c-search-backward-char-property): New macro.
1504 * cc-cmds.el (c-electric-lt-gt): Do not set text properties on < and > any
1505 more. (These will be handled by font locking.)
1507 2010-01-25 Nathaniel Flath <bug-cc-mode@gnu.org>
1509 * cc-mode.el, cc-vars.el: Highlighting for Java annotation usage
1511 2010-01-21 Alan Mackenzie <bug-cc-mode@gnu.org>
1513 * cc-engine.el: *** empty log message ***
1516 Fix a situation where deletion of a cpp construct throws an error.
1517 (c-invalidate-state-cache): Before invoking
1518 c-with-all-but-one-cpps-commented-out, check that the special cpp
1519 construct is still in the buffer.
1520 (c-parse-state): Record the special cpp with markers, not numbers.
1522 * cc-defs.el: *** empty log message ***
1525 typing '#' in an empty C buffer throws "args out of range".
1526 (c-set-cpp-delimiters, c-clear-cpp-delimiters): Check for EOB playing the
1529 2010-01-19 Nathaniel Flath <bug-cc-mode@gnu.org>
1531 * cc-langs.el: Highlight annotations as types
1533 * cc-mode.el, cc-langs.el: highlighting of @interface in java-mode
1535 2010-01-06 Nathaniel Flath <bug-cc-mode@gnu.org>
1538 Fixed issue with cc-imenu-java-generic-expression not handling array arguments properly
1540 2009-12-31 Nathaniel Flath <bug-cc-mode@gnu.org>
1543 Fix for enum indentation in Java. Aligns all enum options on the same column.
1545 * cc-langs.el: Added proper highlighting for java enums
1547 2009-12-10 Alan Mackenzie <bug-cc-mode@gnu.org>
1549 * tests/templates-19.cc, tests/templates-19.res:
1550 Test template use in statements when the templates span line breaks.
1552 * tests/inher-5.res, tests/inher-6.res, tests/templates-16.res, tests/templates-5.res, tests/templates-7.res, tests/templates-8.res:
1553 Amend for the second anchor point just added to template-args-cont.
1556 Handle templates continued over line breaks in statements. Refactor
1557 c-syntactic-skip-backward. Make text property `category' rear
1560 * cc-mode.el (c-basic-common-init): make text property `category' rear
1563 * cc-engine.el (c-ssb-lit-begin): New defsubst, extracted from ....
1564 (c-syntactic-skip-backward): Refactor, extracting the above.
1565 (c-guess-basic-syntax CASEs 5D.3, 5L): Add extra anchor point;
1566 (c-guess-basic-syntax CASE 19): New CASE to handle template
1567 construct continued over line boundary.
1568 (c-guess-basic-syntax CASE 7): don't trigger on '<'.
1570 2009-12-03 Alan Mackenzie <bug-cc-mode@gnu.org>
1572 Enhance `c-parse-state' to run efficiently in "brace desserts".
1573 cc-mode.el (c-basic-common-init): Call c-state-cache-init.
1574 (c-neutralize-syntax-in-and-mark-CPP): Renamed from
1575 c-extend-and-neutralize-syntax-in-CPP. Mark each CPP construct by
1576 placing `category' properties value 'c-cpp-delimiter at its
1579 * cc-langs.el (c-before-font-lock-function):
1580 c-extend-and-neutralize-syntax-in-CPP has been renamed
1581 c-neutralize-syntax-in-and-mark-CPP.
1583 * cc-fonts.el (c-cpp-matchers): Mark template brackets with
1584 `category' properties now, not `syntax-table' ones.
1586 * cc-engine.el (c-syntactic-end-of-macro): A new enhanced (but
1587 slower) version of c-end-of-macro that won't land inside a literal
1588 or on another awkward character.
1589 (c-state-cache-too-far, c-state-cache-start)
1590 (c-state-nonlit-pos-interval, c-state-nonlit-pos-cache)
1591 (c-state-nonlit-pos-cache-limit, c-state-point-min)
1592 (c-state-point-min-lit-type, c-state-point-min-lit-start)
1593 (c-state-min-scan-pos, c-state-brace-pair-desert)
1594 (c-state-old-cpp-beg, c-state-old-cpp-end): New constants and
1595 buffer local variables.
1596 (c-state-literal-at, c-state-lit-beg)
1597 (c-state-cache-non-literal-place, c-state-get-min-scan-pos)
1598 (c-state-mark-point-min-literal, c-state-cache-top-lparen)
1599 (c-state-cache-top-paren, c-state-cache-after-top-paren)
1600 (c-get-cache-scan-pos, c-get-fallback-scan-pos)
1601 (c-state-balance-parens-backwards, c-parse-state-get-strategy)
1602 (c-renarrow-state-cache)
1603 (c-append-lower-brace-pair-to-state-cache)
1604 (c-state-push-any-brace-pair, c-append-to-state-cache)
1605 (c-remove-stale-state-cache)
1606 (c-remove-stale-state-cache-backwards, c-state-cache-init)
1607 (c-invalidate-state-cache-1, c-parse-state-1)
1608 (c-invalidate-state-cache): New defuns/defmacros/defsubsts.
1609 (c-parse-state): Enhanced and refactored.
1610 (c-debug-parse-state): Amended to deal with all the new
1613 * cc-defs.el (c-<-as-paren-syntax, c-mark-<-as-paren)
1614 (c->-as-paren-syntax, c-mark->-as-paren, c-unmark-<->-as-paren):
1615 modify to use category text properties rather than syntax-table
1617 (c-suppress-<->-as-parens, c-restore-<->-as-parens): new defsubsts
1618 to switch off/on the syntactic paren property of C++ template
1619 delimiters using the category property.
1620 (c-with-<->-as-parens-suppressed): Macro to invoke code with
1621 template delims suppressed.
1622 (c-cpp-delimiter, c-set-cpp-delimiters, c-clear-cpp-delimiters):
1623 New constant/macros which apply category properties to the start
1624 and end of preprocessor constructs.
1625 (c-comment-out-cpps, c-uncomment-out-cpps): defsubsts which
1626 "comment out" the syntactic value of characters in preprocessor
1628 (c-with-cpps-commented-out)
1629 (c-with-all-but-one-cpps-commented-out): Macros to invoke code
1630 with characters in all or all but one preprocessor constructs
1633 2009-11-23 Nathaniel Flath <bug-cc-mode@gnu.org>
1636 Updating cc-imenu-java-generic-expression in order to match Java1.6 methods with generics and annotations.
1638 2009-09-25 Alan Mackenzie <bug-cc-mode@gnu.org>
1640 * cc-langs.el (c-nonlabel-token-key): Allow quoted character constants (as
1643 * cc-engine.el (c-beginning-of-statement-1): Correct buggy bracketing.
1645 2009-09-24 Alan Mackenzie <bug-cc-mode@gnu.org>
1647 * cc-cmds.el (c-scan-conditionals):
1648 A new function like c-forward-conditionals, but it
1649 doesn't move point and doesn't set the mark.
1650 (c-up-conditional, c-up-conditional-with-else, c-down-conditional)
1651 (c-down-conditional-with-else, c-backward-conditional)
1652 (c-forward-conditional): Refactor to use c-scan-conditionals.
1654 * cc-bytecomp.el (cc-bytecomp-ignore-obsolete):
1655 In Emacs 23, byte-compile-warnings isn't
1656 always a list any more. Use new function byte-compile-disable-warning
1659 2009-08-26 Alan Mackenzie <bug-cc-mode@gnu.org>
1661 * admin/release.php:
1662 Update and clarify the current status of the 5.31.n releases.
1664 * cc-defs.el (c-version):
1665 increment the version number to 5.31.8.prerelease.
1667 2009-07-24 Alan Mackenzie <bug-cc-mode@gnu.org>
1669 * cc-mode.el, cc-mode.texi:
1670 Whilst initialising a mode, make any explicit setting of a variable take
1671 precedence over one done via c-file-style/c-file-offsets.
1673 * cc-mode.el (c-before-hack-hook, c-postprocess-file-styles): give
1674 c-set-style a DONT-OVERRIDE parameter of t in each function.
1676 * cc-mode.texi (Config Basics, File Styles): Amend documentation.
1678 2009-06-29 Alan Mackenzie <bug-cc-mode@gnu.org>
1680 * cc-cmds.el (c-mask-paragraph):
1681 Remove a spurious correction between the visible
1682 width of TABs and their number of bytes, so that point is undisturbed
1683 after typing a space, when there are tabs just before "*/".
1685 2009-06-10 Alan Mackenzie <bug-cc-mode@gnu.org>
1687 Introduce "font lock contexts", to enable (in particular) jit-lock to fontify
1688 correctly when starting in the middle of a construct. Implement this for CPP
1691 * cc-langs.el (c-cpp-expr-intro-re): New variable.
1693 * cc-fonts.el (c-guess-font-lock-context): New function.
1694 (c-font-lock-context): New buffer local variable.
1695 (c-make-font-lock-search-form): New function, extracted from
1696 c-make-font-lock-search-function.
1697 (c-make-font-lock-search-function): Use the above function.
1698 (c-make-font-lock-context-search-function): New function.
1699 (c-cpp-matchers): Enhance the preprocessor expression case as above.
1700 (c-font-lock-complex-decl-prepare): Call c-guess-font-lock-context.
1702 2009-05-21 Alan Mackenzie <bug-cc-mode@gnu.org>
1705 * cc-langs.el (c-before-font-lock-function): Change the name of an entry
1706 to c-extend-and-neutralize-syntax-in-CPP.
1708 * cc-mode.el (c-basic-common-init): Set
1709 font-lock-extend-after-change-region-function to
1710 c-extend-after-change-region for Emacs 22 and later.
1711 (c-before-hack-hook): Correct "hack-local-variables-alist" to
1712 "file-local-variables-alist".
1713 (c-extend-and-neutralize-syntax-in-CPP): Renamed from
1714 c-neutralize-syntax-in-CPP; it now extends the font lock region by
1715 setting c-new-BEG and c-new-END.
1716 (c-font-lock-init): Remove initialization of obsolete variable
1717 font-lock-lines-before.
1718 (c-extend-after-change-region): New function.
1719 (c-advise-fl-for-region): Generated code now extends f-l region for any
1720 CC Mode, not just AWK Mode.
1722 * cc-fonts.el, cc-engine.el:
1723 Undo the last change, which was ill thought out, apart from the macro
1724 c-search-forward-char-property and some enhancements to comments.
1726 2009-05-18 Alan Mackenzie <bug-cc-mode@gnu.org>
1729 * cc-fonts.el (c-font-lock-invalid-cpp-string-matcher): New function.
1731 (c-basic-matchers-before): New clause to fontify invalid strings in a CPP
1734 * cc-engine.el: Update some commenting.
1736 * cc-defs.el (c-search-forward-char-property): new macro.
1738 2009-04-30 Alan Mackenzie <bug-cc-mode@gnu.org>
1740 Enhancements for Objective-C:
1742 * cc-vars.el: (c-objc-method-arg-min-delta-to-bracket,
1743 c-objc-method-arg-unfinished-offset, c-objc-method-parameter-offset): New
1745 (c-offsets-alist): Use c-lineup-ObjC-method-call-colons in entry for
1746 objc-method-call-cont.
1748 * cc-langs.el: (c-constant-kwds): New ObjC keywords "YES", "NO",
1749 "NS_DURING", "NS_HANDLER", "NS_ENDHANDLER".
1751 * cc-align.el: (c-lineup-ObjC-method-call-colons): New function.
1753 * cc-menus.el: (cc-imenu-objc-function): Remove calls of
1754 imenu-progress-message.
1756 2009-03-06 Alan Mackenzie <bug-cc-mode@gnu.org>
1758 * cc-defs.el, cc-engine.el, cc-fonts.el, cc-langs.el, cc-mode.texi, cc-vars.el:
1759 Amend to indent and fontify macros "which include their own semicolon"
1760 correctly, using the "virtual semicolon" mechanism.
1762 * cc-defs.el: Update "virtual semicolon" comments.
1764 * cc-engine.el (c-crosses-statement-barrier-p): Recoded to scan one line at
1765 at time rather than having \n and \r explicitly in c-stmt-delim-chars
1766 (for some modes, e.g. AWK).
1767 (c-forward-label): Amend for virtual semicolons.
1768 (c-at-macro-vsemi-p, c-macro-vsemi-status-unknown-p): New functions
1770 * cc-fonts.el (c-font-lock-declarations): Take account of the new C macros.
1772 * cc-langs.el (c-at-vsemi-p-fn, c-vsemi-status-unknown-p-fn): move to
1773 earlier in the file.
1774 (c-opt-cpp-symbol, c-line-comment-start-regexp): New language variables.
1775 (c-opt-cpp-macro-define): Make into a full language variable.
1776 (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): Special value for
1777 AWK Mode (including \n, \r) removed, no longer needed.
1779 * cc-mode.el (c-mode, c++-mode, objc-mode): Invoke
1780 c-make-macro-with-semi-re. (Erroneously committed early, in previous
1783 * cc-vars.el (c-macro-with-semi-re, c-macro-names-with-semicolon): New
1785 (c-make-macro-with-semi-re): New function
1787 * cc-mode.texi (Indentation Commands): Mention "macros with semicolons".
1788 (Other Special Indentations): Add an xref to "Macros with ;".
1789 (Customizing Macros): Add stuff about syntax in macros. Add an xref to
1791 (Macros with ;): New page.
1793 2009-02-21 Alan Mackenzie <bug-cc-mode@gnu.org>
1795 * cc-engine.el, cc-langs.el:
1796 Allow (compile time) expressions in case clauses.
1798 * tests/switch-16.c, tests/switch-16.res: New file.
1800 * tests/switch-16.c, tests/switch-16.res:
1801 Test files for "case <expression>:".
1803 2009-02-13 Alan Mackenzie <bug-cc-mode@gnu.org>
1805 * cc-cmds.el (c-defun-name): Widen, so it works on a narrowed region.
1807 2009-02-08 Alan Mackenzie <bug-cc-mode@gnu.org>
1809 * cc-defs.el (c-emacs-features):
1810 Check the working of beginning/end-of-defun-function
1811 more rigorously before setting argumentative-bod-function.
1813 2009-01-05 Alan Mackenzie <bug-cc-mode@gnu.org>
1815 * cc-styles.el (c-setup-paragraph-variables):
1816 Ensure paragraph-\(start\|separate\) match
1817 blank lines. For AWK Mode.
1819 2008-11-07 Alan Mackenzie <bug-cc-mode@gnu.org>
1821 * tests/000tests.el (cc-test-extend-faces):
1822 When two faces aren't distinct, display a
1823 `message' rather than throwing an `error', a barely understood kludge to
1824 allow interactive use of 000tests.el.
1826 (do-all-tests): reset buffer *cc-test-log* to read/write after calling
1829 * 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:
1830 Correct the syntactical analysis of subsequent macro continuation lines.
1831 They are now never 'cpp-define-intro'.
1833 2008-11-03 Alan Mackenzie <bug-cc-mode@gnu.org>
1835 * cc-engine.el (c-forward-label):
1836 Handle the new QT macros Q_SLOTS and Q_SIGNALS.
1838 2008-10-19 Alan Mackenzie <bug-cc-mode@gnu.org>
1840 * cc-langs.el (c-recognize-<>-arglists):
1841 Enable this, crudely, for java. This will
1842 enable certain constructs with generics to be recognized, although it
1843 won't correctly handle the general use of generics.
1845 2008-10-17 Alan Mackenzie <bug-cc-mode@gnu.org>
1847 * cc-cmds.el (c-defun-name):
1848 Make it work for "struct foo bar [] = { ...".
1850 2008-10-13 Alan Mackenzie <bug-cc-mode@gnu.org>
1852 * cc-cmds.el (c-indent-region):
1853 Fix previous patch so that the function works on
1856 2008-10-07 Alan Mackenzie <bug-cc-mode@gnu.org>
1858 * cc-mode.el (c-before-hack-hook):
1859 New hook function for new hook (in Emacs 23)
1860 (top level): Use this new hook if it's there, otherwise use
1861 hack-local-variables-hook.
1863 * cc-mode.el (c-mode-base-map):
1864 Don't bind C-m-[ae] to c-{beginning,end}-of-defun when
1865 the current Emacs version passes a parameter to
1866 {beginning,end}-of-defun-function.
1868 * cc-engine.el (c-literal-type, c-forward-decl-or-cast-1, c-at-toplevel-p):
1871 (c-forward-decl-or-cast-1): Add in comments like "CASE 1", "CASE 2", ...
1872 which will later (hopefully) be fleshed out with detailed comments.
1874 * cc-cmds.el (c-indent-region):
1875 Fix so that indenting a macro followed by blank lines
1876 doesn't backslash the following non-blank line into the macro.
1878 * cc-align.el (c-lineup-respect-col-0): New function.
1880 * cc-styles.el (c-style-alist "ellemtel"):
1881 Move arglist-cont-nonempty into
1882 c-hanging-braces-alist.
1883 Change some `mapcar's into `mapc's.
1885 2008-10-05 Alan Mackenzie <bug-cc-mode@gnu.org>
1887 * cvstest.txt: Initial commision.
1889 * cvstest.txt: New file.
1891 2008-10-02 Alan Mackenzie <bug-cc-mode@gnu.org>
1893 * cc-fonts.el (c-font-lock-declarations): For "if (a<0 || b>99)", set
1894 c-restricted-<>-arglists to t, so that the innards aren't treated as a
1895 template bracket enclosure. Also refactor the code here.
1897 2008-08-12 Alan Mackenzie <bug-cc-mode@gnu.org>
1899 * cc-defs.el (c-emacs-features):
1900 set `argumentative-bod-function' when the Emacs core
1901 passes ARG through to `beginning-of-defun-function'.
1903 2008-06-28 Alan Mackenzie <bug-cc-mode@gnu.org>
1905 * cc-engine.el (c-beginning-of-statement-1): Improve the doc string.
1907 * cc-langs.el (c-defun-tactic): New language variable defining BO-defun.
1908 (This was already being used, although not defined.)
1910 * cc-cmds.el (c-where-wrt-brace-construct): Fix problem with "labels" (e.g.
1911 "private:") at the top level.
1913 2008-06-19 Alan Mackenzie <bug-cc-mode@gnu.org>
1915 * cc-engine.el (c-guess-basic-syntax CASE 5D.5):
1916 Fix an infinite loop on invalid syntax.
1918 2008-05-24 Alan Mackenzie <bug-cc-mode@gnu.org>
1920 * cc-mode.el (c-postprocess-file-styles):
1921 Throw an error if c-file-style is set to a
1923 (c-neutralize-syntax-in-CPP): Optimize for speed.
1925 2008-05-22 Alan Mackenzie <bug-cc-mode@gnu.org>
1927 * cc-engine.el (c-guess-basic-syntax, CASE 5B.1):
1928 Fix off-by-1 error, comparing position
1931 2008-05-02 Alan Mackenzie <bug-cc-mode@gnu.org>
1933 * cc-mode.texi (Class Symbols): Correct a typo.
1935 * cc-fonts.el (c-font-lock-declarations):
1936 In "if (Bool *b = f())", fontify "Bool" as a
1938 Also enhance the commenting significantly.
1940 2008-04-17 Alan Mackenzie <bug-cc-mode@gnu.org>
1943 * cc-langs.el (c-type-decl-prefix-key): C++ bit: move
1944 "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so that
1945 these keywords aren't wrongly matched as identifiers.
1947 * cc-fonts.el (c-font-lock-declarators): In (match-beginning 2), "2" ->
1948 "3", corresponding to the change in c-type-decl-prefix-key.
1949 (c-font-lock-maybe-decl-faces): Rearranged the header comments.
1951 * cc-engine.el (c-find-decl-spots): Rearranged the header comments.
1952 (c-forward-decl-or-cast-1): (i) In (match-beginning 2), "2" -> "3",
1953 corresponding to the change in c-type-decl-prefix-key. (ii) Remove a
1954 check for a semicolon at the end of a function declaration: this causes
1955 C++ constructor declarations to be fontified before the semicolon is
1958 * cc-defs.el (c-version): increment the version number to 5.31.6.
1960 2008-04-15 Alan Mackenzie <bug-cc-mode@gnu.org>
1962 * cc-langs.el (c-modified-constant): new language constant: matches, e.g.
1965 * cc-engine.el (c-beginning-of-statement-1): modify to handle "case L'a':".
1967 * cc-fonts.el (c-font-lock-complex-decl-prepare):
1968 Remove (most) c-type properties also
1969 from the last token _before_ the (font-lock) region, not just those
1972 Enhance some of the commenting.
1974 2008-04-12 Alan Mackenzie <bug-cc-mode@gnu.org>
1976 * admin/anoncvs.php, admin/compat.php, admin/index.php, admin/lists.php, admin/release.php:
1977 Update to current admin state.
1979 2008-04-10 Alan Mackenzie <bug-cc-mode@gnu.org>
1981 * cc-mode.texi (c-offsets-alist):
1982 Correct typos ("c-set-offsets" -> "c-set-offset",
1985 2008-04-06 Alan Mackenzie <bug-cc-mode@gnu.org>
1987 * cc-langs.el (c-before-font-lock-function):
1988 Correct a typo in the doc string.
1990 2008-04-05 Alan Mackenzie <bug-cc-mode@gnu.org>
1993 * cc-engine.el, cc-mode.texi:
1996 * cc-cmds.el (c-defun-name, c-cpp-define-name): New commands, primarily to
1997 support (X)Emacs's C-x 4 a (`add-change-log-entry-other-window') and
2000 * cc-langs.el (c-opt-cpp-macro-define-start): Add a regexp submatch to
2001 match the #define's name.
2003 * cc-mode.el (c-neutralize-syntax-in-CPP):
2004 Remove a superfluous right parenthesis.
2006 * cc-mode.texi, cc-engine.el:
2008 * cc-engine.el (c-in-knr-argdecl): In a suspected K&R region, scan at most
2009 20 brace/paren pairs. This prevents a drastic slowdown in files (e.g.
2010 Emacs's lisp.h) where there are many consecutive declarations without a
2013 * cc-mode.texi ("Limitations and Known Bugs") Document this restriction.
2015 * cc-vars.el (c-constant-symbol):
2016 put `save-excursion' round this function.
2018 2008-03-01 Alan Mackenzie <bug-cc-mode@gnu.org>
2020 * cc-mode.el (c-neutralize-syntax-in-CPP): Fix coding bug.
2022 * cc-langs.el (c-before-font-lock-function):
2023 Fix bug in doc-string, "c-old-LEN" ->
2026 2008-02-25 Alan Mackenzie <bug-cc-mode@gnu.org>
2028 * cc-mode.el (c-neutralize-syntax-in-CPP):
2029 Fix a bug on typing "#" at EOB.
2031 2008-02-23 Alan Mackenzie <bug-cc-mode@gnu.org>
2033 Set of changes so that "obtrusive" syntactic elements in a C/C++/ObjC
2034 preprocessor line (e.g. an unbalanced string quote or unmatched paren) don't
2035 interact syntactically with stuff outside the CPP line.
2037 * cc-awk.el (c-awk-beyond-logical-line, c-awk-old-ByLL): Replace
2038 c-awk-end-of-logical-line and c-awk-old-EoLL to solve an off-by-one bug.
2040 (c-awk-record-region-clear-NL): Replaces c-awk-before-change, with a bit
2043 (c-awk-extend-and-syntax-tablify-region): Takes some of the functionality
2044 of c-awk-advise-fl-for-awk-region, which has been refactored away.
2046 * cc-defs.el (c-clear-char-property-with-value-function)
2047 (c-clear-char-property-with-value): New function and macro which remove
2048 text-properties `equal' to a supplied value.
2050 * cc-engine.el: Comment about text properties amended.
2052 * cc-fonts.el (c-cpp-matchers): Make it put regexp parens around
2055 * cc-langs.el (c-get-state-before-change-function)
2056 (c-before-font-lock-function, c-anchored-cpp-prefix): New language
2058 (c-cpp-message-directives): Handle "#warning" in C, C++ and ObjC.
2060 * cc-mode.el (c-basic-common-init): C and ObjC now use
2061 syntax-table text properties.
2062 (c-common-init): Call language specific before/after-change functions at
2063 mode initialisation.
2064 (c-new-BEG, c-new-END, c-old-BOM, c-old-EOM): New variables.
2065 (c-extend-region-for-CPP, c-neutralize-CPP-line)
2066 (c-neutralize-syntax-in-CPP): New functions.
2067 (c-before-change, c-after-change): Call the new language specific change
2068 functions defined in cc-langs.el.
2069 (c-advise-fl-for-region): New macro.
2070 (awk-mode): Remove AWK specific stuff which has been refactored into
2071 language independent stuff.
2073 2008-02-02 Alan Mackenzie <bug-cc-mode@gnu.org>
2075 * cc-langs.el (c-specifier-key):
2076 Exclude "template" from this regexp; to anchor the "{" of a
2077 template function correctly on "template", not the following "<".
2079 * cc-engine.el (c-guess-basic-syntax, CASE 5A.5):
2080 Anchor the "{" of a template function
2081 correctly on "template", not the following "<".
2083 (c-guess-basic-syntax, CASE 5H): prevent a macro call inside a struct
2084 being recognised as a K&R argument.
2086 * cc-align.el, cc-awk.el, cc-cmds.el, cc-defs.el, cc-styles.el:
2087 Correct typos, remove WS, rephrase doc-strings/comments a little.
2089 2008-01-26 Alan Mackenzie <bug-cc-mode@gnu.org>
2091 * cc-defs.el (c-save-buffer-state):
2092 Bind buffer-file-name and buffer-file-truename to
2093 nil, to prevent primitives generating "buffer is read only" messages.
2095 2008-01-06 Alan Mackenzie <bug-cc-mode@gnu.org>
2097 * cc-vars.el (defcustom-c-stylevar):
2098 New version by Thien-Thi Nguyen which gets rid of
2099 ugly nested backquotes.
2101 * tests/000tests.el (do-all-tests, do-one-test):
2102 bind 'enable-local-variables so as to get
2103 round GNU Emacs's tighter restrictions on file local variables.
2106 awk-escaped-nls*: Use eval-and-compile to avoid compilation error.
2108 2007-11-02 Alan Mackenzie <bug-cc-mode@gnu.org>
2110 * admin/release.php: Explain about version 5.31.4.
2112 2007-09-22 Alan Mackenzie <bug-cc-mode@gnu.org>
2115 At an extra link to directory "manual". Rename "Documentation" to
2116 "Manual", clarifying with "(html)" and "(info/PS/DVI)".
2118 2007-08-25 Alan Mackenzie <bug-cc-mode@gnu.org>
2120 With two "namespace"s on the same line, the next line's syntactic context
2121 (i) gets 2 "innamespace" elements, not 1 defun-block-intro + 1
2123 (ii) the anchor points are now those of the namespace constructs, not
2124 just the line's indentation.
2126 * cc-langs.el (c-other-decl-block-key-in-symbols-alist): a new language
2127 variable, an alist with elements like ("namespace" . innamespace).
2129 * cc-engine.el (c-brace-anchor-point): New function. (c-add-stmt-syntax):
2130 Give accurate anchor points for "namespace", "extern" etc., rather than
2131 BOI. Fix addition of spurious syntactic-symbol 'defun-block-intro,
2132 replacing it with 'innamespace, etc.
2134 2007-08-01 Alan Mackenzie <bug-cc-mode@gnu.org>
2137 "Mailing Lists and Bug Reports": correct "-no-site-file" to
2140 2007-07-28 Alan Mackenzie <bug-cc-mode@gnu.org>
2142 * cc-langs.el, cc-mode.el:
2143 Move macro call `c-make-emacs-variables-local' from
2144 c-init-language-vars-for to c-make-init-lang-vars-fun, so that it works
2147 2007-07-13 Alan Mackenzie <bug-cc-mode@gnu.org>
2150 Rename target "html" to "html-raw". New "html" fixes up links to the
2151 Emacs/Elisp manuals, pointing them into http://www.gnu.org.
2153 * 2www.gnu.org.sh: Add a #! line, and a directory parameter.
2155 2007-07-12 Alan Mackenzie <bug-cc-mode@gnu.org>
2158 The manual has cross references to the Emacs and Elisp manuals. In the
2159 HTML manual, these became broken links. This script directs those links
2160 to the right places in http://www.gnu.org. (It also removes a link to a
2161 manual which doesn't seem to exist online.)
2163 2007-07-11 Alan Mackenzie <bug-cc-mode@gnu.org>
2165 * 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:
2166 Update 18 files.face to reflect the change in cc-fonts.el
2167 V5.205.2.4/5.209: Keywords which are terminated by a colon (e.g.
2168 default:, public:) and the analogous Objective-C keywords are now
2169 fontified with font-lock-keyword-face.
2171 2007-07-05 Alan Mackenzie <bug-cc-mode@gnu.org>
2173 * cc-defs.el (c-version):
2174 Increase to 5.31.5. (5.31.4 was the version in Emacs 22.1.)
2176 2007-07-03 Alan Mackenzie <bug-cc-mode@gnu.org>
2179 Repair the customization routines which handle alists so that it is
2180 possible to insert entries for those keys which are valid, yet aren't
2181 currently in the alist.
2183 (c-constant-symbol): New defun which supersedes c-const-symbol.
2184 (c-indent-comment-alist, c-hanging-braces-alist, c-hanging-colons-alist,
2185 c-offsets-alist): Replace c-const-symbol by c-constant-symbol.
2187 Make the syntactic symbol arglist-cont-nonempty a legitimate key in
2188 c-hanging-braces-alist.
2190 * cc-cmds (c-brace-newlines): Amend.
2192 * cc-styles.el (c-style-alist): Extend all standard styles to include the
2195 * cc-vars.el (c-hanging-braces-alist): Amend the default value, and the
2198 * cc-mode.el: c-before-change: Replace a "1" with "(point-min)".
2200 * cc-cmds.el, cc-mode.el: cc-cmds.el (c-electric-slash):
2202 * cc-mode.el (c-remove-any-local-eval-or-mode-variables):
2203 Replace wrong uses of `kill-...' (which added spurious entries to the
2204 kill ring) by `delete-....'.
2206 * cc-cmds.el (c-in-function-trailer-p):
2207 Fix this: when a function return type contains
2208 "struct", "union", etc. c-end-of-defun goes too far forward.
2210 * cc-subword.el (c-capitalize-subword):
2211 More closely mimic the behavior of `capitalize-word'.
2212 Do not move point with a negative argument. Based on tiny change by Paul
2215 * cc-subword.el (c-downcase-subword, c-upcase-subword):
2216 Don't move point if ARG is
2217 negative. Patch by Paul Curry.
2219 Changes to make `narrow-to-defun' and `mark-defun' work properly
2222 * cc-defs.el (c-beginning-of-defun-1):
2224 * cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
2225 Bind beginning/end-of-defun-function to nil around calls to
2226 beginning/end-of-defun.
2228 * cc-langs.el (beginning-of-defun-function,
2229 end-of-defun-function): New c-lang-setvar's.
2231 * cc-awk.el (c-awk-beginning-of-defun): Add "(or arg
2232 (setq arg 1))" to enable non-interactive call.
2234 * cc-cmds.el (c-end-of-defun):
2235 Tidy up, to eliminate byte-compiler warning "value
2236 unused" in Emacs 22.
2238 2007-07-02 Alan Mackenzie <bug-cc-mode@gnu.org>
2240 * cc-cmds.el (c-electric-paren):
2241 Fix space-before-funcall clean-up: only insert space
2242 when on identifier, etc. Patch by David Hansen.
2244 Fix fontification of labels, and other things with ":".
2246 * cc-engine.el (c-forward-label): The function now
2247 returns 'goto-target, 'qt-2kwds-colon, 'qt-1kwd-colon, as well as the
2250 * cc-fonts.el (c-font-lock-declarations): Interpret the
2251 new return code from c-forward-label, fontifying tokens properly. Add
2252 some general comments throughout the file.
2254 * cc-vars.el (c-special-indent-hook): Amend doc-string to mention
2255 c-syntactic-indentation.
2257 * cc-cmds.el (c-forward-to-nth-EOF-}): Fix EOB bug.
2259 * cc-mode.el (c-make-emacs-variables-local):
2260 Use `mapcar' rather than `mapcan' to
2261 silence compiler warning in GNU Emacs 22.
2263 Remove stale tokens from `c-found-types' cache.
2265 * cc-engine.el: (c-partial-ws-p, c-unfind-type, c-trim-found-types): New
2268 * cc-mode.el: (c-unfind-enclosing-token, c-unfind-coalesced-tokens,
2269 c-before-change): New functions. (c-maybe-stale-found-type): New
2272 2007-06-03 Alan Mackenzie <bug-cc-mode@gnu.org>
2274 * admin/lists.php: Update the address of the cc-mode-help mailing list.
2276 2007-03-16 Alan Mackenzie <bug-cc-mode@gnu.org>
2280 * cc-styles.el: cc-align.el, cc-styles.el: New line-up function,
2281 c-lineup-gnu-DEFUN-intro-cont, for the DEFUN macro in the Emacs C
2282 sources. Only used in "gnu" style.
2285 * cc-align.el: Correct a logistical error in the previous patch.
2287 * cc-align.el: cc-align.el, cc-styles.el: New line-up function,
2288 c-lineup-gnu-DEFUN-intro-cont, for the DEFUN macro in the Emacs C
2289 sources. Only used in "gnu" style.
2291 * cc-compat.el, cc-langs.el, cc-menus.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el:
2292 Update the copyright statements, correct some typos, remove silly WS,
2293 improve a few comments.
2295 2007-02-24 Alan Mackenzie <bug-cc-mode@gnu.org>
2297 * cc-menus.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el, cc-compat.el, cc-langs.el:
2298 Update the copyright statements, correct some typos, remove silly WS,
2299 improve a few comments.
2301 * cc-mode.texi: Correct lots of typos.
2302 ("Getting Started"): Change a sentence to the conditional.
2303 ("Movement Commands"): Add missing (@code{c-beginning/end-of defun}).
2304 ("Clean-ups"): Add an example for inserting a clean-up into
2307 * cc-mode.el (c-basic-comment-init):
2308 Don't set open-paren-in-column-0-is-defun-start
2309 to nil any more. Discussion in emacs-devel showed this was
2312 * cc-fonts.el: Added comments to c-font-lock-complex-decl-prepare,
2313 c-font-lock-<>-arglists, c-font-lock-declarations, c-font-lock-c++-new,
2314 explaining that they get called as font-lock "FUNCTION"s; to
2315 c-font-lock-declarations (a c-lang-defconst) explaining that it dumps
2316 these functions to c-matchers-3.
2318 * cc-engine.el (c-beginning-of-current-token):
2319 For no movement, return NIL, not 0.
2320 (c-in-knr-argdecl): Fixed, so that it doesn't get confused by "[]" when
2323 * cc-defs.el (c-go-list-forward, c-go-list-backward): New macros.
2325 * cc-cmds.el (c-where-wrt-brace-construct):
2326 correct the handline of K&R regions; C-M-a
2327 was fouling up in them.
2328 (c-indent-line): Change the notion of "whitespace" used for <tab>, so
2329 that a ^L doesn't get swallowed.
2330 (c-mask-paragraph): Correct the handling of unclosed C-style comments,
2331 (for when auto-fill-mode is enabled).
2332 (c-indent-new-comment-line): With M-j in an empty C-style comment,
2333 correct the final position of point.
2335 2006-11-12 Alan Mackenzie <bug-cc-mode@gnu.org>
2337 Fix clean-up space-before-funcall so that it doesn't split the identifer
2338 from the parentheses in "#define foo(..)".
2340 * cc-langs.el (c-opt-cpp-macro-define-id): new language variable.
2342 * cc-engine.el (c-forward-over-cpp-define-id): new function.
2344 * cc-cmds.el (c-electric-paren): Amend the function.
2346 2006-11-08 Alan Mackenzie <bug-cc-mode@gnu.org>
2348 * README: Tell XEmacs users they need the "advice" package.
2350 * 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:
2351 Correct the syntactical analysis of subsequent macro continuation lines.
2352 They are now never 'cpp-define-intro'.
2354 * tests/macro-23.c, tests/macro-23.res: New file.
2356 * tests/macro-23.c, tests/macro-23.res:
2357 New test case for plain statements as the continuation lines of a macro.
2359 * tests/macro-27.c, tests/macro-27.res:
2360 A new test case for a wierd mixture of invalid syntax with CPP, labels,
2361 and an escaped newline.
2363 * tests/macro-27.c, tests/macro-27.res: New file.
2366 (i) (c-guess-basic-syntax, case 5N): Check the format of c-state-cache is
2367 valid for an optimisation before using it.
2368 (ii) (c-guess-basic-syntax): New case 5Q "we are at a statement within a
2369 macro". Other changes so that only the first continuation line in a
2370 macro gets the symbol `cpp-define-intro', the others get `statement', or
2373 * cc-mode.texi ("Limitations and Known Bugs"):
2374 Document problems with eval-after-load
2377 2006-07-20 Alan Mackenzie <bug-cc-mode@gnu.org>
2379 Introduce macro c-lang-setvar (sister to c-lang-defvar) to set standard
2380 Emacs variables (like comment-start) to language dependent values, yet
2381 without spuriously "defvar"ing them.
2383 * cc-langs.el (c-emacs-variable-inits): new variable.
2384 (c-lang-setvar): new macro.
2385 (c-make-init-lang-vars-fun): Use the initialization forms in
2386 c-emacs-variable-inits in addition to those in c-lang-variable-inits.
2387 (comment-start, comment-end, comment-start-skip): Change these from
2388 c-lang-defvar's to c-lang-setvar's
2390 * cc-mode.el (c-make-emacs-variables-local): new macro, which calls
2391 make-local-variable on the elements of c-emacs-variable-inits.
2392 (c-init-language-vars-for): Call this macro.
2394 2006-07-19 Alan Mackenzie <bug-cc-mode@gnu.org>
2396 * cc-cmds.el, cc-mode.texi:
2398 * cc-mode.texi ("Filling and Breaking"): Amend the doc for
2399 c-context-line-break.
2401 * cc-mode.texi, cc-cmds.el:
2403 * cc-cmds.el (c-context-line-break): When invoked within a string, preserve
2404 whitespace. Add a backslash only when also in a macro.
2406 * cc-mode.texi ("Filling and Breaking"): Amend the doc for
2407 c-context-line-breaak.
2409 2006-07-10 Alan Mackenzie <bug-cc-mode@gnu.org>
2411 * cc-defs.el: cc-defs.el. Correct typos.
2414 * cc-awk.el, cc-fonts.el: Move awk-font-lock-keywords from cc-fonts.el back
2415 to cc-awk.el to eradicate an eval-after-load, at the request of RMS.
2417 2006-07-06 Alan Mackenzie <bug-cc-mode@gnu.org>
2419 * cc-cmds.el (c-context-line-break): don't indent the new line after an
2420 escaped EOL in a string.
2422 2006-07-03 Alan Mackenzie <bug-cc-mode@gnu.org>
2424 * tests/label-10.c, tests/label-10.res:
2425 label-10.{c,res}: Recognise "foo:" as a label when it directly follows "else",
2428 * tests/label-10.c, tests/label-10.c~, tests/label-10.res: New file.
2430 * tests/label-10.c, tests/label-10.c~, tests/label-10.res:
2431 label-10.{c,res}: Recognise "foo:" as a label when it directly follows "else",
2434 * cc-engine.el (c-forward-label): Recognise "foo:" as a label when it
2435 directly follows "else", "do", ....
2437 2006-07-01 Alan Mackenzie <bug-cc-mode@gnu.org>
2439 * tests/templates-18.cc, tests/templates-18.res: New file.
2441 * tests/templates-18.cc, tests/templates-18.res:
2442 templates-18.{cc,res}: tolerate empty angle brackets (as
2443 seen in "explicit specialisations" of templates).
2446 * cc-engine.el (c-looking-at-decl-block): tolerate empty angle brackets (as
2447 seen in "explicit specialisations" of templates).
2449 2006-05-16 Alan Mackenzie <bug-cc-mode@gnu.org>
2451 * admin/anoncvs.php, admin/links.h:
2452 Update the CVS server name to "cc-mode.cvs.sourceforge.net".
2454 * admin/anoncvs.php, admin/links.h:
2455 Update the CVS server to "cc-mode.cvs.sourceforge.net".
2457 2006-05-14 Alan Mackenzie <bug-cc-mode@gnu.org>
2459 * admin/anoncvs.php:
2460 Update the CVS host (following a SourceForge upgrade).
2462 2006-04-29 Alan Mackenzie <bug-cc-mode@gnu.org>
2464 * cc-mode.texi, cc-vars.el:
2466 * cc-vars.el (c-indentation-style): Mention c-file-style in the doc-string.
2468 * cc-mode.texi ("Choosing a Style"): Mention c-file-style.
2471 * cc-cmds.el (c-mask-paragraph): Fix for C comments, when the comment ender
2472 looks like "=========*/" and is alone on its line.
2475 * cc-langs.el, cc-engine.el: Correct the spelling of
2476 c-opt-op-identiTier-prefix, t -> f. Leave an alias for the old name.
2478 * cc-mode.texi, cc-mode.el:
2480 * cc-mode.el: Bind C-M-a and C-M-e to c-\(beginning\|end\)-of-defun by
2483 * cc-mode.texi ("Movement Commands", "Sample .emacs File"): Document this.
2486 * cc-align.el, cc-styles.el: New line-up function,
2487 c-lineup-gnu-DEFUN-intro-cont, for the DEFUN macro in the Emacs C
2488 sources. Only used in "gnu" style.
2490 2006-04-14 Alan Mackenzie <bug-cc-mode@gnu.org>
2492 * admin/release.php:
2493 Correct a link from http://download.sourceforge.net/.... to
2494 http://PRdownloadS.sourceforge.net/...
2496 * cc-cmds.el (c-electric-slash):
2497 Extend the handling of clean-up comment-close-slash
2498 also to work when there's a comment terminator on the line.
2499 (c-beginning-of-defun, c-end-of-defun): Refactor and optimise these for
2500 large arg - only take account of top level {..}, except for initial and
2501 final adjustments. M-- C-M-[ae] now go to the right defuns when the
2502 starting point is between defuns. They use the four new functions:
2503 (c-in-function-trailer-p, c-where-wrt-brace-construct,
2504 c-backward-to-nth-BOF-{, c-forward-to-nth-EOF-}): new functions to
2505 support c-\(beginning\|end\)-of-defun.
2507 * cc-engine.el (c-forward-label):
2508 Analyze ":" expressions more rigorously, to exclude
2509 bit-field specifiers from being classed as labels.
2510 (c-forward-label): When analyzing a ":" within a macro, be careful about
2511 using c-forward-syntactic-ws at the macro beginning.
2512 (c-beginning-of-decl-1): Whilst searching for "=" as evidence of a stmt
2513 boundary, check for "operator=", etc.
2515 2006-04-13 Alan Mackenzie <bug-cc-mode@gnu.org>
2517 * tests/access-labels-qt-1.cc, tests/access-labels-qt-1.face, tests/access-labels-qt-1.res:
2518 Jazz up the QT "slots:" declarations by inserting comments and macros
2521 * cc-mode.texi ("Other Commands"):
2522 Move c-set-style (C-c .) here from "Choosing a
2524 ("Styles"): Add @dfn{style}.
2526 * Makefile (docs: target):
2527 Add a line to build cc-mode.XEMACS.info.tar.gz.
2529 * ChangeLog: Correct a typo.
2531 2006-02-19 Alan Mackenzie <bug-cc-mode@gnu.org>
2533 * cc-defs.el (c-emacs-features): Don't assume point-min==1.
2535 * NEWS, cc-cmds.el, cc-mode.el, cc-mode.texi:
2536 Rename c-hungry-backspace to c-hungry-delete-backwards, at the request of
2537 RMS. Leave the old name as an alias.
2539 * cc-awk.el: Correct a typo.
2541 * admin/changes-531.php:
2542 Rename c-hungry-backspace to c-hungry-delete-backwards, at the request of
2543 RMS. Leave the old name as an alias.
2546 (i) Correct the definition of c-beginning-of-defun, to include the
2547 function header within the defun.
2548 (ii) Two minor amendments from Savannah.
2551 In the test for a broken (XEmacs) font-lock-compile-keywords, exclude GNU
2552 Emacs, whose CVS version would now signal an error.
2554 * 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:
2555 (i) Add 2006 to the copyright statement.
2556 (ii) Correct a typo in cc-mode.el.
2558 * cc-mode.texi: (i) Add 2006 to the copyright.
2559 (ii) Correct two typos.
2561 * cc-defs.el: Update the version string to "5.31.4".
2563 2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
2565 * admin/index.php, admin/release.php: Update for release 5.31.3.
2567 * ChangeLog: Fixed last minute bug in cc-mode.el.
2569 * cc-mode.el (c-postprocess-file-styles):
2570 bind inhibit-read-only to t, around the call
2571 to c-remove-any-local-eval-or-mode-variables, so that it works on a RO
2574 2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
2576 * ChangeLog: Update for release 5.31.3.
2578 2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
2582 2006-02-18 Alan Mackenzie <bug-cc-mode@gnu.org>
2584 * cc-mode.el (c-postprocess-file-styles): bind inhibit-read-only
2585 to t, around the call to
2586 c-remove-any-local-eval-or-mode-variables, so that it works on a
2589 2006-02-17 Alan Mackenzie <bug-cc-mode@gnu.org>
2591 * cc-defs.el (c-emacs-features): Don't assume point-min==1.
2593 * cc-awk.el: Correct a typo.
2595 2006-02-15 Alan Mackenzie <bug-cc-mode@gnu.org>
2597 * admin/changes-531.php, cc-mode.texi, NEWS, cc-cmds.el,
2598 cc-mode.el: Rename c-hungry-backspace to
2599 c-hungry-delete-backwards, at the request of RMS. Leave the old
2602 2006-02-11 Alan Mackenzie <bug-cc-mode@gnu.org>
2605 (i) Correct the definition of c-beginning-of-defun, to include the
2606 function header within the defun.
2607 (ii) Two minor amendments from Savannah.
2609 * cc-fix.el: In the test for a broken (XEmacs)
2610 font-lock-compile-keywords, exclude GNU Emacs, whose CVS version
2611 would now signal an error.
2613 2006-02-10 Alan Mackenzie <bug-cc-mode@gnu.org>
2615 * cc-fix.el, cc-guess.el, cc-lobotomy.el, cc-styles.el,
2616 cc-subword.el, cc-vars.el, cc-langs.el, cc-menus.el, cc-mode.el,
2617 cc-fonts.el, cc-bytecomp.el, cc-cmds.el, cc-compat.el, cc-defs.el,
2618 cc-engine.el, cc-awk.el, cc-align.el:
2619 (i) Add 2006 to the copyright statement.
2620 (ii) Correct a typo in cc-mode.el.
2622 * cc-mode.texi: (i) Add 2006 to the copyright.
2623 (ii) Correct two typos.
2625 2006-02-09 Alan Mackenzie <bug-cc-mode@gnu.org>
2627 * cc-defs.el: Update the version number to 5.31.3.
2629 2006-02-02 Alan Mackenzie <bug-cc-mode@gnu.org>
2631 * cc-cmds.el (c-electric-brace): Fix clean-up brace-else-brace
2632 (error due to mbeg, mend being undefined).
2634 2006-02-01 Alan Mackenzie <bug-cc-mode@gnu.org>
2636 * cc-mode.el: File Local variables: Solve the problem where both
2637 `mode' and c-file-offsets are specified: `mode' will overwrite
2639 (c-remove-any-local-eval-or-mode-variables): new function.
2640 (c-postprocess-file-styles): call the above new function, within
2641 c-tentative-buffer-change, to splat `mode' and `eval' before the
2642 second hack-local-variables.
2644 2006-01-31 Alan Mackenzie <bug-cc-mode@gnu.org>
2647 [Alternative patch to GNU Emacs: cc-engine.el V 1.45]
2648 (c-after-change): Protect the match data with save-match-data. It
2649 was getting corrupted by c-after-change-check-<>-operators.
2651 * cc-defs.el: [3 Patches from GNU Emacs: savannah V 1.3[678]:
2652 (top level): Check for a buggy font-lock-compile-keywords ONLY in
2653 XEmacs. GNU Emacs 22 now has a check which would throw an error
2655 (c-emacs-features): Use (point-min) and (point) rather than
2656 hard-coded 1, in case the buffer is narrowed.
2658 * cc-awk.el (c-awk-after-change): Protect the match data with
2659 save-match-data. It was being corrupted when Font Lock was not
2662 2006-01-25 Alan Mackenzie <bug-cc-mode@gnu.org>
2664 * ChangeLog: Update for release 5.31.2.
2666 2006-01-25 Alan Mackenzie <bug-cc-mode@gnu.org>
2670 2006-01-22 Alan Mackenzie <bug-cc-mode@gnu.org>
2672 * cc-mode.texi (Comment Commands): State that C-u M-; kills any
2674 (Electric Keys): Add a justification for electric indentation.
2675 (Hungry WS Deletion): Clear up the names and complications of the
2676 BACKSPACE and DELETE keys.
2678 2006-01-18 Alan Mackenzie <bug-cc-mode@gnu.org>
2680 * cc-mode.el (c-basic-common-init): Concatenate the minor mode
2681 indicators directly onto mode-name, removing c-submode-indicators.
2682 Sometimes, c-s-i got separated from the mode name on the mode
2685 * cc-langs.el (c-mode-menu): Add menu items for Electric Mode and
2688 * cc-engine.el: Concatenate the minor mode indicators directly
2689 onto mode-name, removing c-submode-indicators. Sometimes, c-s-i
2690 got separated from the mode name on the mode line.
2691 (c-beginning-of-statment-1): Distinguish real labels ("case 1:" or
2692 "foo:") from non-labels ("public:").
2693 (c-forward-objc-directive): Replace c-forward-token-2 with crude
2694 coding; c-f-t-2 doesn't move over a token at EOB.
2696 * cc-defs.el (c-version): Update version number to 5.31.2
2698 * cc-cmds.el (c-update-modeline): Concatenate the minor mode
2699 indicators directly onto mode-name, removing c-submode-indicators.
2700 Sometimes, c-s-i got separated from the mode name on the mode
2702 (c-electric-brace, c-electric-semi&comma, c-electric-colon):
2703 Correct doc-strings: "/ln" -> "/la".
2705 2006-01-17 Martin Stjernholm <bug-cc-mode@gnu.org>
2707 * cc-langs.el (c-make-init-lang-vars-fun): Improved the error
2708 message when there's an evaluation error to show whether it's
2709 loaded from source or not.
2710 (c-filter-ops): Made it available at runtime too to work when
2711 `c-make-init-lang-vars-fun' needs to evaluate from source.
2713 2005-12-06 Alan Mackenzie <bug-cc-mode@gnu.org>
2717 2005-12-06 Alan Mackenzie <bug-cc-mode@gnu.org>
2719 * NEWS: Correct the spelling of Masatake YAMATO's name (with
2722 2005-12-06 Alan Mackenzie <bug-cc-mode@gnu.org>
2724 * cc-defs.el (c-version): <- 5.31.1
2726 * cc-defs.el: Restore the (correct) (c-external-require 'cl).
2728 2005-11-30 Alan Mackenzie <bug-cc-mode@gnu.org>
2732 2005-11-30 Alan Mackenzie <bug-cc-mode@gnu.org>
2734 * cc-mode.texi: Spelling and minor typographical changes.
2736 2005-11-29 Alan Mackenzie <bug-cc-mode@gnu.org>
2738 * cc-align.el, cc-awk.el: Spelling corrections.
2740 * cc-cmds.el (c-electric-paren): Only call the
2741 `blink-paren-function' for a CLOSE parenthesis.
2743 * cc-defs.el: Change "(cc-external-require 'cl)" to
2744 "(eval-when-compile (require 'cl))". (The change came from
2745 savannah - I don't understand it.)
2747 * cc-engine.el: Add an autoload to c-guess-basic-syntax (From
2750 * cc-langs.el: Add "(cc-external-require 'cl)".
2752 * cc-mode.el (c-font-lock-init): "Add (font-lock-lines-before
2755 * cc-subword.el: Add a dummy `c-subword-mode' for Emacsen which
2756 lack `define-minor-mode'. (Currently Emacs <21. We might do this
2757 function properly in the future).
2759 2005-11-28 Alan Mackenzie <bug-cc-mode@gnu.org>
2761 * cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New macros
2762 c-sentence-end and c-default-value-sentence end, to cope with
2763 Emacs 22's new function `sentence-end'.
2765 2005-11-26 Martin Stjernholm <bug-cc-mode@gnu.org>
2767 * cc-cmds.el (c-show-syntactic-information): Solved the compat
2768 issue using `c-put-overlay' and `c-delete-overlay'.
2770 * cc-defs.el (c-put-overlay, c-delete-overlay): New compat macros
2771 to handle overlays/extents.
2773 2005-11-25 Alan Mackenzie <bug-cc-mode@gnu.org>
2775 * cc-fix.el: Add definitions of the macros push and pop (for GNU
2779 (i) Load cc-fix.elc for `push' and `pop' (for GNU Emacs 20.4)
2781 * cc-cmds.el (c-show-syntactic-information): change the
2782 highlighting mechanism so it will work in XEmacs too.
2784 Remove several unused dynamic bindings.
2786 * cc-defs.el: Insert c-int-to-char.
2788 * cc-langs.el (c-nonsymbol-token-char-list): Insert a call to the
2789 new macro c-int-to-char. This solves XEmacs's regarding
2790 characters as different from integers.
2792 2005-11-25 Martin Stjernholm <bug-cc-mode@gnu.org>
2794 * cc-fonts.el (c-make-syntactic-matcher): New internal helper.
2796 (c-cpp-matchers, c-basic-matchers-before): Use the `eval'
2797 construct to make the indirect face lookup work in XEmacs.
2799 (c-cpp-matchers): Append the negation char face to the existing
2800 fontification, so that the cpp face doesn't disappear. Use
2801 `c-make-syntactic-matcher' to avoid negation chars in comments and
2804 2005-11-24 Martin Stjernholm <bug-cc-mode@gnu.org>
2806 * cc-fonts.el (c-negation-char-face-name): New variable to map to
2807 `font-lock-negation-char-face' in emacsen where it exists.
2809 2005-11-23 Alan Mackenzie <bug-cc-mode@gnu.org>
2811 * cc-mode.el: Bind c-subword-mode to C-c C-w.
2814 (i) Document the binding C-c C-w, in "Minor Modes" and in "Subword
2816 (ii) Mark c-\(forward\|backward\)-into-nomenclature as superseded
2818 (iii) "Config Basics": change the troublesome "@itemize @w" to
2820 (iv) Eliminate the "@defvr {LIST}" construct in "Adding Styles".
2821 Bring descriptions of subsidiary matters into the definition of
2822 the style description by shifting an "@end".
2824 2005-11-22 Alan Mackenzie <bug-cc-mode@gnu.org>
2826 * cc-mode.texi, cc-subword.el, cc-cmds.el, cc-mode.el: Rename
2827 "c-subword-move-mode" as "c-subword-mode".
2829 * cc-mode.texi, cc-subword.el: cc-subword.el: In
2830 c-forward-subword-internal, check that the regexp doesn't match a
2831 null string. This can happen, e.g., in Info Mode, where ' has the
2832 syntax of a word constituent.
2835 (i) "Subword Movement": Say that subword-move-mode is available in
2837 (ii) "Config Basics": Add a recommendation to beginners to use the
2838 top-level setq mechanism.
2839 (iii) "Config Basics": Deobfuscate the description of top-level
2843 (i) Add a description of the various build commands
2844 (e.g. makeinfo), as supplied by Robert Chassell.
2845 (ii) Move description of `comment-region' from "Other Commands" to
2847 (iii) Remove C-c C-y (which used to be bound to
2848 c-toggle-hungry-state).
2849 (iv) Added a @footnote about the change of the binding C-c C-d.
2850 (v) Reinstated the description of `c-toggle-auto-hungry-state'.
2852 * cc-mode.el: Remove the binding C-c C-y for c-toggle-hungry-state
2854 * cc-cmds.el: Reinsert c-toggle-auto-hungry-state (but with no
2857 2005-11-21 Alan Mackenzie <bug-cc-mode@gnu.org>
2859 * cc-mode.el: Added tty suitable bindings for C-c <delete> and C-c
2860 C-<delete>. (To the c-hungry- delete functions).
2862 2005-11-21 Martin Stjernholm <bug-cc-mode@gnu.org>
2864 * cc-mode.el: Added autoload directive for `c-subword-move-mode'
2865 for use in older emacsen.
2867 2005-11-20 Alan Mackenzie <bug-cc-mode@gnu.org>
2870 (i) Insert a binding for C-c C-backspace into
2871 c-bind-special-erase-keys which works in TTYs.
2872 (ii) Make sure that when file styles are used, any explicitly
2873 given style variables take priority over those in the style. Do
2874 this by calling `hack-local-variables' a second time.
2876 * cc-vars.el: Add language specific customization widgets for AWK
2877 to c-doc-comment-style, c-require-final-newline and
2878 c-default-style. Add a defcustom for awk-mode-hook. Give
2879 c-syntactic-element and c-syntactic-context doc-strings by
2880 directly setting their `variable-documentation' propery. This
2881 allows Emacs 22.1 to read these with C-h v.
2883 * cc-awk.el: Apply a tidy-up patch (from Stefan Monnier).
2885 2005-11-20 Martin Stjernholm <bug-cc-mode@gnu.org>
2887 * cc-mode.texi: Mention gtkdoc.
2889 * cc-mode.texi: The concept index also contains the keys. Make
2890 that more obvious so that the keys are found more easily.
2892 * cc-mode.texi: Updated the Hungry WS Deletion section on the
2893 details about the C-c C-<backspace> bindings etc.
2895 * cc-mode.texi: Added a section about the subword minor mode.
2897 * cc-fonts.el, cc-vars.el (gtkdoc-font-lock-doc-comments,
2898 gtkdoc-font-lock-doc-protection, gtkdoc-font-lock-keywords):
2899 GtkDoc patterns contributed by Masatake YAMATO.
2901 (c-doc-comment-style): Made GtkDoc default in C mode.
2903 2005-11-19 Martin Stjernholm <bug-cc-mode@gnu.org>
2905 * cc-mode.el: Fixed key bindings for C-c C-<backspace> and C-c
2908 (c-bind-special-erase-keys): New function for use on
2909 `normal-erase-is-backspace-hook' to bind C-c C-<delete> correctly.
2911 * cc-cmds.el (c-hungry-delete): New function to fix <delete> key
2912 behavior in XEmacs according to `delete-forward-p'.
2913 C.f. `c-electric-delete'.
2915 2005-11-18 Alan Mackenzie <bug-cc-mode@gnu.org>
2917 * cc-mode.texi: DVI stuff: Remove the quotes from "GNU Emacs
2918 Manual" and friends. Complete several cross references with their
2919 fifth parameter (the name of the printed manual).
2921 "Indentation Commands": Tidy up `c-indent-command', putting the
2922 variables `c-tab-always-indent' and `c-insert-tab-function' inside
2923 its description. Inserted some "printed manual names" into cross
2924 references where they were missing. Move description of
2925 `indent-for-comment' into ...
2927 "Comment Command": A new @section under "Commands"; it contains
2928 the description of `indent-for-comment'; this was taken out of
2929 "Indentation Commands". Add GNU Emacs's new name `comment-dwim'
2932 "Sample .emacs File": Change "@example" to "@verbatim" so that the
2933 text isn't indented. Reorder the Lisp forms.
2935 2005-11-08 Alan Mackenzie <bug-cc-mode@gnu.org>
2937 * cc-mode.texi: "Configuration Basics": Add a note that ".emacs"
2938 means "whatever initialization file you fancy". Also, another
2939 note that the mode hooks are good places to put personal
2942 "Performance Issues": Remove the recommendation to put defun
2943 braces at column 0, replacing it with a historical remark.
2945 "Limitations and Known Bugs": State that C++ templates aren't yet
2948 2005-11-06 Alan Mackenzie <bug-cc-mode@gnu.org>
2950 * cc-mode.texi: Renamed @chapter "Getting Connected" to "Getting
2951 Started" and @chapter "Config Strategies" to "Config Basics".
2953 "Getting Started": Added "quick fix" configurations for four of
2954 the most common requests (c-basic-offset, c-set-style,
2955 c-electric-mode, <RET> should indent NL).
2957 "FAQ": Permuted the questions a little. Added "How can I change
2958 the indent level from 4 spaces to 2 spaces?". Added several cross
2961 2005-11-05 Alan Mackenzie <bug-cc-mode@gnu.org>
2963 * cc-mode.el: Move c-toggle-hungry-state from "C-c C-d" to "C-c C-y". Give
2964 c-hungry-backspace and c-hungry-delete-forward permanent key bindings.
2966 * cc-mode.texi: Document the new state of affairs: Nodes changed: "Minor
2967 Modes", "Hungry WS Deletion", "Sample .emacs File"
2970 "Style Variables": New @section explaining what style variables are and
2972 "Permanent Customization": Removed this @section, since its contents have
2973 been moved elsewhere.
2974 "c-offsets-alist": New @section
2976 Removed much commented out material, including @examples in the Line-Up
2979 "Config Strategies": (i) Added a summary of style variables; (ii)
2980 Corrected the priority of settings made by "File Local Variables";
2981 (iii) Clarified and corrected how top-level `setq's interact with
2982 styles; (iv) Added a terse but accurate description of the "user"
2984 "Style Variables": Took over most of the stuff from "Styles", its
2985 parent. Added a @pxref to each item in the list of style variables.
2986 "Built-in Styles": Corrected the description of the "user" style. Other
2987 styles DO NOT inherit from it - they inherit from the factory defaults
2988 in c-fallback-style.
2989 "Adding Styles": Clarification of inheritance from c-fallback-style.
2991 "Hanging Braces": Replace a tedious flowchart of what CC Mode does, with
2992 a description of how to go about configuring the thing.
2993 "Custom Braces": Move description of c-syntactic-context to near the
2994 top of the node, and note the other three circumstances it gets bound
2995 (together with @xrefs).
2996 "Hanging Semicolons and Commas": Note that c-syntactic-context is bound.
2998 "Indentation Engine Basics": Clarify first stage of indentation process.
2999 "Syntactic Symbols" (and sub-nodes): Note the syntactic symbols which
3000 don't have and anchor point, or have additional info in a syntactic
3003 "Customizing Indentation": Stuff about c-offsets-alist has been moved to
3004 its own new @section.
3005 "Line-Up Functions": Add a mention of the calling convention together
3006 with a pointer to "Custom Line-Up".
3007 "Other Indentation": Clarify the whole @section. State that File local
3008 variables take precedence over all else, even settings in hooks.
3010 2005-11-04 Alan Mackenzie <bug-cc-mode@gnu.org>
3012 * cc-cmds.el (c-mask-paragraph): Remove the "(if t ..." construct
3013 which was experimentally inserted into V 5.314 (2005-08-18) to
3014 minimise the patch size by not changing the indentation level.
3016 2005-11-03 Alan Mackenzie <bug-cc-mode@gnu.org>
3018 * cc-cmds.el (c-electric-semi&comma): Bind c-syntactic-context for
3019 calls to "criteria functions", for consistency with other calls to
3022 2005-10-31 Alan Mackenzie <bug-cc-mode@gnu.org>
3024 * cc-cmds.el (c-indent-command): expunge use of
3025 `current-prefix-arg', since this might be the prefix arg to a
3026 command which calls c-indent-command as a function. Change the
3027 interactive spec from "p" to "P".
3029 2005-10-04 Alan Mackenzie <bug-cc-mode@gnu.org>
3032 "Minor Modes": Document the command c-toggle-syntactic-indentation.
3033 "Analysis": Formalise the description of
3034 c-show-syntactic-information to a quasi-@defun form. Describe the new
3035 feature of highlighting anchor positions.
3036 Make sure there's a blank line at the top of each node.
3038 * cc-mode.texi: "Indentation Engine Basics":
3039 (i) Rearrange the paragraphs more logically;
3040 (ii) make @dfn's out of "syntactic symbol", "anchor position" and
3042 (iii) Make an @enumeration out of the two-step indentation process.
3043 (iv) Add a paragraph motivating c-syntactic-indentation, complete with a
3044 reference to "Config Strategies".
3046 2005-10-02 Alan Mackenzie <bug-cc-mode@gnu.org>
3048 * cc-mode.texi: "Custom Line-Up":
3049 (i) Increase the concision of the page.
3050 (ii) Comment out the example. (Maybe this should go into its own
3052 (iii) Specify precisely the conventions for a line-up function, in
3053 particular, that point may not be moved.
3054 (iv) Add in the suggestion that c-special-indent-hook may sometimes be a
3055 better idea than line-up functions.
3056 There are minor consequential changes on other pages.
3058 2005-09-18 Alan Mackenzie <bug-cc-mode@gnu.org>
3061 (i) Partition the over-large @section "Line-Up Functions".
3062 (ii) Expand the description of c-special-indent-hook.
3063 (iii) Add cross references between "Other Indentation" and "Custom
3064 Line-up", emphasizing that c-special-indent-hook functions and line-up
3065 functions are alternatives.
3067 2005-09-17 Alan Mackenzie <bug-cc-mode@gnu.org>
3069 * cc-styles.el: Amend the doc-string of c-set-style, in reponse to
3070 a report from Joseph Kiniry <kiniry@acm.org> that it was difficult
3073 2005-09-11 Martin Stjernholm <bug-cc-mode@gnu.org>
3075 * cc-engine.el (c-on-identifier): Fixed bug when at the first char
3078 * cc-engine.el (c-on-identifier): Handle the "operator +" syntax
3081 2005-09-09 Alan Mackenzie <bug-cc-mode@gnu.org>
3083 * cc-mode.texi ("Syntactic Analysis"): Minor amendments.
3084 ("Syntactic Symbols"): Partition this monster into a section with
3085 thirteen subsections, each of which (more or less) illustrates a coherent
3086 grouping of symbols.
3087 Replace the spurious references to substatement-block-intro with
3088 statement-block-intro.
3089 Add @ssindex entries for those symbols missing them.
3091 2005-09-08 Alan Mackenzie <bug-cc-mode@gnu.org>
3093 * cc-mode.texi: Some general tidying up and clarification. Also:
3094 (Hooks): mention c-special-indent-hook
3095 (FAQ): Commented out the question about M-[ae] going into blocks.
3097 2005-08-29 Alan Mackenzie <bug-cc-mode@gnu.org>
3100 55 Changes, great and small. Most of them are minor linguistic
3101 improvements, clarifications, adding xrefs, bug fixes, or the like, but
3102 there are also several more notable changes:
3103 (i) "Config Strategies": State which setting takes precedence when
3104 conflicting settings are made (e.g. both in a style and in a hook).
3105 (ii) "Config Strategies": Add a bit about "File Styles".
3106 (iii) "File Styles": Fleshed out this chapter quite a bit.
3107 (iv) "Mode Initialization": Removed this embryonic node (which was far
3108 from complete or useful) and all references to it.
3110 2005-08-18 Alan Mackenzie <bug-cc-mode@gnu.org>
3112 * cc-cmds.el (c-mask-paragraph): correct, so that auto-fill
3113 doesn't split a c-comment's last word from a hanging "*/" when a
3114 space is typed between them after fill-column.
3116 cc-defs.el: New macro c-delete-and-extract-region.
3118 2005-06-24 Alan Mackenzie <bug-cc-mode@gnu.org>
3120 * cc-styles.el (c-set-style, c-setup-paragraph-variables): Abort
3121 the command if we're not in a CC Mode buffer.
3123 2005-06-13 Alan Mackenzie <bug-cc-mode@gnu.org>
3125 * cc-align.el (c-lineup-C-comments): Correct indentation with
3126 blank comment-prefix, and a blank line as the comment's second
3129 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3131 * cc-fonts.el (c-cpp-matchers, c-basic-matchers-before):
3132 Incorporated the patterns
3133 added in the Emacs development branch for the new Emacs 22 face
3134 `font-lock-negation-char-face'.
3136 # Also folded some long lines.
3138 * cc-fonts.el (c-invalid-face-name):
3139 Use "red1" instead of "red" since it stands out
3140 better in xterms and DOS terminals.
3142 # Not applicable in the development version since this face is simply
3143 # an inverted version of font-lock-warning-face.
3145 * cc-engine.el (c-literal-faces):
3146 Added `font-lock-comment-delimiter-face' which is
3149 # NB: The new way to font lock comments in the development version of
3150 # Emacs causes massive breakage in the faces test suite. 000tests.el
3151 # needs to be amended.
3153 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3155 * cc-mode.texi, cc-subword.el:
3156 Change the FSF's address in the copyright statement. Incidentally,
3157 change "along with GNU Emacs" to "along with this program" where it occurs.
3159 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3162 Add documention for the new electric minor mode and finish that for clean-up
3163 comment-close-slash. Tidy up the structure a bit, make some minor linguistic
3164 improvements. In detail:
3166 Change "Clean-ups" from being a section of "Custom auto-newlines) to being its
3167 own section, since it documents some stuff which is independent of
3169 Change "Auto-newlines" and "Hungry WS Deletion" from being subsections of
3170 "Minor Modes" to their own sections, since they're to important to hide.
3171 Move "Electric Keys" alongside them, since it now bears the same
3172 relationship to "Minor Modes" as "Auto-newlines" and "Hungry WS .." do.
3173 "Indentation Commands": Add a convenience description of standard (X)Emacs
3176 (i) Document the new "electric minor mode" with toggle C-c C-l, and the
3177 coupling between it and c-toggle-auto-newline.
3178 (ii) Remove the description of the defunct `c-toggle-auto-hungry-state'.
3179 (iii) Update the description of the modeline flags.
3180 (iv) Recast the node considerably in the process.
3181 "Electric Keys and Keywords":
3182 (i) Add a note that electric minor mode needs to be enabled for (most of)
3183 the stuff here to work.
3184 (ii) Mention the new clean-up comment-close-slash.
3185 (iii) Note the electric actions which don't need electric minor mode to be
3187 "Sample .emacs File": Replace c-toggle-auto-hungry-state with
3188 c-toggle-\(auto-newline\|hungry-state\).
3189 "FAQ": Add an entry "How do I stop my code jumping all over the place when I
3192 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3194 * cc-cmds.el: Correct previous patch to c-toggle-auto-newline.
3196 * NEWS: Add an entry for the new clean-up `comment-close-slash'.
3198 * cc-mode.texi: Document the new clean-up `comment-close-slash'.
3201 Make C-c C-a (`c-toggle-auto-newline') forcibly enable c-electric-flag.
3203 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3205 * cc-vars.el, cc-cmds.el:
3206 New clean-up `comment-close-slash' on c-electric-slash: if enabled, typing `/'
3207 just after the comment-prefix of a C-style comment will close that comment.
3209 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3212 Sync with Lute Kamstra's patch from emacs-devel to prevent a superfluous
3213 cc-mode.ss index file being built with texi2dvi.
3215 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3217 * cc-fonts.el (c-basic-matchers-before, c-complex-decl-matchers):
3219 "not-arrow-prefix" regexp used in Pike.
3221 * cc-langs.el (c-other-op-syntax-tokens): Only C++ has digraphs.
3223 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3225 * cc-mode.texi: Resolve some CVS conflict markers.
3228 Custom Filling and Breaking: State that c-comment-prefix regexp can be
3229 an association list.
3231 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3233 * 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):
3235 language constants to control cpp syntax in a cleaner way.
3237 (c-cpp-expr-functions): Renamed from c-cpp-defined-fns.
3239 (c-cpp-matchers, c-forward-to-cpp-define-body): Use them.
3241 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3243 * cc-langs.el, cc-fonts.el (c-string-escaped-newlines, c-multiline-string-start-char):
3245 constants and variables to specify how newlines in string literals work.
3247 (c-font-lock-invalid-string): Use them.
3250 Removed hint that the one-liner-defun cleanup only would be
3251 useful/relevant in AWK mode.
3253 * cc-cmds.el (c-try-one-liner):
3254 Robustness fix if an unbalanced close brace is
3255 entered. Optimization by avoiding going back over arbitrarily large
3256 blocks. Removed hints that this function only would be
3257 relevant/useful in AWK.
3259 # I also got the chance to put in a clarifying comment in Alans code!
3262 (c-electric-brace): Indent syntactically after the cleanups since
3263 lineup functions might do it differently then.
3265 * cc-engine.el, cc-langs.el (c-opt-op-identifier-prefix):
3266 New language constant and variable.
3268 (c-just-after-func-arglist-p, c-after-special-operator-id,
3269 c-search-decl-header-end, c-inside-bracelist-p): Use it.
3271 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3273 * cc-engine.el (c-guess-basic-syntax):
3274 Handle operator declarations somewhat better
3277 # Full fix is in 5.31 only.
3279 * cc-align.el, cc-engine.el (c-after-special-operator-id):
3280 New helper to handle C++ operator identifiers.
3282 (c-lineup-topmost-intro-cont, c-just-after-func-arglist-p,
3283 c-guess-basic-syntax): Handle C++ operator identifiers in declarations.
3285 * cc-langs.el (c-assignment-operators):
3286 Added the trigraph version of ^= too.
3288 * cc-langs.el (c-assignment-operators):
3289 Added the trigraph version of |= in C++.
3291 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3294 "Advanced Customizations": Finally remove the vestiges of this chapter.
3295 Resolve three other minor FIXMEs.
3297 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3299 * cc-fonts.el (c-font-lock-declarators):
3300 Handle `c-decl-hangon-kwds' after the
3303 * cc-engine.el (c-guess-basic-syntax):
3304 When deciding whether an arglist is
3305 "nonempty", ignore a comment after the open paren if it isn't followed
3306 by a non-comment token on the same line.
3308 * cc-engine.el (c-guess-basic-syntax):
3309 Case 4: Enable heuristics below the point to
3310 cope with classes inside special brace lists in Pike.
3313 Reverted the attempt to clean up the handling of arglists since I've
3314 given up trying to get it to work in a somewhat compatible way. It's
3315 simply too broken by design and has to be fixed in a new major
3318 The revert affects these revisions of cc-engine.el: 5.517 made
3319 2004-06-29 and 5.518 made 2004-09-26. Exceptions are the utility
3320 functions `c-at-expression-start-p' and `c-at-statement-start-p',
3321 and the new flag to `c-looking-at-inexpr-block'.
3323 # In connection with this, the following tests are reverted:
3325 # Tests changed 2004-06-29 in connection with 5.517:
3326 # tests/arglist-18.c: 1.3
3327 # tests/arglist-18.res: 1.5
3328 # tests/arglist-21.pike: 1.2
3329 # tests/arglist-21.res: 1.2
3330 # tests/arglist-3.cc: 1.4
3331 # tests/arglist-3.res: 1.10
3333 # Tests changed 2004-09-26 in connection with 5.518:
3334 # tests/arglist-11.res: 1.6
3335 # tests/arglist-17.res: 1.2
3336 # tests/arglist-3.res: 1.11
3337 # tests/class-12.java: 1.7
3338 # tests/class-12.res: 1.12
3339 # tests/if-4.res: 1.4
3340 # tests/inexprstat-1.pike: 1.5
3341 # tests/inexprstat-1.res: 1.9
3342 # tests/inexprstat-2.cc: 1.9
3343 # tests/inexprstat-2.res: 1.11
3344 # tests/top-4.c: 1.2
3345 # tests/top-4.res: 1.9
3347 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3349 * cc-mode.texi: Correct a typo in the sourceforge CVS URL.
3352 Add a statement that the manual is GPL'd. Add a pointer to the manual's source
3355 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3357 * cc-langs.el, cc-cmds.el:
3358 cc-cmds.el: Amend c-point-syntax to handle macros.
3359 cc-langs.el: Comment c-opt-cpp-prefix with a "TODO: handle escaped EOLs".
3361 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3363 * cc-guess.el (cc-guess-install):
3364 New function to install an already guessed style
3367 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3370 Improvement contributed by Masatake YAMATO: Frequency is now taken
3371 into account to make a better guess.
3373 (cc-guess-region): Inverted the RESET argument to make it more
3374 convenient. The guessed style is also merged into `c-offsets-alist'
3377 (cc-guess, cc-guess-view-style): New functions.
3379 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3381 * cc-defs.el (c-tentative-buffer-changes):
3382 No longer sets `inhibit-read-only' -
3383 `c-save-buffer-state' should be used anyway if the change always is
3386 #(c-save-buffer-state, c-tentative-buffer-changes): Extended the
3387 #docstrings a bit more.
3389 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3391 * cc-cmds.el, cc-vars.el, cc-mode.el, cc-langs.el, cc-defs.el, cc-engine.el:
3392 Implement togglable electricity:
3394 cc-defs.el: Enhance c-save-buffer-state's doc-string, saying when it
3397 cc-engine.el: Add the new buffer-local variable, c-electric-flag.
3399 cc-langs.el: Change the name of c-toggle-auto-state to
3400 c-toggle-auto-newline.
3402 cc-mode.el: Rename c-toggle-auto-state to c-toggle-auto-newline. Remove
3403 the binding for c-toggle-auto-hungry-state. Add the binding C-c C-l
3404 for the new c-toggle-electric-state.
3406 cc-vars.el: Make c-syntactic-indentation buffer local.
3409 Add `c-bytecomp-defun's for c-\(forward\|backward\)-subword.
3410 c-update-modeline: Add the new modeline flag `l' for
3411 `c-electric-flag'. Make the auto-newline flag `a' dependent on `l'.
3412 c-toggle-auto-state: Rename it to `c-toggle-auto-newline'. Make the old
3413 name an alias of the new name.
3414 Remove `c-toggle-auto-hungry-state'.
3415 Add new function `c-toggle-electric-state'.
3416 c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|
3417 paren\|continued-statement\): Adapt these functions to do electric
3418 things only when c-electric-flag is non-nil.
3419 c-point-syntax, c-brace-newlines, c-try-oneliner: Extract these new
3420 functions from c-electric-brace.
3421 c-point-syntax: Add a check for "virtual semicolons" in AWK mode, so that
3422 the tentative extra newline doesn't change the syntax of the following
3424 c-electric-brace: restructure by extracting the above functions. Tidy up
3425 the coding somewhat.
3426 c-electric-semi&comma, c-electric-colon, c-electric-paren: restructure a bit.
3429 "Electric Keys": Amend description of `<' and `>': they are also electric when
3430 they are template brackets.
3431 "Other Commands": Add an entry for the standard Emacs command `comment-region'
3432 which has CC Mode binding C-c C-c.
3433 "Custom Filling and Breaking": Purge the description of
3434 `c-comment-prefix-regexp' of confusing gobbledygook.
3436 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3439 "Filling and Breaking": Add a cross reference to "Custom Filling and
3441 Several minor amendments.
3443 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3445 * cc-mode.texi: Merge the changes made on branch texi-0-1 back to HEAD.
3446 CV1: Committing in .
3448 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3450 * cc-mode.texi: "Overview": Get rid of reference to "AWK" section;
3451 "Sample .emacs FILE": Put key bindings into c-initialization-hook;
3452 Move the c-add-style call from out of the c-mode-hook.
3454 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3457 In the GNU/XEmacs conditional things, replace "X" by "XEMACS" for clarity.
3458 Rename the chapter "Indentation Engine" to "Indentation Engine Basics".
3459 "Indentation Commands": Add stuff about macros (taken from the old "Macro
3461 "Other Commands": Move the description of "c-backslash-region" into here.
3462 Rename "Macro Handling" to "Custom Macros", having moved the stuff other than
3463 customization to other chapters.
3466 Remove the erroneous (doubly inserted) patch from yesterday.
3468 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3470 * cc-cmds.el (c-show-syntactic-information):
3471 Show the anchor position(s) using
3472 faces. Thanks to Masatake YAMATO for the idea.
3474 * cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el (c-submode-indicators):
3475 Changed name from `c-auto-hungry-string' since it's
3476 now used to track another submode.
3478 (c-update-modeline): Converted to function and extended to check
3479 `c-subword-move-mode'.
3481 (c-forward-into-nomenclature, c-backward-into-nomenclature): Converted to
3482 compat aliases for `c-forward-subword' and `c-backward-subword'.
3484 * MANIFEST, Makefile: Added cc-subword.el.
3487 New functions and minor mode to handle SillyCapsedStyleIndentifiers,
3488 contributed by Masatake YAMATO:
3490 (c-forward-subword, c-backward-subword, c-mark-subword, c-kill-subword,
3491 c-backward-kill-subword, c-transpose-subwords, c-capitalize-subword,
3492 c-downcase-subword, c-upcase-subword): Functions corresponding to the
3493 standard word handling functions.
3495 (c-subword-move-mode): Minor mode that replaces all the standard word
3496 handling functions with their subword equivalences.
3497 #Note that this requires `define-minor-mode', which is known to exist in
3498 #Emacs 21 and later.
3500 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3503 c-cleanup-list: Insert a customization entry for one-liner-defun.
3505 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3508 Give c-tentative-buffer-changes its own name in its def-edebug-spec.
3511 c-electric-brace: Make the one-liner-defun clean-up work with
3512 empty-defun-braces. o-l-d now compacts space before a comment, if this will
3513 make things fit on one line.
3515 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3518 Added some tentative entries for version 5.31: (i) Older [X]Emacs
3519 versions are no longer supported; (ii) Revision of the Manual; (iii)
3520 Improvements to AWK support.
3523 "AWK Mode Defuns": Removed this subsection, transferring its contents to
3525 "Movement Commands": Condensed the separate descriptions of
3526 complementary -backward-* and -forward-* commands into joint
3529 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3532 "Introduction": Integrated Alan more tightly into CC-Mode. ;-)
3533 "Overview": New chapter describing the structure of the manual.
3534 "Other Commands": Added a description of c-macro-expand.
3535 "Built-in Styles": Added a description of the new "awk" style.
3536 "Custom Braces" and "Hanging Semicolons and Commas": Specify the meaning of
3537 point in action functions, and that is must be preserved.
3538 "Clean-ups": Document the new clean-up one-liner-defun and associated
3539 variable c-max-one-liner-length.
3540 "Customizing Indentation" is now its own chapter rather than being a section
3541 of "Indentation Engine".
3542 "AWK Mode: Removed the entire chapter, moving the two remaining useful
3543 sections to "Font Locking" and "Movement Commands".
3544 Added/Moved lots of index entries.
3546 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3548 * cc-cmds.el, cc-styles.el, cc-vars.el, cc-align.el:
3549 Introduce an "awk" style, mainly for auto-newline and clean-ups.
3550 cc-align.el: new function c-snug-1line-defun-close
3551 cc-cmds.el: In c-electric-brace, add code for new clean-up one-liner-defun.
3552 cc-styles.el: Add the new "awk" style.
3553 cc-vars.el: Add description of one-liner-defun to c-cleanup-list's doc-string.
3554 New user options, c-max-one-liner-length.
3555 In c-default-style, set the default style for AWK to "awk".
3557 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3559 * MANIFEST: Don't think there's any need for credits in this file.
3561 * README, ANNOUNCEMENT: Alan does more than AWK nowadays. :)
3563 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3565 * cc-engine.el (c-forward-label):
3566 Fixed fontification of macros inside labels.
3568 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3571 (i) Some general tidying up, remove @ignore sections, etc.
3572 (ii) Firm up the mechanism for generating @xrefs to the Emacs/Xemacs
3573 manual and the Elisp/Lispref manual. There are now four macros,
3574 @emacsman{}, @lispref{}, @emacsmantitle{}, @lispreftitle{} which
3575 generate the filenames and titles (for the printed versions) of the
3576 manuals pertinent to Emacs or XEmacs, depending on whether the makeinfo
3577 variable `X' is defined or not. The titles were taken from the
3578 @settitle lines in the source files of the four manuals. In the
3579 process, the title "The Emacs Editor" has been amended to "GNU Emacs
3582 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3584 * cc-mode.texi: Much general tidying up of the wording.
3586 (i) Add a note that c-electric-* only do their stuff when last on
3588 (ii) State that a `before' auto-newline is never added if the `{'
3589 etc. is "already on a newline".
3590 (iii) Replace the statement of where auto-newlines go by default (it
3591 was wrong and oversimplified) by a statement that the style system
3592 does the configuration most of the time.
3593 "Custom Auto-newlines"
3594 (i) Make the page what it says it is, removing the stuff which is now
3596 (ii) Add a @dfn{} for "hang", and "hanging on the left/right".
3599 (i) Insert an @enumerated section describing the algorithm.
3600 (ii) Insert a more robust description of c-hanging-braces-alist.
3603 (i) Update this page to mirror "Hanging Braces".
3604 (ii) State that the default action (if no alist entry) is to add no
3606 "Custom Semis and Commas"
3607 (i) Add clarification that criteria functions don't themselves add
3609 (ii) State that NLs never get added _before_ a `;' or `,'.
3612 (i) Give an actual definition of "Clean-up" for the @dfn{}. ;-)
3614 Moved the @section "Custom Brace and Colon Hanging" away from "Advanced
3615 Customizations" to underneath "Hanging Braces", removing the spurious
3616 "and Colons" from its name.
3617 Moved the contents of the @section "Customizing Semicolons and Commas"
3618 away from "Advanced Customizations" and inserted them into "Hanging
3619 Semicolons and Commas" (which previously had only a pointer into the
3621 "Advanced Customization" is now almost content free.
3623 Add Experimental macros for "Emacs"/"XEmacs" and "Elisp"/"Lispref", in
3624 the hope they might enable a better XEmacs version of the manual.
3626 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3628 * cc-engine.el (c-looking-at-bos):
3629 Obsoleted in favor of `c-at-statement-start-p' and
3630 `c-at-expression-start-p'.
3631 #I actually forgot about this when I introduced
3632 #`c-at-statement-start-p', but I think the new ones got better names
3633 #so I deprecate this one anyway.
3635 * cc-defs.el (c-tnt-chng-record-state):
3636 Don't signal an error if the mark isn't set.
3638 * cc-engine.el (c-guess-continued-construct, c-guess-basic-syntax): Use
3639 `c-forward-decl-or-cast-1' to more accurately detect functions inside
3642 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3645 Reorder the chapters a bit on the principle "Most basic earliest":
3646 Move "Font locking" with contents to just after "Commands".
3647 Move "Indentation Engine" with contents to just after "Custom Filling and
3649 Move "Custom Filling and Line Breaking" to before "Custom Auto-Newlines".
3651 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3654 Add a "Mode Initialization" section (as yet, content free) to
3655 "Configuration Strategies".
3656 Move "Minor Modes" into the "Commands" chapter. Remove the
3657 configuration instructions from its submode "Auto-newlines". Outline
3658 the default configuration for auto-newlines here.
3659 Rename the old "Auto-newline insertion" to "Customizing Auto-newline
3660 Mode" and make it a @chapter in its own right, containing four
3661 sections. The content of this @chapter is yet to be adapted.
3662 Amend the descriptions in "Minor Modes" of the key sequences, using
3663 @table rather than an unbroken textual paragraph.
3664 Amend "Electric Keys", so that there is explicit reference to
3665 "Clean-ups" in the right places. All electric actions are now
3666 collected together in this section.
3667 Condense the description of '*' and '/' in Electric keys.
3668 In "Clean-ups" insert "@tie{}" where a critical space was getting lost
3670 Tidy up a lot of wording.
3671 Introduce an experimental facility which will build either a GNU Emacs
3672 or an XEmacs specific info file.
3674 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3676 * cc-engine.el (c-at-expression-start-p):
3677 New function like `c-at-statement-start-p'
3678 that additionally recognizes commas and expression parentheses as
3681 (c-at-statement-start-p): The optional COMMA-DELIM argument is gone.
3682 Use `c-at-expression-start-p' instead.
3684 (c-guess-basic-syntax): More consistent anchoring for `arglist-close'.
3685 The main effect is that the anchor position is at the start of the
3686 statement instead of the opening paren even when the opening paren is
3687 at boi. Thus odd indentation is avoided in that case if
3688 `arglist-close' is set to `+'.
3690 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3693 Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps.
3695 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3698 Move the page "Hungry WS Deletion" into the "Commands" chapter, and
3699 revise this node for (hopefull) increased clarity.
3701 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3704 Reduce the length of many node names, (following suggestion on
3706 Tidy up some of the wording.
3708 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3710 * cc-mode.texi: Added ACM to the list of authors.
3711 Renamed "Other Electric Commands" to "Electric Keys and Keywords"
3712 In "Electric Keys and Keywords", added descriptions of {, }, :, ;, ,,,
3713 and tidied up the wording a bit.
3714 Tidied up the wording and presentation of "Configuration Strategies".
3715 In "Customizing Filling and Line Breaking", expanded the description of
3716 c-comment-prefix-regexp.
3718 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3721 Moved the "Commands" chapter to near the start of the file.
3722 Moved "Other Electric Commands" into the "Commands" chapter.
3723 Split "Text Filling and Line Breaking" into the "Filling and Line
3724 Breaking Commands" (a section under "Commands"), and "Customizing Filling
3727 2005-06-01 Alan Mackenzie <bug-cc-mode@gnu.org>
3729 * cc-mode.texi: Update the master menu for the file.
3732 This change is the first stage in the restructuring of cc-mode.texi.
3733 Added new chapter, "Configuration Strategies", and converted "Hooks" and
3734 "Styles" (together with the latter's sub-nodes) into sections of this new
3736 Converted "Syntactic Symbols" and "Customizing Indentation" (together with
3737 the latter's sub-nodes "Interactive C.." and "Permanent C..") into sections of
3738 "Indentation Engine". "Customizing Indentation" has acquired "Line-Up
3739 Functions", "Custom Line-up Functions" and "Other Special Indentations" as
3740 sub-nodes, but has lost "Hooks" and "Styles").
3741 "Advanced Customization", formerly a sub-node of "Customizing Indentation"
3742 is now a chapter in its own right. It has lost "Custom Line-Up Functions" and
3743 "Other Indentations".
3745 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3747 * Checklist.txt: Some updates.
3749 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3751 * cc-engine.el (c-anchor-stmt, c-add-class-syntax, c-add-inclass-syntax, c-guess-continued-construct, c-guess-basic-syntax):
3753 anchoring of various brace block constructs inside arglists, so that
3754 all variants of them are treated uniformly.
3756 (c-anchor-stmt): Changed calling convention and renamed from
3757 `c-add-stmt-syntax'.
3759 (c-looking-at-inexpr-block): Added flag to avoid heuristics that
3760 doesn't work for unclosed blocks.
3762 (c-at-statement-start-p): New function.
3763 #Not used anywhere as it turned out, but it seems useful and it's
3766 (c-guess-basic-syntax): Simplified the `paren-state' variable to
3767 always contain the whole paren state.
3769 * cc-align.el (c-block-in-arglist-dwim):
3770 Isolated the DWIM logic to line up brace
3771 blocks in arglists to this function. Also extended it to cope better
3772 with various sorts of blocks.
3774 (c-lineup-arglist, c-lineup-arglist-close-under-paren,
3775 c-lineup-close-paren): Use `c-block-in-arglist-dwim'. Fixed
3776 indentation inside Pike special brace lists.
3778 (c-lineup-inexpr-block): Use absolute indentation.
3780 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3782 * cc-engine.el, cc-fonts.el:
3783 Fixes in handling of Objective-C directives, e.g. directives spanning lines
3784 should work reasonably well now.
3786 (c-put-c-type-property, c-clear-c-type-property): New helpers.
3788 (c-forward-objc-directive): New function to move over any ObjC directive.
3790 (c-just-after-func-arglist-p, c-guess-basic-syntax,
3791 c-basic-matchers-before): Use it.
3793 (c-font-lock-objc-iip-decl): Removed.
3795 * cc-engine.el (c-guess-basic-syntax):
3796 Some improvement in the template arglist
3798 #I.e. one use less of c++-template-syntax-table.
3800 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3802 * cc-styles.el (c-style-alist):
3803 Fixed several inconsistencies in the Whitesmith
3807 Documented c-lineup-after-whitesmith-blocks. Some other fixes.
3809 * cc-align.el (c-lineup-after-whitesmith-blocks):
3810 New lineup function to get lines
3811 after Whitesmith style blocks correctly indented.
3813 (c-lineup-whitesmith-in-block): Backed out the compensation for
3814 opening parens since it's done using `add' lists in the style
3815 definition instead. Don't use the anchor position since it varies too
3816 much between the syntactic symbols. :P
3818 * cc-vars.el (c-valid-offset): Updated.
3821 Updated the doc for offset specifications on `c-offsets-alist'.
3823 * cc-engine.el (c-evaluate-offset):
3824 Extended to handle lists where the offsets are
3825 combined according to several different methods: `first', `min',
3826 `max', and `add'. Report offset evaluation errors with
3827 `c-benign-error' so that some kind of reindentation still is done.
3829 * cc-engine.el (c-guess-basic-syntax):
3830 Anchor `arglist-intro' the same way as
3831 `arglist-cont-nonempty' and `arglist-close'.
3833 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3836 Updated the parts dealing with line-up functions. Fixed some
3837 terminology to use the same words everywhere.
3839 * cc-langs.el (c-opt-identifier-concat-key-depth): New constant.
3841 #(c-identifier-ops): Talk about the "." operator in Java.
3843 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3846 Use `cc-bytecomp-fboundp' and cc-bytecomp-boundp' in a number of places.
3848 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3850 * cc-defs.el (c-langs-are-parametric):
3851 Made it known at compile time to avoid
3854 * cc-defs.el (c-langs-are-parametric):
3855 Must be known at compile time for the sake of
3858 (c-mode-is-new-awk-p): Made it a macro to delay expansion of
3859 `c-major-mode-is' in the event that this is used inside a
3862 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3864 * cc-engine.el (c-beginning-of-statement-1):
3865 Fixed a macro related issue.
3866 #Seems like I somehow lost track halfway through the fix in 5.476.
3867 #Strange that there weren't any test cases that nailed this.
3869 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3871 * cc-mode.texi: Enhanced the style doc somewhat more.
3873 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3875 * cc-fonts.el (c-font-lock-declarations):
3876 Always narrow to the fontified region so
3877 that fontification doesn't occur outside it (could happen e.g. when
3878 fontifying a line with an unfinished declaration).
3880 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3883 Recompile only as much as necessary. This way the .el files are also
3884 compiled one by one which makes it easier to discover the dependencies
3887 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3889 * cc-cmds.el (c-electric-brace):
3890 Cleaned up using `c-tentative-buffer-changes'.
3892 * cc-defs.el (c-region-is-active-p):
3893 Simplified and converted to macro to choose
3894 between Emacs and XEmacs at compile time.
3896 (c-set-region-active): New set counterpart to `c-region-is-active-p'.
3898 (c-tentative-buffer-changes): New macro to handle temporary buffer
3899 changes in a convenient way.
3901 (c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers for
3902 `c-tentative-buffer-changes'.
3904 * cc-cmds.el (c-electric-brace):
3905 Don't trip up on a line continuation which might
3906 precede the newly inserted '{'.
3908 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3910 * cc-engine.el (c-looking-at-inexpr-block):
3911 Tightened up the checks for paren sexps
3912 between the point and the keyword, to avoid some false alarms.
3914 * cc-engine.el, cc-langs.el (c-looking-at-inexpr-block):
3915 Fixed a situation where an error could be
3916 thrown for unbalanced parens. Changed to make use of
3917 c-keyword-member' to avoid some repeated regexp matches.
3919 (c-opt-lambda-key, c-opt-inexpr-block-key, c-opt-inexpr-class-key):
3920 These language variable are no longer necessary.
3922 (c-block-stmt-kwds): New language constant used by
3923 c-looking-at-inexpr-block'.
3925 (c-guess-basic-syntax): Removed an optional check that looked at the
3926 existence of the now removed language variables.
3928 * cc-engine.el (c-fdoc-shift-type-backward, c-forward-decl-or-cast-1):
3930 recognition of C++ style object instantiation expressions as
3931 declarations in some contexts. This bug only affected languages where
3932 the declarator can't be enclosed in parentheses.
3934 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3936 * cc-styles.el (c-style-alist):
3937 Fixed the GNU style to insert newlines before and
3938 after substatement braces.
3940 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3943 Improved the heuristics for recognizing function declaration headers
3944 and the handling of C++ style member init lists.
3946 (c-just-after-func-arglist-p): Rewritten to use
3947 `c-forward-decl-or-cast-1'. Now behaves a bit differently too.
3949 (c-beginning-of-member-init-list): Removed since it isn't used
3952 (c-guess-basic-syntax): Case 5B adapted for the new
3953 `c-just-after-func-arglist-p'. Cases 5B.1 and 5B.3 merged. Cases
3954 5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1
3955 covers all cases now).
3957 #(c-forward-decl-or-cast-1): Doc comment fixes.
3959 * cc-defs.el (c-point): Added 'bosws and 'eosws.
3961 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3964 Mention that there's a version number in anoncvs.php. Be a bit more
3965 explicit who "I" is.
3967 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
3969 * cc-engine.el, cc-langs.el:
3970 Rewrote the recognition function for declaration level blocks. It should
3971 now cope with templates better and also be a lot more comprehensible.
3973 (c-looking-at-decl-block): The new function.
3975 (c-search-uplist-for-classkey): The old one. It's now a wrapper for
3978 (c-add-class-syntax, c-guess-continued-construct,
3979 c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'.
3981 (c-decl-block-key): Changed to tell apart ambiguous and unambiguous
3982 keywords. Pike specials are now handled directly in the code instead.
3984 (c-block-prefix-disallowed-chars, c-block-prefix-charset): New
3985 language constants and variables to make the backward skip in
3986 `c-looking-at-decl-block' as tight as possible.
3988 (c-nonsymbol-token-char-list): New language constant.
3990 * cc-engine.el (c-backward-<>-arglist):
3991 New function to find balanced template
3994 * cc-defs.el (c-make-bare-char-alt):
3995 New helper for making char classes for
3996 `c-syntactic-skip-backward'.
3998 * cc-engine.el (c-guess-basic-syntax):
3999 Simplified case 16D - can't be a class-close
4002 * cc-engine.el (c-guess-basic-syntax, c-add-class-syntax):
4003 Don't narrow out the
4004 enclosing declaration level. This makes everything a lot easier, and
4005 it was actually only four small places that needed it to work. Some
4006 places that previously did `widen' are removed now, which has the
4007 effect that `c-guess-basic-syntax' never will look at things outside
4008 the current narrowment now. The anchor position for `topmost-intro'
4009 is affected by this, but it was so bogus it was basically useless
4010 before, and now it's equally bogus but in a slightly different way.
4012 (c-narrow-out-enclosing-class): Gone.
4014 (c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to the
4017 (c-least-enclosing-brace): Removed silly optional argument.
4019 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4021 * cc-engine.el, cc-fonts.el (c-forward-keyword-clause):
4022 Specify which submatch to use.
4024 * cc-langs.el (c-symbol-start): Include '@' in ObjC.
4026 (c-decl-start-re): No no longer any need for special treatment of
4027 ObjC due to the above.
4029 (c-other-block-decl-kwds): Handle "extern" in ObjC too since it
4030 presumably follows C in that regard.
4032 * cc-langs.el (c-identifier-ops, c-after-id-concat-ops):
4033 New language constants to
4034 specify operator tokens inside identifiers in a more high level way.
4036 (c-opt-identifier-prefix-key): New internal language constant.
4038 (c-opt-identifier-concat-key, c-opt-after-id-concat-key,
4039 c-identifier-start, c-identifier-key): Now completely calculated from
4042 (c-identifier-last-sym-match): Decommissioned since it's no longer
4045 (c-operators): Use `c-identifier-ops'. Documented `postfix-if-paren'.
4047 * cc-engine.el (c-forward-name):
4048 Removed the optimization when c-identifier-key is
4049 equal to c-symbol-key since it doesn't work in byte compiled files.
4050 Don't record empty regions as identifiers.
4052 * cc-langs.el (c-filter-ops): New helper function to simplify access to
4053 `c-operators' and its likes.
4055 (c-operator-list, c-all-op-syntax-tokens, c-nonsymbol-token-regexp,
4056 c-<>-multichar-token-regexp, c-<-op-cont-regexp, c->-op-cont-regexp,
4057 c-expr-kwds, c-primary-expr-regexp, c-cast-parens): Use it.
4059 * cc-defs.el (c-lang-const):
4060 Fixes to allow use without an explicit language in
4063 * cc-defs.el (c-make-keywords-re):
4064 Added an appendable variant of adornment.
4066 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4068 * cc-langs.el (c-any-class-key): Removed unused language variable.
4070 (c-type-decl-prefix-key): Removed some now unnecessary cruft from the
4073 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4075 * cc-langs.el (c-make-init-lang-vars-fun):
4076 Disabled the diagnostic message about
4077 precompiled language vars not being used.
4079 * cc-langs.el (c-paren-nontype-kwds):
4080 The GCC keyword "__attribute__" is followed by
4083 (c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re,
4084 c-specifier-key, c-not-decl-init-keywords): Some cleanup using new
4085 language constants `c-type-start-kwds' and `c-prefix-spec-kwds'.
4086 #`c-specifier-key' has turned out to not be obsolete afterall.
4088 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4090 * cc-fonts.el, cc-langs.el, cc-engine.el:
4091 Internal cleanups to properly detect the declared identifiers in
4092 various declarations.
4094 (c-decl-start-kwds): New language constant to recognize declarations
4095 that can start anywhere. Used for class declarations in Pike.
4097 (c-specifier-key, c-not-decl-init-keywords, c-decl-prefix-or-start-re,
4098 c-find-decl-prefix-search, c-find-decl-spots): Implement
4099 `c-decl-start-kwds'.
4101 (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds,
4102 c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the handling
4103 of the compiler specific extension keywords into a new language
4104 constant `c-decl-hangon-kwds' that defines keyword clauses to be
4105 ignored in declarations.
4107 (c-forward-id-comma-list, c-forward-keyword-clause): Don't skip past
4108 unrecognized tokens when handling `c-colon-type-list-kwds'. Necessary
4109 to stop at the declared identifier in e.g. IDL valuetype declarations.
4111 (c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds,
4112 c-prefix-spec-kwds-re, c-postfix-spec-kwds,
4113 c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key,
4114 c-forward-decl-or-cast-1): Recognize the declared identifier in class
4115 and enum declarations as such and not as part of the type.
4116 #`c-specifier-key' is obsoleted by `c-prefix-spec-kwds-re' but is
4117 #still around for the time being due to some old brace list handling
4120 (c-forward-decl-or-cast-1, c-forward-label): Relaxed the
4121 interpretation of PRECEDING-TOKEN-END when there's no preceding token.
4123 (c-forward-decl-or-cast-1): Don't disregard sure signs of declarations
4124 when there's some syntax error later on.
4126 (c-complex-decl-matchers): Did away with a reference to `c-specifier-key'.
4128 #(c-typededef-decl-kwds, c-typeless-decl-kwds, c-other-decl-kwds,
4129 #c-colon-type-list-re, c-decl-prefix-re, c-type-decl-prefix-key,
4130 #c-type-decl-suffix-key, c-after-suffixed-type-decl-key): Improved
4133 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4135 * cc-engine.el (c-maybe-labelp):
4136 Provide no default value - this variable is always
4139 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4141 * 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:
4142 Changed the policy for marking up functions that might do hidden
4143 buffer changes: All such internal functions are now marked instead of
4146 (c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments,
4147 c-(forward|backward)-single-comment, c-parse-state, c-on-identifier,
4148 c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments,
4149 c-literal-type): Allow these functions to make hidden buffer changes,
4150 so that they are free to use text property caching later on.
4152 (c-electric-backspace, c-electric-delete-forward, c-electric-pound,
4153 c-electric-brace, c-electric-slash, c-electric-star,
4154 c-electric-semi&comma, c-electric-colon, c-electric-lt-gt,
4155 c-electric-paren, c-electric-continued-statement, c-indent-command,
4156 c-indent-region, c-mask-paragraph, c-indent-new-comment-line,
4157 c-context-line-break): Added `c-save-buffer-state' calls to comply
4158 with the changed semantics of the functions above.
4160 * cc-engine.el (c-beginning-of-statement-1):
4161 Fixed a bug when macros occur in obscure
4162 places. Optimized the sexp movement a bit.
4164 * Checklist.txt: man/cc-mode.texi should be updated too for Emacs.
4166 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4168 * cc-engine.el, cc-fonts.el, cc-langs.el:
4169 Cleaned up the label handling. Labels are now recognized in a uniform and
4170 more robust way, regardless of context. Text properties are put on all
4171 labels to recognize the following declarations better. Multiword labels are
4172 handled both in indentation and fontification for the benefit of language
4173 extensions like Qt. For consistency, keywords in labels are now fontified
4174 with the label face instead. That also applies to "case" and "default".
4176 (c-beginning-of-statement-1): Fixed some bugs in the label handling.
4177 Disregard `c-nonlabel-token-key' in labels that begin with
4179 #Also noted a bug when IGNORE-LABELS is set.
4181 (c-find-decl-spots): Support that the callback adds more `c-decl-end'
4184 (c-forward-decl-or-cast-1): Don't treat a list of plain identifiers
4185 followed by a colon as a declaration.
4187 (c-forward-label): New function to recognize labels.
4189 (c-guess-basic-syntax): Replaced uses of `c-label-key' with
4190 `c-forward-label'. Moved the label recognition cases (14 and 15)
4191 earlier since they aren't so context sensitive now. Handle labels on
4192 the top level gracefully. Moved access label recognition to the
4193 generic label case (CASE 15) - removed CASE 5E.
4195 #(c-fontify-recorded-types-and-refs): Some code cleanup.
4197 (c-font-lock-declarations): Added recognition of labels in the same
4198 round since we need to handle labels in parallell with other
4199 declarations to recognize both accurately. It should also improve
4201 #Large indentation change.
4203 (c-simple-decl-matchers, c-basic-matchers-after): Moved
4204 `c-font-lock-labels' so that it only is used on decoration level 2
4205 since `c-font-lock-declarations' handles it otherwise.
4207 (c-complex-decl-matchers): Removed the simplistic recognition of
4210 (c-decl-prefix-re): Removed the kludges that was necessary to cope
4211 with labels earlier.
4213 (c-decl-start-re): New language variable to make
4214 `c-font-lock-declarations' stop for the special protection labels in
4215 Objective-C that start with '@'.
4217 (c-label-key): Removed since it's no longer used.
4219 (c-recognize-colon-labels, c-label-prefix-re): New language constants
4220 to support recognition of generic colon-terminated labels.
4222 (c-type-decl-end-used): `c-decl-end' is now used whenever there are
4223 colon terminated labels.
4225 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4227 * cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1, c-font-lock-declarations):
4229 declaration and cast recognition from `c-font-lock-declarations' to a new
4230 function, so that it can be used in the indentation engine.
4232 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4235 Updates and more details about de-facto procedures for releases.
4237 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4239 * cc-cmds.el (c-forward-<>-arglist-recur):
4240 Don't accept binary operators in the arglist
4241 if we're in a function call context, i.e. if `c-restricted-<>-arglists' is
4242 set. That avoids template recognition in cases like "if (a < b || c > d)".
4244 (c-restricted-<>-arglists): New more appropriate name for
4245 `c-disallow-comma-in-<>-arglists'.
4247 Accessing functions updated for the variable name change.
4249 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4251 * cc-engine.el (c-find-decl-spots):
4252 Fixed bug in backing up to the start of the
4253 literal. Fixed bug with the point on the wrong side of the search
4254 limit that could happen when the start position is inside a literal.
4256 * cc-engine.el (c-parse-state, c-invalidate-state-cache):
4258 `c-state-cache-end' so that it's kept a little bit back to increase
4261 (c-parse-state): Changed the macro handling and fixed some glitches.
4262 Macro context is checked more often than necessary now, but otoh less
4263 garbage conses are generated.
4265 * cc-engine.el (c-parse-state, c-invalidate-state-cache):
4266 Cache the last position
4267 where `c-state-cache' applies. This can speed up refontification
4268 quite a bit in blocks where there are many non-brace parens before the
4271 (c-state-cache-end): New variable for this.
4273 (c-guess-basic-syntax, c-debug-parse-state): Adapted for the new cache
4276 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4278 * cc-engine.el (c-find-decl-spots):
4279 Take more care to get close initial continue
4280 positions when the start position is inside a literal or macro. Do
4281 not call the callback for spots before the start position (which can
4282 happen e.g. for `c-decl-end' spots inside comments). Optimize better
4283 in special cases when the region is a single line inside a literal or
4284 macro (typically when the current line is refontified).
4286 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4288 * cc-engine.el (c-guess-basic-syntax):
4289 Simplified calls to `c-add-stmt-syntax' -
4290 there's no need to explicitly whack off entries from the paren state.
4292 * cc-engine.el (c-add-stmt-syntax):
4293 Narrowed down the special case for "else if"
4296 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4298 * cc-engine.el (c-looking-at-inexpr-block, c-add-stmt-syntax): Use
4299 `c-recognize-paren-inexpr-blocks'.
4301 * cc-langs.el (c-recognize-paren-inexpr-blocks):
4302 New language variable to recognize
4303 the gcc extension with statement blocks inside expressions.
4305 * cc-engine.el (c-add-stmt-syntax):
4306 Restructured to make it somewhat more
4307 comprehensible. The argument AT-BLOCK-START is no longer used and
4310 (c-guess-continued-construct, c-guess-basic-syntax): Updated calls to
4311 `c-add-stmt-syntax'.
4313 * cc-engine.el (c-beginning-of-statement-1):
4314 Don't allow parens in labels.
4316 (c-backward-to-decl-anchor): Use `c-beginning-of-statement-1' instead
4317 of duplicating parts of it. This fixes bogus label recognition.
4319 * cc-engine.el (c-backward-to-decl-anchor):
4320 Use `c-beginning-of-statement-1' instead
4321 of duplicating parts of it. This fixes bogus label recognition.
4324 Extended the doc on c-label-minimum-indentation a little.
4326 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4328 * cc-engine.el (c-add-type, c-check-type, c-forward-name, c-forward-type):
4330 storage of template types in `c-found-types' so that they can be
4333 (c-syntactic-content): Added option to skip past nested parens.
4335 * cc-engine.el (c-forward-name):
4336 Set `c-last-identifier-range' all the time. It's
4337 less work that way. Handle that there might not be an identifier to
4338 store in `c-last-identifier-range'.
4340 (c-forward-type): Handle that `c-last-identifier-range' might be nil
4341 from `c-forward-name'.
4344 (c-safe-scan-lists, c-(go-)?(up|down)-list-(forward|backward)): Added
4347 * cc-defs.el (c-save-buffer-state):
4348 Use `unwind-protect' to work even if the form
4351 * cc-engine.el (c-parse-state):
4352 Speedup when moving far down in a large file in one
4355 (c-get-fallback-start-pos): New helper function for `c-parse-state'.
4357 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4359 * cc-mode.texi: Document c-lineup-assignments and c-lineup-math.
4361 * cc-align.el (c-lineup-assignments): New lineup function which is like
4362 `c-lineup-math' but returns nil instead of `c-basic-offset' when it
4365 (c-lineup-math): Changed to use `c-lineup-assignments'.
4367 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4369 * cc-fonts.el, cc-langs.el:
4370 Use `c-simple-ws' instead of hardcoded char classes whereever possible.
4371 Changed a couple of places to use skip by syntax instead of skip by char
4374 * cc-langs.el (c-unterminated-block-comment-regexp):
4375 Fixed a bug in the regexp that
4376 caused extreme backtracking.
4378 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4380 * cc-langs.el (c-block-comment-starter, c-block-comment-ender):
4382 constants to specify in a single place how block comments look.
4384 (c-comment-start-regexp, c-block-comment-start-regexp, comment-start,
4385 comment-end, comment-start-skip, c-syntactic-ws-start,
4386 c-syntactic-ws-end, c-nonwhite-syntactic-ws, c-syntactic-ws,
4387 c-nonempty-syntactic-ws, c-single-line-syntactic-ws, c-syntactic-eol):
4388 Now built from `c-line-comment-starter', `c-block-comment-starter' and
4389 `c-block-comment-ender'.
4391 (c-block-comment-regexp, c-unterminated-block-comment-regexp): New
4392 language constants to break up things a bit.
4394 (c-simple-ws): New language constant for simple whitespace.
4396 #(c-known-type-key): Slight clean up using `c-concat-separated'.
4398 * cc-defs.el (c-concat-separated): New convenience function.
4400 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4402 * cc-langs.el (c-known-type-key): Optimize simple symbols from
4403 `*-font-lock-extra-types' so that there's no need to use `regexp-opt'
4406 * cc-langs.el (c-type-decl-suffix-key):
4407 Fix when `c-type-modifier-kwds' is empty.
4409 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4411 * cc-fonts.el (c-font-lock-invalid-string):
4412 Fix when there are several strings on
4415 * cc-engine.el (c-literal-limits):
4416 Removed the compatibility function for older
4417 emacsen. `c-literal-limits-fast' has now taken the place of this
4420 * cc-vars.el (c-emacs-features):
4421 Removed compatibility with older emacsen: We now
4422 require 'pps-extended-state.
4424 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4426 * cc-engine.el, cc-fonts.el, cc-langs.el (c-guess-basic-syntax):
4427 Changed the way class-level labels are recognized;
4428 they can now contain essentially any symbols.
4430 (c-opt-extra-label-key): New language variable to cope with the special
4431 protection label syntax in Objective-C.
4433 (c-opt-access-key): Removed; this is now handled better by
4434 `c-nonlabel-token-key' and `c-opt-extra-label-key'.
4436 (c-complex-decl-matchers): Update to handle that `c-opt-access-key' no
4439 * cc-engine.el (c-guess-basic-syntax):
4440 Make use of the improved label recognition in
4441 `c-beginning-of-statement-1'.
4443 * cc-engine.el (c-beginning-of-member-init-list):
4444 Recognize bitfields better.
4445 #Also a bit cleaned up.
4447 #(c-guess-basic-syntax): Cleaned up a couple of cases and changed to
4448 #slightly faster methods.
4450 * cc-engine.el (c-beginning-of-inheritance-list):
4451 Removed some cruft and fixed a bug
4452 that could cause it to go to a position further down.
4454 * cc-langs.el, cc-engine.el (c-beginning-of-statement-1):
4455 Improved detection of labels in declaration
4458 (c-beginning-of-decl-1): Use it.
4460 (c-nonlabel-token-key): New language constant and variable needed by
4461 `c-beginning-of-statement-1'.
4463 * cc-engine.el (c-guess-basic-syntax):
4464 Fixed bug that manifested itself due to the
4465 correction in `c-forward-sexp'.
4467 * cc-defs.el (c-forward-sexp, c-backward-sexp):
4468 Made these behave as documented
4469 when used at the buffer limits.
4471 * cc-mode.el, cc-engine.el, cc-langs.el (c-type-decl-end-used):
4472 Made this a language variable.
4474 * cc-mode.el (c-after-change): Widen the buffer to work correctly when
4475 `combine-after-change-calls' is used together with temporary
4478 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4480 * cc-engine.el (c-beginning-of-statement-1):
4481 Report labels correctly when the start
4482 point is immediately after the colon.
4483 #Extended and reformatted the local variable comments a bit.
4485 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4487 * cc-defs.el (c-parse-sexp-lookup-properties):
4488 Removed since it isn't used anymore.
4490 * cc-cmds.el (c-electric-lt-gt):
4491 Detect and mark angle bracket arglists such as
4492 template parens in C++.
4494 * cc-engine.el (c-syntactic-skip-backward):
4495 Fixed a bug in the last check-in. Some
4498 * cc-engine.el (c-syntactic-skip-backward):
4499 Fixed bug where it could stop at the same
4500 level in a preceding sexp when PAREN-LEVEL is set.
4502 * cc-mode.el (c-basic-common-init):
4503 Turn on syntax-table text property lookup only
4506 * cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el:
4507 Changed the policy for paren marked angle brackets to be more persistent;
4508 once marked they remain marked even when they're found to be unbalanced in
4509 the searched region. This should keep the paren syntax around even when
4510 individual lines are refontified in multiline template arglists.
4512 (c-parse-and-markup-<>-arglists): New dynamically bound variable to control
4513 markup so that incorrect angle bracket arglists aren't marked in contexts
4514 where the correct value for `c-disallow-comma-in-<>-arglists' isn't known.
4516 (c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse argument has
4517 become `c-parse-and-markup-<>-arglists'.
4519 (c-remove-<>-arglist-properties): Removed - no longer used.
4521 (c-after-change-check-<>-operators): New function used on
4522 `after-change-functions' to avoid that "<" and ">" characters that are part
4523 of longer operators have paren syntax.
4525 (c-<>-multichar-token-regexp): New language variable used by
4526 `c-after-change-check-<>-operators'.
4528 (c-after-change): Call `c-after-change-check-<>-operators'.
4530 (c-font-lock-<>-arglists): Use the context properties set by
4531 `c-font-lock-declarations' to set `c-disallow-comma-in-<>-arglists'
4532 correctly to avoid doing invalid markup.
4534 (c-font-lock-declarations): Removed code that undoes the invalid markup done
4535 by `c-font-lock-<>-arglists'.
4537 (c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs after
4538 `c-font-lock-declarations'.
4540 #(c-beginning-of-current-token): A little too large and used a little too
4541 #often to be a defsubst.
4543 #(c-syntactic-skip-backward): Fixed bug detected by the byte compiler.
4545 #(c-font-lock-objc-iip-decl): Updated for changes in `c-forward-<>-arglist'.
4547 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4549 * cc-engine.el (c-syntactic-skip-backward): Added paren-level feature.
4551 (c-guess-basic-syntax): Improved the anchor position for
4552 `template-args-cont' in nested template arglists. There's still much
4553 to be desired in this area, though.
4555 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4558 Some updates due to the dropping of the support for older emacsen.
4560 * cc-defs.el, cc-engine.el (c-mode-is-new-awk-p):
4561 Removed; (c-major-mode-is 'awk-mode) can be used
4565 Always set up AWK mode since emacsen where it doesn't work no longer
4568 * cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el, cc-engine.el, cc-fonts.el, cc-langs.el, cc-cmds.el:
4569 CC Mode now requires support for the syntax-table' text property, which
4570 rules out Emacs 19 and XEmacs < 21.4. Removed various compatibility cruft
4571 associated with those versions.
4573 * cc-defs.el, cc-fix.el:
4574 CC Mode now requires support for the `syntax-table' text property, which
4575 rules out Emacs 19 and XEmacs < 21.4. Removed various compatibility cruft
4576 associated with those versions.
4578 * cc-vars.el (c-emacs-features): CC Mode now requires support for the
4579 `syntax-table' text property.
4581 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4583 * cc-fonts.el (c-nonbreakable-space-face):
4584 Remove the variable and use an extra
4585 quoted face name instead. All the emacsen flavors handle that
4588 * Checklist.txt: Added a note.
4590 * Release.py: Makefile no longer contains a literal version number.
4592 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4595 Put a branch tag on each release, in addition to the release tag.
4597 2005-06-01 Martin Stjernholm <bug-cc-mode@gnu.org>
4599 * Checklist.txt: Describe the handling of the patch branch.
4601 2005-05-24 Norbert Koch <viteno@xemacs.org>
4603 * Makefile (VERSION): XEmacs package 1.45 released.
4605 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4607 * Patch release 5.30.10.
4609 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4611 * cc-fonts.el (c-invalid-face-name): Use "red1" instead of "red"
4612 since it stands out better in xterms and DOS terminals. Original
4613 change by Dan Nicolaescu <dann@ics.uci.edu>.
4615 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4617 * cc-fonts.el (c-font-lock-declarators): Fixed bug where the point
4618 could go past the limit in decoration level 2, thereby causing
4619 errors during interactive fontification. (This is, in fact, the
4620 Right fix for the problem that has plagued JDEE users.)
4622 2005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org>
4624 * cc-mode.el, cc-engine.el, cc-align.el: Change the FSF's address
4625 in the copyright statement. Incidentally, change "along with GNU
4626 Emacs" to "along with this program" where it occurs.
4628 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4630 * cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when
4631 the file is evaluated interactively.
4633 2005-05-23 Kevin Ryde <user42@zip.com.au>:
4635 * cc-align.el (c-lineup-argcont): Ignore conses for {} pairs from
4636 c-parse-state, to avoid a lisp error (on bad code).
4638 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4640 * cc-engine.el (c-guess-basic-syntax): Handle operator
4641 declarations somewhat better in C++.
4643 2005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org>
4645 * cc-mode.el: Add a fourth parameter `t' to the awk-mode autoload,
4646 so that it is interactive, hence can be found by M-x awk-mode
4647 whilst cc-mode is yet to be loaded. Reported by Glenn Morris
4648 <gmorris+emacs@ast.cam.ac.uk>.
4650 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4652 * cc-styles.el, cc-mode.el (c-run-mode-hooks): New helper macro to
4653 make use of `run-mode-hooks' which has been added in Emacs 21.1.
4655 (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode,
4658 (make-local-hook): Suppress warning about obsoleteness which has
4659 been added in Emacs 21.1.
4661 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4663 * cc-engine.el, cc-align.el, cc-cmds.el
4664 (c-append-backslashes-forward, c-delete-backslashes-forward,
4665 c-find-decl-spots, c-semi&comma-no-newlines-before-nonblanks):
4666 Compensate for return value from `forward-line' when it has moved
4667 but not to a different line due to eob.
4669 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
4671 * cc-engine.el (c-guess-basic-syntax): Fixed anchoring in
4672 `objc-method-intro' and `objc-method-args-cont'.
4674 2005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org>
4676 * cc-awk.el: Add character classes (e.g. "[:alpha:]") into AWK
4679 2005-05-20 Aidan Kehoe <kehoea@parhasard.net>
4681 * cc-engine.el (c-syntactic-re-search-forward): Revert my last
4682 change, it's the wrong thing.
4683 * cc-fonts.el (c-font-lock-declarators): Apply Michael Thome's fix
4684 of 42404C6D.1030705@bbn.com, which is the Right Thing, once you've
4685 signed up for the re-search-forward API, which isn't great, IMO.
4687 2005-05-10 Norbert Koch <viteno@xemacs.org>
4689 * Makefile (VERSION): XEmacs package 1.44 released.
4691 2005-05-10 Aidan Kehoe <kehoea@parhasard.net>
4693 * cc-engine.el (c-syntactic-re-search-forward): Before the first
4694 call of re-search-forward in the function, make sure that the
4695 bound is greater than or equal to (point). Fixes an error:
4697 Error caught in `font-lock-pre-idle-hook': (error Invalid search
4698 limit (wrong side of point))
4700 that users of JDEE have been seeing for a long time.
4702 2004-08-12 Norbert Koch <viteno@xemacs.org>
4704 * Makefile (VERSION): XEmacs package 1.43 released.
4706 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4708 * Patch release 5.30.9.
4710 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4712 * cc-defs.el, cc-vars.el (c-emacs-features): Moved from cc-vars to
4713 cc-defs for dependency reasons. Fixed the POSIX char class test
4714 to check that it works in `skip-chars-(forward|backward)' too.
4716 * cc-align.el (c-lineup-arglist): Fixed bug when the first
4717 argument starts with a special brace list.
4719 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4721 * cc-engine.el (c-forward-type): Fixed promotion bug when
4722 `c-opt-type-concat-key' is used (i.e. in Pike).
4724 * cc-engine.el (c-looking-at-special-brace-list): Fixed bug when
4725 the inner char pair doesn't have paren syntax, i.e. "(< >)".
4727 2004-08-11 Alan Mackenzie <bug-cc-mode@gnu.org>
4729 * cc-cmds.el, cc-vars.el: Amend doc(-strings) to say that <TAB>
4730 doesn't insert WS into a CPP line.
4731 (c-indent-command, c-tab-always-indent): Amend doc strings.
4733 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4735 * cc-align.el (c-lineup-multi-inher): Made it syntactic whitespace
4738 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4740 * cc-engine.el (c-guess-basic-syntax): Fixed similar situations
4741 for `arglist-cont-nonempty' and `arglist-close'.
4743 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4745 * cc-engine.el (c-guess-basic-syntax): Fixed anchor position for
4746 `arglist-intro' when there are two arglist open parens on the same
4747 line and there's nothing in front of the first.
4749 * cc-fonts.el (c-basic-matchers-before): Fixed font locking of
4750 qualified names in Java, which previously could fontify common
4751 indexing expressions in many cases. The standard Java naming
4752 conventions are used to tell them apart.
4754 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4756 * cc-align.el (c-lineup-whitesmith-in-block): Fixed inconsistency
4757 wrt opening parens on the first line inside a paren block.
4759 * cc-defs.el (c-langs-are-parametric): Must be known at compile
4760 time for the sake of `c-major-mode-is'.
4762 (c-mode-is-new-awk-p): Made it a macro to delay expansion of
4763 `c-major-mode-is' in the event that this is used inside a
4766 2004-08-11 Alan Mackenzie <bug-cc-mode@gnu.org>
4768 * cc-styles.el, cc-engine.el: Add in two checks for user errors,
4769 thus eliminating cryptic and unhelpful Emacs error messages. (1)
4770 Check the arg to `c-set-style' is a string. (2) Check that
4771 settings to `c-offsets-alist' are not spuriously quoted.
4773 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4775 * cc-defs.el (c-major-mode-is): Fixed expansion inside
4776 `c-lang-defconst' so that it works better with fallback languages.
4778 * cc-defs.el (c-add-language): Fixed a typo that caused it to fail
4779 to record the base mode.
4781 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4783 * cc-engine.el (c-syntactic-re-search-forward): Fixed bug so that
4784 it doesn't go past the closing paren when PAREN-LEVEL is used.
4785 Reordered the syntax checks to get more efficient skipping in some
4788 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4790 * cc-cmds.el (c-electric-brace): Don't trip up on a line
4791 continuation which might precede the newly inserted '{'.
4793 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4795 * cc-engine.el (c-syntactic-re-search-forward): Fixed cases where
4796 it could loop indefinitely.
4798 2004-08-11 Alan Mackenzie <bug-cc-mode@gnu.org>
4800 * cc-cmds.el: (c-electric-brace): don't delete a comment which
4801 precedes the newly inserted `{'.
4803 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4805 * cc-fonts.el (c-font-lock-declarators): Handle array size specs
4806 correctly. Only fontify identifiers in front of '(' with as
4807 functions - don't accept any paren char. Tightened up initializer
4808 skipping to stop before function and class blocks.
4810 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4812 * cc-engine.el (c-beginning-of-decl-1): Fixed bug where the point
4813 could be left directly after an open paren when finding the
4814 beginning of the first decl in the block.
4816 * cc-engine.el (c-parse-state): Don't use the syntax table when
4817 filtering out legitimate open parens to be recorded. This could
4818 cause cache inconsistencies when e.g. `c++-template-syntax-table'
4819 was temporarily in use.
4821 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4823 * cc-engine.el (c-on-identifier, c-simple-skip-symbol-backward):
4824 Small fix for handling "-" correctly in `skip-chars-backward'.
4825 Affected the operator lfun syntax in Pike.
4827 2004-08-11 Martin Stjernholm <bug-cc-mode@gnu.org>
4829 * cc-engine.el (c-invalidate-sws-region-after): Fixed bug that
4830 could cause an error from `after-change-functions' when the
4831 changed region is at bob.
4833 2003-11-18 Norbert Koch <viteno@xemacs.org>
4835 * Makefile (VERSION): XEmacs package 1.42 released.
4837 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4839 * Patch release 5.30.8.
4841 * cc-engine.el (c-guess-continued-construct,
4842 c-guess-basic-syntax): Check a little more carefully if it's a
4843 function declaration when an unknown construct followed by a block
4844 is found inside a statement context. This avoids macros followed
4845 by blocks to be taken as function declarations.
4847 (c-guess-continued-construct): Changed the analysis of a statement
4848 continuation with a brace open to `substatement-block', for
4849 consistency with recognized statements.
4851 (c-add-stmt-syntax): Don't continue to the surrounding sexp if the
4852 start is in a position so that `c-beginning-of-statement-1' jumped
4853 to the beginning of the same statement.
4855 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4857 * cc-fonts.el, cc-engine.el (c-forward-<>-arglist-recur): Don't
4858 accept binary operators in the arglist if we're in a function call
4859 context, i.e. if `c-restricted-<>-arglists' is set. That avoids
4860 template recognition in cases like "if (a < b || c > d)".
4862 (c-restricted-<>-arglists): New more appropriate name for
4863 `c-disallow-comma-in-<>-arglists'.
4865 Accessing functions updated for the variable name change.
4867 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4869 * cc-engine.el (c-syntactic-re-search-forward): Fix bug where the
4870 match data could get clobbered if NOT-INSIDE-TOKEN is used.
4872 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4874 * cc-engine.el (c-beginning-of-statement-1): Don't allow parens in
4877 (c-backward-to-decl-anchor): Use `c-beginning-of-statement-1'
4878 instead of duplicating parts of it. This fixes bogus label
4881 * cc-align.el (c-gnu-impose-minimum): Reverted to the old method
4882 of checking the context in which to apply the minimum indentation,
4883 so that it isn't enforced in e.g. namespace blocks.
4885 * cc-vars.el (c-inside-block-syms): New constant used by
4886 `c-gnu-impose-minimum'. It's defined close to `c-offsets-alist'
4887 to somewhat reduce the risk of becoming stale.
4889 * cc-cmds.el, cc-engine.el (c-shift-line-indentation): Moved from
4890 cc-cmds to cc-engine to allow use from cc-align.
4892 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4894 * cc-engine.el (c-beginning-of-inheritance-list): Cope with fully
4895 qualified identifiers containing "::".
4897 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4899 * cc-defs.el (c-make-keywords-re): Added kludge for bug in
4900 `regexp-opt' in Emacs 20 and XEmacs when strings contain newlines.
4902 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4904 * cc-vars.el (c-emacs-features): Use a space in front of the name
4905 of the temporary buffer. That also avoids dumping problems in
4906 XEmacs due to undo info being left around after the buffer is
4909 2003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
4911 * cc-engine.el (c-in-knr-argdecl): Look closer at the function
4912 arglist to see if it's a K&R style declaration.
4914 (c-guess-basic-syntax): CASE 5B.2: Check with `c-in-knr-argdecl'
4915 before returning `knr-argdecl-intro'.
4917 2003-10-31 Norbert Koch <viteno@xemacs.org>
4919 * Makefile (VERSION): XEmacs package 1.41 released.
4921 2003-09-25 Norbert Koch <viteno@xemacs.org>
4923 * Makefile (VERSION): XEmacs package 1.40 released.
4925 2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
4927 * cc-engine.el (c-parse-state): Fixed bug that could cause errors
4928 when the state cache contains info on parts that have been
4931 2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
4933 * cc-vars.el (c-comment-prefix-regexp): Document that
4934 `c-setup-paragraph-variables' has to be used when this variable is
4935 changed; it doesn't work to reinitialize the mode since that
4936 typically clobbers the variable.
4938 * cc-styles.el (c-setup-paragraph-variables): Made it interactive.
4940 2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
4942 * cc-fonts.el (c-font-lock-declarations): Fixed recognition of
4943 constructors and destructors for classes whose names are matched
4944 by `*-font-lock-extra-types'.
4946 * cc-langs.el (c-type-list-kwds): If "operator" is followed by an
4947 identifier in C++ then it's a type.
4949 2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
4951 * cc-fonts.el (c-font-lock-invalid-string): Fixed eob problem that
4952 primarily affected XEmacs. Don't use faces to find unterminated
4953 strings since Emacs and XEmacs fontify strings differently - this
4954 function should now work better in XEmacs.
4956 2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
4958 * cc-cmds.el (c-electric-brace): Fixed a bug in the
4959 `expand-abbrev' workaround which caused braces to disbehave inside
4962 * cc-engine.el (c-forward-keyword-clause): Fixed error handling.
4963 This bug could cause interactive font locking to bail out.
4965 2003-09-24 Martin Stjernholm <bug-cc-mode@gnu.org>
4967 * cc-engine.el (c-just-after-func-arglist-p): Handle paren-style
4968 types in Pike. Also fixed some cases of insufficient handling of
4971 2003-08-26 Norbert Koch <viteno@xemacs.org>
4973 * Makefile (VERSION): XEmacs package 1.39 released.
4975 2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
4977 * cc-cmds.el (c-electric-brace): Work around for a misfeature in
4978 `expand-abbrev' which caused electric keywords like "else" to
4979 disappear if an open brace was typed directly afterwards.
4981 2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
4983 * cc-vars.el (c-extra-types-widget): The doc string is mandatory
4986 * cc-align.el, cc-langs.el (c-lineup-math): Don't align the
4987 operators "!=", "<=" and ">=" as assignment operators.
4989 (c-assignment-operators): New language constant that only contains
4990 the assignment operators.
4992 (c-assignment-op-regexp): New language variable used by
4995 2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
4997 * cc-engine.el (c-just-after-func-arglist-p): Safeguard against
5000 2003-08-03 Norbert Koch <viteno@xemacs.org>
5002 * Makefile (VERSION): XEmacs package 1.38 released.
5004 2003-08-03 Martin Stjernholm <bug-cc-mode@gnu.org>
5006 * cc-mode.el (c-init-language-vars-for): Add argument MODE.
5007 Renamed from c-init-c-language-vars'.
5008 (c-initialize-cc-mode): Change accordingly.
5009 (c-common-init): Ditto.
5011 (c++-mode): Use function.
5018 2003-08-01 Martin Stjernholm <bug-cc-mode@gnu.org>
5020 * cc-engine.el (c-end-of-current-token): Return whether or not the
5023 (c-search-decl-header-end): Don't trip up on operator identifiers
5024 in C++ and operators like == in all languages.
5026 * cc-engine.el (c-backward-to-decl-anchor): Detect leading labels
5029 2003-07-17 Norbert Koch <viteno@xemacs.org>
5031 * Makefile (VERSION): XEmacs package 1.37 released.
5033 2003-07-16 Martin Stjernholm <bug-cc-mode@gnu.org>
5035 * cc-defs.el (c-langelem-sym, c-langelem-pos, c-langelem-2nd-pos):
5036 Added accessor functions for syntactic elements.
5038 2003-07-09 Martin Stjernholm <bug-cc-mode@gnu.org>
5040 * cc-engine.el (c-literal-faces): Declare as a variable since it
5043 * cc-langs.el: (c++-make-template-syntax-table,
5044 c-syntactic-ws-start, c-syntactic-ws-end): Gave more consistent
5045 names to these language constants.
5047 2003-07-08 Martin Stjernholm <bug-cc-mode@gnu.org>
5049 * cc-engine.el (c-guess-basic-syntax): Do not do hidden buffer
5050 changes; there's third party code that calls this function
5053 2003-07-07 Martin Stjernholm <bug-cc-mode@gnu.org>
5055 * cc-fonts.el (javadoc-font-lock-keywords,
5056 autodoc-font-lock-keywords): Don't byte compile on font lock
5057 initialization when running from byte compiled files.
5059 2003-07-06 Alan Mackenzie <bug-cc-mode@gnu.org>
5061 * cc-engine.el: Fix AWK mode indentation when previous statement
5062 ends with auto-increment "++".
5064 2003-07-06 Norbert Koch <viteno@xemacs.org>
5066 * Makefile (VERSION): XEmacs package 1.36 released.
5068 2003-07-05 Martin Stjernholm <bug-cc-mode@gnu.org>
5070 * cc-langs.el, cc-styles.el (c-style-alist, c-lang-variable-inits,
5071 c-lang-variable-inits-tail): The values of these are changed, so
5072 declare them as variables and not constants.
5074 * cc-mode.el: Fixed some autoload problems: Try to ensure that the
5075 entry for ".c" extension comes before the one for ".C" on
5076 `auto-mode-alist', to behave better on case insensitive OS:es.
5077 Fixed incorrect entries that were added to
5078 `interpreter-mode-alist'. Moved the autoload directives for AWK
5079 to the top level since they aren't recognized anywhere else. Do
5080 not use the new AWK mode doc in the autoload form for the old AWK
5083 2003-07-04 Norbert Koch <viteno@xemacs.org>
5085 * Makefile (VERSION): XEmacs package 1.35 released.
5087 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org>
5089 * Update to CC Mode 5.30.
5091 2003-04-02 Norbert Koch <viteno@xemacs.org>
5093 * Makefile (VERSION): XEmacs package 1.33 released.
5095 2003-04-01 Steve Youngs <youngs@xemacs.org>
5097 * Makefile (ELCS): Don't build cc-make.el or cc-mode-19.el.
5098 Rename both to *.upstream.
5099 (PRELOADS): Add cc-bytecomp.el.
5101 2003-03-09 Ben Wing <ben@xemacs.org>
5104 Delete explicit compile:: and binkit: rules.
5105 Don't add custom-load.elc to the list of generated elc's.
5106 Use STANDARD_DOCS instead of explicitly giving the targets
5108 Move the include of XEmacs.rules to the end of the file.
5110 2003-01-13 Rendhalver [Peter Brown] <rendhalver@xemacs.org>
5112 * Makefile (VERSION): XEmacs package 1.32 released.
5114 2003-01-06 Ville Skyttä <scop@xemacs.org>
5116 * cc-mode.el: Make auto-mode-alist modifications autoload-only.
5118 2002-11-29 Ben Wing <ben@xemacs.org>
5120 * .cvsignore: Remove files now handled automatically by CVS.
5121 * Makefile: Use `compile' instead of hard-coded `all'.
5123 2002-10-15 Ville Skyttä <scop@xemacs.org>
5125 * Makefile (srckit): Remove.
5127 2002-10-14 Ville Skyttä <scop@xemacs.org>
5129 * Makefile (MANUAL): Removed (unused).
5131 2002-10-07 Rendhalver [Peter Brown] <rendhalver@xemacs.org>
5133 * Makefile (VERSION): XEmacs package 1.31 released.
5135 2002-09-30 Ville Skyttä <scop@xemacs.org>
5137 * cc-mode.el: Add autoloaded auto-mode-alist associations.
5139 2002-09-06 Rendhalver [Peter Brown] <rendhalver@xemacs.org>
5141 * Makefile (VERSION): XEmacs package 1.30 released.
5143 2002-08-31 Ville Skyttä <scop@xemacs.org>
5145 * cc-engine.el (c-parse-state): Fix problem in finding
5146 out the parenthesis state around the indentation position.
5147 Patch from Martin Stjernholm (author).
5149 2002-08-02 Rendhalver [Peter Brown] <rendhalver@xemacs.org>
5151 * Makefile (VERSION): XEmacs package 1.29 released.
5153 2002-08-01 Ville Skyttä <scop@xemacs.org>
5155 * cc-engine.el (c-beginning-of-member-init-list):
5156 Apply patch from Martin Stjernholm submitted by Neal D. Becker,
5157 Martin's comments: CC Mode 5.28 has a bug that causes it to
5158 confuse < and > in such initialization lists with template
5159 parentheses. The following patch corrects that.
5161 2002-07-16 Adrian Aichner <adrian@xemacs.org>
5163 * .cvsignore: Add generated .info* and .html files.
5165 2002-05-09 Steve Youngs <youngs@xemacs.org>
5167 * Makefile (VERSION): XEmacs package 1.28 released.
5169 2002-05-08 Steve Youngs <youngs@xemacs.org>
5171 * Makefile (PRELOADS): No need to push the current directory into
5174 2002-01-13 Steve Youngs <youngs@xemacs.org>
5176 * package-info.in (provides): Update to include all provides.
5178 2002-01-07 Adrian Aichner <adrian@xemacs.org>
5180 * Makefile (HTML_FILES): New.
5181 * Makefile (HTML_DEP): New.
5183 2001-08-13 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5185 * cc-cmds.el (c-fill-paragraph): Use 'c-current-comment-prefix'.
5187 2001-05-11 Martin Stjernholm <bug-cc-mode@gnu.org>
5189 * cc-langs.el (c-switch-label-key): Regexp fix.
5191 2001-02-24 Ben Wing <ben@xemacs.org>
5193 * Makefile (MANUAL):
5194 Conditionalize extra MS Windows quoting on
5195 XEMACS_NATIVE_NT_NEEDS_EXTRA_QUOTING, since it breaks things under
5198 2001-02-28 Steve Youngs <youngs@xemacs.org>
5200 * Makefile (REQUIRES): Add mail-lib.
5201 (ELCS): Add missing .elc files.
5203 * Import cc-mode 5.28.
5205 2000-11-07 Martin Buchholz <martin@xemacs.org>
5207 * cc-mode.texi: Doc fix.
5209 2000-10-05 Martin Buchholz <martin@xemacs.org>
5213 2000-07-26 Ben Wing <ben@xemacs.org>
5215 * Makefile (PRELOADS): correct command-line quoting for MS Windows
5218 2000-07-10 Andreas Jaeger <aj@suse.de>
5220 Release 5.27 downloaded from http://cc-mode.sourceforge.net/.
5222 1998-12-30 Martin Buchholz <martin@xemacs.org>
5224 * Makefile (MAINTAINER): The preferred address is bug-cc-mode@gnu.org
5227 Snarfed from http://www.python.org/emacs/cc-mode/
5229 1998-03-05 SL Baur <steve@altair.xemacs.org>
5231 * cc-mode.el: cc-defs isn't needed at run-time.
5235 1998-02-11 SL Baur <steve@altair.xemacs.org>
5237 * cc-mode.el: Correct dependency on cc-defs (needs to be before
5238 use of `c-safe' macro.
5240 Sun Feb 8 15:30:43 1998 Barry A. Warsaw <cc-mode-help@python.org>
5244 Wed Feb 04 1998 Barry Warsaw <cc-mode-help@python.org>
5246 * cc-mode.el (c-mode, c++-mode, objc-mode, java-mode): set
5247 imenu-case-fold-search to nil.
5249 Tue Feb 03 1998 Barry Warsaw <cc-mode-help@python.org>
5251 * cc-langs.el (c-postprocess-file-styles): If a file style or file
5252 offsets are set, make the variables local to the buffer (via
5253 make-local-variable).
5255 * cc-styles.el (c-make-styles-buffer-local): Take an optional
5256 argument which switches between make-variable-buffer-local and
5257 make-local-variable. Generalize.
5259 Mon Feb 02 1998 Martin Stjernholm <cc-mode-help@python.org>
5261 * cc-align.el (c-lineup-close-paren, c-indent-one-line-block): New
5262 indentation functions.
5264 * cc-cmds.el (c-beginning-of-statement, c-end-of-statement): Do
5265 not move by sentence in strings. Doc fixes.
5267 * cc-mode.texi: Document new indentation functions.
5269 Sat Jan 24 1998 Barry Warsaw <cc-mode-help@python.org>
5271 * cc-defs.el (c-point): In XEmacs, use scan-lists +
5272 buffer-syntactic-context-depth to radically speed up locating
5273 top-level defun opening brace in some situations. When the braces
5274 hang, this can make c-parse-state from between 3 to 60 times
5275 faster. When they don't hang, this may be a few percentage points
5276 slower (not noticeable to me though). The variable
5277 c-enable-xemacs-performance-kludge-p toggles the behavior. This
5278 change has no effect on Emacs, which lacks the built-in function
5279 buffer-syntactic-context-depth.
5281 * cc-mode.texi: Discuss c-enable-xemacs-performance-kludge-p in
5282 the section on performance.
5284 * cc-vars.el (c-enable-xemacs-performance-kludge-p): New variable.
5286 Fri Jan 23 1998 Barry Warsaw <cc-mode-help@python.org>
5288 * cc-cmds.el cc-defs.el cc-engine.el (c-beginning-of-defun,
5289 c-indent-defun, c-parse-state): Use (c-point 'bod) instead of
5290 beginning-of-defun directly.
5292 Tue Jan 20 1998 Martin Stjernholm <cc-mode-help@python.org>
5294 * cc-cmds.el (c-beginning-of-statement): Speedup; it's only
5295 necessary to call `c-literal-limits' once when the function is
5298 Mon Jan 19 1998 Barry Warsaw <cc-mode-help@python.org>
5300 * cc-align.el (c-semi&comma-no-newlines-before-nonblanks,
5301 c-semi&comma-no-newlines-for-oneline-inliners): New functions,
5302 appropriate for c-hanging-semi&comma-criteria, but not placed on
5303 that variable by default.
5305 * cc-langs.el (c-mode-base-map): Comment out c-beginning-of-defun
5306 and c-end-of-defun bindings, since RMS doesn't want these to be
5309 * cc-mode.texi: Describe c-beginning-of-defun and c-end-of-defun.
5310 Describe the new c-hanging-semi&comma-criteria functions.
5312 Sun Jan 18 1998 Martin Stjernholm <cc-mode-help@python.org>
5314 * cc-cmds.el (c-beginning-of-statement): Handle multiple C++ line
5315 comments a little better.
5317 Almost completely rewritten. It's now more thorough when handling
5318 strings and comments and the transitions between them and the
5319 surrounding code. The statement parsing is also rewritten because
5320 `c-{beginning|end}-of-statement-1' does no longer do what we want
5321 in this function (e.g. c-b-o-s-1 doesn't go into blocks). It also
5322 works better for different counts and when sentence-flag is nil.
5324 * cc-engine.el (c-forward-syntactic-ws, c-backward-syntactic-ws):
5325 Removed the narrowings which doesn't seem to have much effect.
5326 Instead a simple check is made against the given limit. In
5327 `c-backward-syntactic-ws' this means that there's no need to
5328 search for bod, which helps up speed quite a lot in some areas.
5330 (c-collect-line-comments): New function that given the limits of
5331 one C++ style line comment returns the range for all adjacent line
5332 comments. This functionality is moved from the functions
5333 `c-literal-limits' and `c-literal-limits-fast'.
5335 (c-literal-limits): New function that finds the start and end pos
5336 of a comment or string surrounding point. This function is Emacs
5337 19.34 compatible and it has a workaround for what seems to be a
5338 bug in `parse-partial-sexp' when we use an existing state to get
5339 the state for the very next character.
5341 (c-literal-limits-fast): A faster variant of `c-literal-limits'
5342 for newer Emacsen where the state returned from
5343 `parse-partial-sexp' contains the starting pos of the last
5344 literal. This does not contain the workaround described above.
5345 The function is not yet tested and therefore not in use for now.
5346 Note that these functions regard the position between the first
5347 and second char of a comment starter to be part of the comment.
5348 Although `parse-partial-sexp' (in Emacs 19 anyway) doesn't do
5349 this, it seems more intuitive to me. Maybe `c-in-literal' should
5352 Thu Jan 15 1998 Martin Stjernholm <cc-mode-help@python.org>
5354 * cc-mode-19.el Added `when' and `unless'.
5356 Thu Jan 15 1998 Barry Warsaw <cc-mode-help@python.org>
5358 * cc-engine.el (c-guess-basic-syntax): Fixed a few byte compiler
5361 Wed Jan 14 1998 Barry Warsaw <cc-mode-help@python.org>
5363 * cc-cmds.el (c-beginning-of-defun, c-end-of-defun): New commands
5364 which mimic the standard built-ins, but do a much better job of
5365 finding the open brace when it's hung on the right side (as is the
5366 case with the most common Java style).
5368 * cc-engine.el (c-backward-to-start-of-do): Break infloop for
5369 illegal code, e.g. when someone types while (TRUE) { at the top of
5370 a buffer, we shouldn't hang when the { is typed!
5372 Tue Jan 13 1998 Barry Warsaw <cc-mode-help@python.org>
5374 * cc-cmds.el (c-beginning-of-statement): When moving forward by
5375 sentences, because we're either inside or at the start of a
5376 comment, be sure to limit movement to only within the extent of
5379 Sat Jan 10 1998 Barry Warsaw <cc-mode-help@python.org>
5381 * cc-langs.el (c-java-method-key): I really don't remember why
5382 this was added, but it seems to do more harm than good. Besides,
5383 its value was clearly wrong, being inherited from Objective-C.
5385 * cc-mode.el (java-mode): Set c-method-key to nil. I don't think
5386 this is necessary for Java, and besides, the old value was
5387 inherited from Objective-C which was clearly not right. With this
5388 change, all regression tests pass and the example by Bengt
5389 Martensson also passes:
5404 * cc-mode.texi Add some explanation to "gnu" style and "user"
5405 style, describing the relationship between these and user
5408 * cc-vars.el (c-default-style): Change this back to "gnu" after
5409 (re-reading old) discussions with RMS. This may confuse users who
5410 set variables in the top-level of their .emacs files, or using the
5411 Custom interface, since those changes will get incorporated into
5412 the "user" style. RMS insists, however, that the default style be
5415 Sun Jan 04 1998 Barry Warsaw <cc-mode-help@python.org>
5417 * cc-cmds.el (c-electric-colon): Newlines should not be inserted
5418 before or after scope operators, regardless of the value of
5421 * cc-engine.el (c-backward-to-start-of-if): Workaround a nasty to
5422 track down bug. If point is < lim, then this function can
5423 actually land you forward into the buffer. This can cause an
5424 infloop in c-beginning-of-statement-1. It is probably a bug that
5425 this function gets called with a lim > point, but that's even
5426 harder to figure out, so if that's the case when this function is
5427 called, it's simpler just to ignore lim and use bod. This breaks
5428 the infloop without causing broken indentation.
5430 Sat Jan 03 1998 Barry Warsaw <cc-mode-help@python.org>
5432 * cc-align.el (c-lineup-dont-change): New lineup function that
5433 leaves the current line's indentation unchanged. Used for the new
5434 cpp-macro-cont syntactic symbol.
5436 * cc-cmds.el (c-electric-brace): namespace-open and
5437 namespace-close braces can hang.
5439 * cc-defs.el (c-emacs-features): Added autoload cookie which Steve
5440 Baur claims is necessary for XEmacs.
5442 * cc-engine.el (c-search-uplist-for-classkey): When searching up
5443 for a class key, instead of hardcoding the extended search for
5444 "extern", use the new variable c-extra-toplevel-key, which is
5445 language dependent. For C++, this variable includes the keyword
5446 "namespace" which will match C++ namespace introducing blocks.
5448 (c-guess-basic-syntax): Support for recognizing C++ namespace
5449 blocks, by elaborating on the mechanism used to find external
5450 language blocks. Searches which hardcoded "extern" now use
5451 c-extra-toplevel-key, a language dependent variable. Case clauses
5452 that were modified: CASE 5A.1, CASE 5A.4, CASE 5F, CASE 5I, CASE
5455 CASE 3: we can now determine whether we're at the beginning of a
5456 cpp macro definition, or inside the middle of one. Set syntax to
5457 'cpp-macro in the former case, 'cpp-macro-cont in the latter. In
5458 both cases, the relpos is the beginning of the macro.
5460 (c-forward-syntactic-ws): Added code that skips forward over
5461 multi-line cpp macros.
5463 (c-beginning-of-macro): Moved, and made into a defsubst. This
5464 function can now actually find the beginning of a multi-line C
5467 (c-backward-syntactic-ws): Use c-beginning-of-macro to skip
5468 backwards over multi-line macro definitions.
5470 (c-in-literal, c-fast-in-literal): Use c-beginning-of-macro to
5471 find out whether we're in a multi-line macro definition.
5473 * cc-langs.el (c-C-extra-toplevel-key, c-C++-extra-toplevel-key,
5474 c-extra-toplevel-key): New variables which parameterize the search
5475 for additional top-level enclosing constructs. In all languages,
5476 extern lang blocks are supported (but maybe this should just be C
5477 and C++?). In C++, also namespace blocks are supported.
5479 * cc-menus.el Imenu patches by Masatake Yamato and Jan Dubois.
5481 * cc-mode.el (c++-mode): Set c-extra-toplevel-key to
5482 c-C++-extra-toplevel-key.
5484 (c-initialize-on-load): New variable, *not* customized. When set
5485 to t -- the default -- c-initialize-cc-mode is called when the
5486 cc-mode.el file is loaded, e.g. via (require 'cc-mode). This is
5487 backwards compatible with .emacs files that used CC Mode 4. I'm
5488 still not 100% sure this is the right thing to do.
5490 * cc-mode.texi: Added descriptions of the new C++ namespace
5491 syntactic symbols: namespace-open, namespace-close, innamespace.
5492 Added an example for this and also multi-line macros.
5494 Describe c-lineup-dont-change and the new cpp-macro-cont syntactic
5495 symbol. Remove the `known limitation' that multi-line macros
5498 * cc-styles.el (c-offsets-alist): Three new syntactic symbols:
5499 innamespace, namespace-open, namespace-close. These support C++
5502 Added new syntactic symbol cpp-macro-cont, by default bound to
5503 c-lineup-dont-change. This symbol is assigned to subsequent lines
5504 of a multi-line C preprocess macro definition.
5506 * cc-vars.el (c-default-style): Variable is user customizable so
5507 it's docstring should start with a `*'.
5509 Fri Jan 02 1998 Barry Warsaw <cc-mode-help@python.org>
5511 * cc-engine.el (c-fast-in-literal): Function which should be
5512 faster than c-in-literal. This uses buffer-syntactic-context
5513 which is a speedy built-in that exists only in XEmacs. Make it's
5514 alias conditional on that built-in's existance. To be honest, the
5515 performance effects should be tested. Also c-fast-in-literal
5516 knows about multi-line cpp macros while c-in-literal does not.
5517 The latter should be taught about this, but this change will wait
5518 for a future mega-patch to handle multi-line macros.
5520 Thu Jan 01 1998 Barry Warsaw <cc-mode-help@python.org>
5522 * cc-cmds.el (c-comment-line-break-function): When breaking a
5523 line-oriented comment, copy the comment leader from the previous
5524 line instead of hardcoding it to "// ". This ensures that
5525 whitespace between the slashes and the text is preserved.
5527 Tue Nov 18 1997 Barry Warsaw <cc-mode-help@python.org>
5529 * cc-langs.el (c-mode-base-map): Bind c-mark-function using a
5530 portable representation of C-M-h that differentiates this from
5531 M-BS on both XEmacs and Emacs.
5533 Sat Nov 15 1997 Barry Warsaw <cc-mode-help@python.org>
5535 * cc-cmds.el (c-electric-pound, c-electric-brace,
5536 c-electric-slash, c-electric-star, c-electric-semi&comma,
5537 c-electric-colon, c-electric-lt-gt, c-scope-operator,
5538 c-indent-command, c-indent-exp, c-indent-defun,
5539 c-backslash-region, c-fill-paragraph): Added "*" to interactive
5540 spec to barf-if-buffer-read-only.
5542 Fri Nov 14 1997 Barry Warsaw <cc-mode-help@python.org>
5544 * cc-cmds.el (c-fill-paragraph): regexp-quote the fill-prefix when
5545 search forward for the end of line oriented comments. This is in
5546 case the fill-prefix contains regexp special characters
5547 (e.g. fill-prefix == " //* ")
5549 (c-backslash-region): Do not preserve the zmacs region (XEmacs).
5551 Wed Nov 12 1997 Barry Warsaw <cc-mode-help@python.org>
5553 * cc-langs.el (c-mode-base-map): c-mark-function moved back to
5554 M-C-h. RMS says: "It ought to be on M-C-h, because that is the
5555 key to mark one function definition in whatever language you're
5556 using." I don't remember why it was moved in the first place.
5558 Tue Nov 04 1997 Barry Warsaw <cc-mode-help@python.org>
5560 * cc-cmds.el (c-electric-backspace, c-electric-delete):
5561 Interactive spec should have a read-only *.
5563 Thu Oct 30 1997 Barry Warsaw <cc-mode-help@python.org>
5565 * cc-styles.el (c-styles-alist): Merged "jdk" into "java" style
5566 and removed "jdk" style. Only differences now are inline-open and
5569 Wed Oct 29 1997 Barry Warsaw <cc-mode-help@python.org>
5571 * cc-mode.texi Document "jdk" style.
5573 * cc-styles.el (c-style-alist): "jdk" style given by Martin
5574 Buchholz <mrb@Eng.Sun.COM> for conformance with Sun's JDK style.
5576 Fri Oct 10 1997 Barry Warsaw <cc-mode-help@python.org>
5578 * cc-styles.el (c-set-style-2, c-initialize-builtin-style): Don't
5579 special case "cc-mode", it's a derived style.
5581 Fix setup of derived style "cc-mode".
5583 Introduce the new default style "user" which contains all user
5584 customizations. The style "cc-mode" is retained as an alias, but
5585 it's use is deprecated. The default style variable has been
5586 renamed c-default-style.
5588 * cc-vars.el (c-site-default-style): Renamed to c-default-style.
5589 Also, the default value is now "user".
5591 1998-01-24 SL Baur <steve@altair.xemacs.org>
5593 * Makefile (VERSION): Update to package standard 1.0.
5594 * package-info.in: Ditto.
5596 1998-01-17 SL Baur <steve@altair.xemacs.org>
5598 * cc-mode.el (c-submit-bug-report): Move reporter dependency
5599 inside the function that uses it.
5601 1998-01-09 SL Baur <steve@altair.xemacs.org>
5603 * cc-engine: (c-guess-basic-syntax): Guard against c-access-key being
5605 From Didier Verna <verna@inf.enst.fr>
5607 1998-01-03 SL Baur <steve@altair.xemacs.org>
5609 * Makefile: Update to newer package interface.
5611 1997-12-25 SL Baur <steve@altair.xemacs.org>
5613 * cc-engine.el: Add explicit dependency on cc-defs.
5614 * cc-styles.el: Ditto.
5616 1997-12-21 SL Baur <steve@altair.xemacs.org>
5618 * Makefile: Created.