ChangeLog 389 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062
2020-12-31  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Fix AWK Mode fontification bug, remove some unused variables

	* cc-awk.el (awk-font-lock-keywords): Replace a hard use of
	c-preprocessor-face-name by an `eval' expression which evaluates it.

	* cc-engine.el (c-in-knr-argdecl, c-laomib-put-cache, c-laomib-fix-elt):
	Remove unused bound variables.

2020-12-30  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: correct the handling of empty strings, also in test program

	In particular, have the macro cache invalidated after its last use in
	c-before-change.

	* cc-engine.el (top level): Enclose five def-edebug-spec's in
	eval-after-load's.

	* cc-langs.el (c-get-state-before-change-functions): Remove
	c-invalidate-macro-cache from the entries it's in, moving it to....

	* cc-mode.el (c-before-change): Call c-invalidate-macro-cache directly from
	the functions, after the call to c-invalidate-state-cache.

	* 000tests.el (cc-test-record-faces): Add handling for "empty single quoted
	strings" i.e. an invalid character quote expression.

	* bracelist-11.face: Amend for the recognition of the invalid empty single
	quoted constructs.

2020-12-28  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Add newish AWK Mode facilities, as used in gawk-4.

	* cc-awk.el (c-awk-font-lock-invalid-namespace-separators): New function.
	(c-awk-context-expand-fl-region): New function.
	(awk-font-lock-keywords): Enhance handling of function declarations to include
	:: tokens.  Fontify new system variable names FPAT, FUNCTAB, PREC, ROUNDMODE,
	SYNTAB.  Fontify new keywords BEGINFILE and ENDFILE.  Fontify new system
	functions asorti, dcngettext, isarray, patsplit, typeof.  Fontify the new
	directives @include, @load, @namespace.  Call
	c-awk-font-lock-invalid-namespace-separators as a matcher.

	* cc-fonts.el (top level): No longer require 'cc-awk.

	* cc-langs.el (c-before-context-fontification-functions): Give AWK the value
	c-awk-context-expand-fl-region rather than nil.

	* cc-mode.el (top level): Declare awk-mode-syntax-table as a variable.

	* awk-face-1.{awk,face}: Add tests for the new attributes, for the new system
	variables, and for the new keywords.

	* funcs-5.{awk,face}: New test files for new function declarations.

	* statement-22.{awk,face,res}: Add erroneous use of the :: token into
	  statements.  The .res file has been converted to "new" style.

2020-12-28  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* 000tests.el (cc-test-force-font-lock-buffer): Replace

	font-lock-fontify-buffer, which didn't fontify the entire buffer when jit-lock
	was enabled, with (font-lock-fontify-region (point-min) (point-max)).

2020-12-24  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: introduce a new cache for brace structures.  This fixes bug #45248

	Also fix three infinite loops.  The new cache accelerates backward searches
	for struct beginnings in c-looking-at-or-maybe-in-bracelist.

	* cc-engine.el (c-beginning-of-statement-1): In the final loop over unary
	operators, add a check (> (point) lim) to avoid certain infinite loops.
	(c-beginning-of-decl-1): In the first loop add a similar check on point and
	lim.
	(c-laomib-loop): New function extracted from
	c-looking-at-or-maybe-in-bracelist.
	(c-laomib-cache): New buffer local variable.
	(c-laomib-get-cache, c-laomib-put-cache, c-laomib-fix-elt)
	(c-laomib-invalidate-cache): New functions which implement the cache.
	(c-looking-at-or-maybe-in-bracelist): Replace two invocations of
	c-go-up-list-backwards with calls to c-parse-state.  Extract the new function
	c-laomib-loop.  Insert code which calls c-laomib-loop minimally, with the help
	of the new cache.

	* cc-mode.el (c-basic-common-init): Initialise the new cache (at mode start).
	(c-before-change): Invalidate the new cache.
	(c-fl-decl-start): Add an extra check (> (point) bod-lim) to prevent looping.
	Determine the enclosing brace to pass as arguments to
	c-looking-at-or-maybe-in-bracelist.

2020-12-15  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Optimize for scrolling large buffers containing few braces

	This fixes bug #25706.  It particularly pertains to .h files which contain
	only macro definitions.  Many of these files are to be found, for example, in
	the driver sections of the Linux kernel.

	* cc-engine.el (c-beginning-of-statement-1, c-on-identifier)
	(c-syntactic-skip-backward, c-find-decl-prefix-search, c-find-decl-spots)
	(c-forward-name, c-back-over-list-of-member-inits)
	(c-back-over-member-initializers, c-looking-at-inexpr-block)
	(c-guess-basic-syntax): Give search limits to, or amend existing ones to
	c-backward-syntactic-ws, c-forward-syntactic-ws, c-backward-token-2,
	c-beginning-of-statement-1.
	(c-determine-limit-no-macro): New function.
	(c-determine-limit-get-base): Remove unlimted invocation of
	c-backward-syntactic-ws.
	(c-determine-limit): Exclude movement between two different macros.  Use new
	function c-determine-limit-no-macro.
	(c-back-over-list-of-member-inits): New parameter `limit'.

	* cc-mode.el (c-unfind-coalesced-tokens, c-before-change, c-fl-decl-end):
	Give search limits to, or amend existing ones to c-backward-syntactic-ws,
	c-forward-syntactic-ws, skip-chars-backward, skip-chars-forward.

2020-12-14  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Optimise c-font-lock-<>-arglists, particularly for buffers with few <..> pairs

	* cc-fonts.el (c-font-lock-<>-arglists): In place of a regexp search for a
	complicated and slow regexp, search simply for "<" ouside of literals together
	with add hoc testing of other requirements for a <...> match.

	* cc-langs.el (c-nonsymbol-key): New c-lang-defvar from the c-lang-const.

2020-12-14  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Optimise c-parse-state for large buffers with few (if any) braces.

	* cc-engine (c-get-fallback-scan-pos): Search a maximum of 50,000 characters
	back for the two BODs.  Return nil if we dont' find them.
	(c-parse-state-get-strategy): For strategy `forward', always use the position
	`good-pos' for `start-point', even when there's a change of current macro.
	Deal with a possible return value of nil from c-get-fallback-scan-pos (as
	above).
	(c-invalidate-state-cache-1): For `c-state-cache-good-pos', instead of
	sometimes using the minimum scan pos (leading to extensive scanning of the
	entire buffer) use a point close to `here'.

2020-12-14  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: fix small incompatibilities between Emacs and XEmacs

	* cc-engine.el (c-parse-ps-state-to-cache)

	* cc-fonts.el (c-maybe-font-lock-wrong-style-comments): When testing (nth 7
	s), where s is a parser state, check for both values 1 (Emacs) and t
	(XEmacs).

	* cc-mode.el (c-populate-abbrev-table): Do not try to run abbrev-table-p on
	XEmacs, since it doesn't exist there.

2020-12-11  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Handle several K&R parameters per declaration

	* cc-engine.el (c-in-knr-argdecl): Reformulate the latter part of this
	function using c-do-declarators.

	* knr-7.{c,res}: New test files.

2020-11-26  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix error in cache handling.  This fixes bug #43481

	* cc-engine.el (c-full-pp-to-literal): Handle correctly END being before HERE
	by using parse-partial-sexp to get the end of the literal containing HERE.

2020-11-15  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* cc-langs.el (c-<>-notable-chars-re): Fix wrong '-' in regexp

2020-11-09  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: fix many compiler warnings which would appear with lexical binding

	* cc-align.el, cc-awk.el, cc-bytecomp.el, cc-cmds.el, cc-defs.el, cc-engine.el
	* cc-fonts.el, cc-langs.el, cc-mode.el, cc-subword.el, cc-vars.el: In many
	places, where function parameters are not used, prefix their names with _.

	* cc-cmds.el (c-electric-brace, c-defun-name-and-limits)
	* cc-engine.el (c-cache-to-parse-ps-state, c-full-trim-near-cache)
	(c-after-change-unmark-raw-strings, c-maybe-re-mark-raw-string)
	(c-forward-decl-or-cast-1): Remove unused local variables.

	* cc-defs.el (c-will-be-unescaped): Remove unused parameter end.
	* cc-engine.el (c-looking-at-decl-block): Remove unused parameter
	containing-sexp.
	(c-looking-at-special-brace-list): Remove unused parameter lim.
	(c-add-class-syntax): Remove unused parameter paren-state.

2020-10-28  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Only recognize foo (*bar) as a function pointer when followed by (

	* cc-engine.el (c-forward-over-decl-or-cast-1): (after CASE 2) test variables
	got-suffix-after-parens and at-decl-end before invoking
	c-fdoc-shift-type-backward.

	* decls-54.{cc,face}: New test files.

2020-10-08  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Move the handling of keyword auto into type handling for C++.

	This should allow auto, const, static, ... to be in any order.

	* cc-engine.el (c-forward-type): New return value 'no-id for when auto
	precludes the parsing of a type identifier.  Adapt processing for this.
	(c-forward-decl-or-cast-1): Use the new facility from c-forward-type.

	* cc-langs.el (c-type-modifier-prefix-kwds): Insert the value of
	c-no-type-kwds into the value.
	(c-no-type-kwds, c-no-type-key): New lang consts/vars, basically "auto".
	(c-typeless-decl-kwds, c-modifier-kwds): Remove "auto" from the C++ value.

	* decls-53.{cc,face}: New test files.

2020-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>

	CC Mode: Convert the handling of c-special-indent-hook to standard usage.

	* cc-styles.el (c-set-style): Use kill-local-variable rather than copying the
	hook's global value to the local binding.
	(c-make-styles-buffer-local): Remove redundant make-variable-buffer-local.

2020-09-20  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: Modernize the fontification of "using"

	Since "using" is now used in three distinct ways in C++, write a special
	function to handle these rather than attempting to adapt the old regular
	expressions.

	* cc-fonts.el (c-font-lock-declarators): Amend to allow the argument TYPES to
	be a face.  This face is given to the declarator being processed.
	(c-font-lock-single-decl): Make an argument to c-font-lock-declarators nil or
	t, not merely nil or non-nil.
	(c-complex-decl-matchers): Include c-font-lock-c++-using in the C++ value of
	this variable.
	(c-font-lock-c++-using): New function.

	* cc-langs.el (c-using-kwds, c-using-key): New lang consts/vars.

	* using-2.{cc,face}, using-3.{cc,face}: New test files.

2020-09-12  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: handle __attribute__,etc. inside constructor argument lists

	This corrects both the fontification and indentation of these things, fixing
	bug #42270.

	* cc-engine.el (c-do-declarators): Skip over "hangon keys" and noise macros
	whilst scanning a putative C++ function.
	(c-forward-decl-or-cast-1): When checking for typeless functions, skip over
	"hangon keys" and noise macros.

	* cc-mode.el (c-fl-decl-end): Deal with certain invalid "nested declarators"
	by scanning over them with a recursive call of c-fl-decl-end.

	* cc-vars.el (c-noise-macro-names, c-noise-macro-with-parens-names): State in
	the doc strings that if either of these is a regexp, it must have a submatch 1
	which matches the noise macro exactly.

	* constructor-3.{cc,res,face}: New test files.

2020-09-11  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix minor bugs in the string handling functions

	These sometimes gave rise to the tail of a buffer being "stringed out".

	* cc-defs.el (c-will-be-unescaped): New macro.

	* cc-mode.el (c-before-change-check-unbalanced-strings)
	(c-after-change-mark-abnormal-strings): Fix bugs in the handling of string
	fence syntax-table text properties.

2020-09-04  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: handle comma separated brace initializers.

	This includes both indentation and fontification.

	* cc-engine.el (c-do-declarators): Handle brace initializers without =
	correctly.
	(c-looking-at-or-maybe-in-bracelist): Use c-do-declarators with a simple
	inline function to check that after-type-id-pos points to the start of a
	declarator.

	* cc-langs.el (c-recognize-bare-brace-inits): New lang const/variable.

	* bracelist-35.{cc,res,face}: New test files.

2020-08-29  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix processing for when c-multiline-string-start-char is a character

	* cc-mode.el (c-pps-to-string-delim, c-multiline-string-check-final-quote):
	Replace c-clear-char-property by c-clear-syn-tab.
	(c-multiline-string-check-final-quote): Replace c-put-char-property by
	c-put-syn-tab.

2020-07-19  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Remove redundant code from c-font-lock-fontify-region

	* cc-mode.el (c-font-lock-fontify-region): Remove variables string-fence-beg
	  and lim, and the code used to calculate them.

2020-07-04  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Remove long obsolete c-looking-at-bos.  Make c-at-expression-start-p obsolete

	Fixes bug #12263.

	* cc-engine.el (c-looking-at-bos): Remove.
	(c-at-expression-start-p): Make obsolete, with no alternative function.

2020-07-04  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix wrong value of comment-start-skip, fixing half of bug #41952

	Also add functions to enable correct use of CC Mode's filling functionality
	from major modes which don't initialize CC Mode fully.  These modes are
	currently js-mode and mhtml-mode.

	* cc-langs.el (comment-start-skip): Replace "\\(" by "\\(?:" so that
	(match-end 1) isn't falsely taken to be the start of the comment.

	* cc-engine.el (c-foreign-truncate-lit-pos-cache)
	(c-foreign-init-lit-pos-cache): New functions.

2020-07-02  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* cc-mode.el (c-or-c++-mode--regexp): Replace with updated regexp from Emacs

2020-06-29  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: optimize for repeated simple operations.

	Do this by recognising that unterminated strings in a buffer are typically
	going to be few and close together.  Also optimize code for C++ attributes.

	* cc-defs.el (c-previous-single-property-change): New macro.
	(c-put-syn-tab, c-clear-syn-tab): Turned from macros into functions, and moved
	to cc-mode.el.
	(c-clear-syn-tab-properties): Amended to use c-min/max-syn-tab-mkr.
	(c-with-extended-string-fences): Removed.

	* cc-engine-el (c-enclosing-c++-attribute): Rewritten for speed.
	(c-slow-enclosing-c++-attribute): Removed.
	(c-semi-pp-to-literal): Remove a superfluous call to
	c-with-extended-string-fences.

	* cc-mode.el (c-min-syn-tab-mkr, c-max-syn-tab-mkr): two new marker variables
	which bound the region occupied by positions with c-fl-syn-tab text
	properties.
	(c-basic-common-init): Initialize these two variables.
	(c-fl-syn-tab-region): Removed.
	(c-put-syn-tab, c-clear-syn-tab): Functions moved from cc-defs.el.
	(c-clear-string-fences): Amended to use the new scheme.
	(c-restore-string-fences): Now takes no arguments; amended to use the new
	scheme.
	(c-font-lock-fontify-region): Amended to use the new scheme.

2020-06-25  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Fix an off by one error.  Fixes bug #41809.

	* cc-engine.el (c-full-pp-to-literal): Change > to >= (twice).

2020-06-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Make switch work in AWK Mode.

	* cc-langs.el (c-block-stmt-2-kwds): Insert "switch" into the AWK Mode entry.
	(c-case-kwds): Remove the special entry for AWK Mode.

2020-06-11  Michal Nazarewicz  <mina86@mina86.com>

	CC Mode: add support for Doxygen documentation style

	* cc-fonts.el (doxygen-font-lock-doc-comments, doxygen-font-lock-keywords):
	New constants defining Doxygen comment style support.

	* cc-vars.el (c-doc-comment-style): Updated docstring to mention now supported
	Doxygen mode.

	* cc-mode.texi (Documentation Comments): mention Doxygen markup.

2020-06-01  Michal Nazarewicz  <mina86@mina86.com>

	CC Mode: add `c-lineup-ternary-bodies'  (bug#41061)

	Introduce `c-lineup-ternary-bodies' function which, when used as a c lineup
	function, aligns question mark and colon of a ternary operator.  For example:

	    return arg % 2 == 0 ? arg / 2
	                        : (3 * arg + 1);

	* cc-align.el (c-lineup-ternary-bodies): New function.
	* cc-mode.texi (Operator Line-Up Functions): Document the new function.

2020-05-26  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Introduce some Objective-C 2.0 keywords.  This fixes bug #5953

	* cc-langs.el (c-other-decl-kwds): New keywords @property, @dynamic,
	@synthesize, @compatibility_alias.
	(c-protection-kwds): New keywords @package, @required, @optional.
	(c-block-stmt-1-kwds): New keywords @finally, @try, @autoreleasepool.
	(c-constant-kwds): New keywords IBAction, IBOutlet.

2020-05-24  Carl Lei  <me@xecycle.info>

	Add three C++20 coroutine keywords, co_await, co_yield, and co_return

	* cc-langs.el (c-operators): Add co_await and co_yield to the C++ value of
	"Exception" keywords.
	(c-return-kwds): Create a C++ value containing co_return.
	(c-simple-stmt-kwds): Add co_return to the C++ value.

	Copyright-paperwork-exempt: yes.

2020-05-20  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns

	* cc-mode (c-common-init): Build add-log-current-defun-function out of
	c-defun-name-and-limits instead of the former c-defun-name.

2020-05-18  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Allow "static" etc. to be placed after a declaration's type name

	Fixes bug #41284.

	* cc-langs.el (c-type-decl-prefix-key): include additionally c-modifier-kwds
	in the set of keywords at the base of this lang-const.

	* decls-52.{c,face}.  A new pair of test files.

2020-05-15  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix bug #40052, where a very large macro was too slow in scrolling

	* cc-engine.el (c-end-of-macro): Fix faulty cache handling, where the upper
	bound of c-macro-cache was never being set.
	(c-forward-comment-minus-1): New macro which terminates unwanted indefinite
	backward searching with lots of escaped newlines in c-backward-single-comment.
	(c-backward-single-comment, c-backward-comments): Use the new macro above.

	* cc-mode.el (c-before-change-check-unbalanced-strings)
	(c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string):
	Optimize three regexps by using shy groups, thus preventing regexp stack
	overflow while handling the large C Macro.

2020-04-03  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: recognize brace blocks without the hitherto required = sign

	* cc-engine.el (c-looking-at-or-maybe-in-bracelist): Add code to recognize a
	literal brace expression following an array declaration for C++.
	(c-looking-at-inexpr-block): Replace c-symbol-chars with c-symbol-char-key,
	fixing a coding error.

	* braceblock-34.{cc,res}: New test files.

2020-03-08  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: allow specified directives (e.g. pragma) to be indented as statements

	* cc-cmds.el (c-align-cpp-indent-to-body, c-cpp-indent-to-body-flag,
	c-electric-pragma, c-add-indent-to-body-to-abbrev-table,
	c-clear-stale-indent-to-body-abbrevs, c-toggle-cpp-indent-to-body): New
	functions and variables.

	* cc-langs.el (c-std-abbrev-keywords): New lang const/var.

	* cc-mode.el (c-populate-abbrev-table): New function
	(c-basic-common-init): call the c-populate-abbrev-table.
	(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode):
	Remove the setting of MODE-abbrev-table.

	* cc-vars.el (c-cpp-indent-to-body-directives): New defcustom.

	* cc-mode.texi (Custom Macros): Introduce and refer to ....
	(Indenting Directives): New page documenting the new mechanism.

2020-03-04  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix the handling of two adjacent after-change-functionses.

	The bug involved failing to set c-new-END correctly, which lead to an
	args-out-of-range error when after-change-functions was invoked twice without
	an intervening invocation of before-change-functions.

	* cc-mode.el (c-after-change): Correct a coding error in the handling of
	c-just-done-before-change.

2020-02-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Protect against consecutive calls to before-change-functions ...

	without an intervening call to after-change-functions.  This would have been a
	workaround to bug #38691 had the causes of that bug not been removed.

	* cc-mode.el (c-just-done-before-change): Add an extra value to this variable,
	'whole-buffer, this being set by c-before-change as a signal to c-after-change
	that although c-before-change has run, it has assumed the entire buffer as the
	change region.
	(c-before-change, c-after-change): Adapt to the new meaning of the above.

2020-02-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Java Mode: Fix fontification of variable decl inside `for'

	* cc-engine.el (c-forward-declarator): In place of a test for C++ Mode, test
	for either C++ Mode or Java Mode.

	* forloop-8.{java,face}: New test files.

2020-02-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* cc-defs.el (c-search-backward-char-property): Fix missing \ in a regexp \n

2020-02-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fontify foo in "const auto foo :" correctly

	* cc-engine.el (c-forward-decl-or-cast-1): While attempting to find a
	declaration's identifier, recast the latest found id. as that identifier when
	there is no other type identifier and the result of the most recent
	c-forward-type call is 'maybe or 'found.  In the latter case, remove the
	id. from the found types list, too.

	* decls-51.{cc,face}: New test files.

2020-02-16  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Amend c-backward-sws better to handle multiline block comments

	In particular, multiline comments lacking escaped newlines.

	* cc-engine.el (c-backward-sws): Whilst searching backward for a putative
	beginning of macro, move back over block comments whose innards lack escaped
	newlines.

	* macro-33.{c,res,face}: Update to reflect this bug fix.

2020-02-16  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Reformulate c-end-of-macro, handling multiline block comments better

	* cc-langs.el (c-last-open-c-comment-start-on-line-re): Comment out.
	(c-open-c-comment-on-logical-line-re): Remove.

	* cc-engine.el (c-end-of-macro): Handle multiline block comments lacking
	escaped newlines using parse-partial-sexp rather than the former variables
	removed from cc-langs.el.

2020-02-10  Alan Mackenzie  <bug-cc-mode@gnu.org>

	c-end-of-macro: Handle block coment lines with unescaped NLs correctly

	* cc-langs.el (c-last-open-c-comment-start-on-line-re): Make obsolete, and
	supersede by ...
	(c-open-c-comment-on-logical-line-re): New language variable.

	* cc-engine.el (c-end-of-macro): Inside macros, handle multiline block
	comments whose line ends are not escaped correctly.

	* macro-33.{c,res,face}: New set of test files.

2020-01-27  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Finish the documentation for c-noise-macro-{,with-parens-}names.

	The doc strings and pertinent CC Mode manual page failed to mention that these
	variables could also be regular expressions.  Amend them.

	* cc-vars.el (c-noise-macro-names, c-noise-macro-with-parens-names): Amend the
	doc strings.

	* cc-mode.texi (Noise Macros): Amend the descriptions of the two variables.

2020-01-26  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Objective C Mode: Make c-forward-type work with "unsigned long", etc.

	This allows the correct fontification of and correct functioning of C-c C-z
	(c-display-defun-name) in ns_get_pixel in Emacs's src/nsimage.m.

	* cc-langs.el (c-primitive-type-prefix-kwds): For objc, use the same value as
	for c and c++ rather than the default nil.

2020-01-26  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Add ability to find ObjC method names.

	* cc-cmds.el (c-defun-name-1): Add Objective C method name ability.

2020-01-07  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Objective C Mode imenu: cease recognizing "functions" within comments, etc.

	This fixes bug #38749.

	Also cease inserting nils at the top level of the generated imenu list for
	Objc, since this caused imenu to throw an error when called from the keyboard.

	* cc-menus.el (cc-imenu-objc-function): Put a c-literal-limits test around the
	innards of the main re-search-backward loop.  Remove the consing of top-level
	nils into the list being generated.

2019-12-07  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Allow most functions on post-self-insert-hook to be called

	This contrasts with the previous state where no such functions got called.
	This fixes bug #38406.

	* cc-cmds.el (c--unsafe-post-self-insert-hook-functions): new variable.
	(c--call-post-self-insert-hook-more-safely-1): New function.
	(c--call-post-self-insert-hook-more-safely): New macro.
	(c-electric-pound, c-electric-brace, c-electric-slash, c-electric-star)
	(c-electric-semi&comma, c-electric-colon, c-electric-lt-gt, c-electric-paren):
	Invoke c--call-post-self-insert-hook-more-safely (which calls most of the hook
	post-self-insert-hook) at the end of each of the commands.

2019-11-30  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Fix fontification bug with unterminated quotes on adjacent lines

	In particular, with these unterminated quotes on each of two adjacent lines,
	the following text was spuriously fontified with string face.

	* cc-defs.el (c-search-backward-char-property-with-value-on-char): New macro.

	* cc-mode.el (c-clear-string-fences): Check whether there is an unmatched
	quote at a lower buffer position which should match the current quote, rather
	than wrongly assuming the latter is unmatched and marking it with a
	punctuation syntax.
	(c-font-lock-fontify-region): Ensure all pertinent parts of the buffer have
	string fence properties applied before performing any syntactic operations on
	it; in particular, this applies to a quote at an earlier buffer position which
	"matches" one inside the region about to be fontified.

2019-11-14  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix two bugs in the "state cache".

	This (along with a suggestion to the OP to set
	open-paren-in-column-0-is-defun-start to nil) fixes bug #37910.  It may also
	have fixed bug #5490 and bug #18072.

	* cc-engine.el (c-state-cache-non-literal-place): Remove this non-sensical
	function, replacing it with ....
	(c-state-cache-lower-good-pos): New function.
	(c-renarrow-state-cache, c-append-lower-brace-pair-to-state-cache)
	(c-remove-stale-state-cache, c-remove-stale-state-cache-backwards): Instead of
	altering the state-cache list structure with setcar and setcdr, use setq and
	consing.
	(c-parse-state-1): Call c-state-cache-lower-good-pos rather than
	c-state-cache-non-literal-place.

2019-11-10  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* cc-vars.el (c-mark-wrong-style-of-comment): Change the :version to a string

2019-11-09  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Widen around c-font-lock-fontify-region.  This fixes bug #38049.

	* cc-mode (c-font-lock-fontify-region): Widen in this function, to ensure that
	the CC Mode font locking mechanism can examine characters outside the given
	region.

2019-11-09  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Allow fontification of "wrong" style comments with warning face.

	This fixes bug #4192.

	* cc-defs.el (c-font-lock-flush): New macro.

	* cc-cmds.el (c-toggle-comment-style): On toggling the comment style, invoke
	c-font-lock-flush when c-mark-wrong-style-of-comment is non-nil, to cause that
	marking to be done instead on the other style of comment.

	* cc-fonts.el (c-maybe-font-lock-wrong-style-comments): New function.
	(c-cpp-matchers): Call c-maybe-font-lock-wrong-style-comments when
	appropriate.

	* cc-vars.el (c-mark-wrong-style-of-comment): New customizable option.

	* cc-mode.texi (top level, Indentation Commands, Guessing the Style, Custom
	Macros): For some opening quote marks, correct '' to ``.
	(Minor Modes): Add an xref to the new page "Wrong Comment Style" in a
	footnote.
	(Wrong Comment Style): New page.

	* comments-8.{cc,face}, comments-9.{cc,face}, comments-10.{awk,face}: New test
	files.

2019-11-02  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Fix slow scrolling by adding a search limit.

	This fixes bug #10149.

	* cc-fonts.el (c-font-lock-single-decl) Limit the search by
	c-go-up-list-backwards to 500 non-literal characters.

2019-10-25  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix positioning of point whilst inserting comments without non-ws

	* cc-cmds.el (c-guess-fill-prefix): When determining a new block comment
	prefix (i.e. there isn't one already there to copy), and that prefix is hard
	up against a comment closer, ensure there are at least two spaces before the
	closer.
	(c-indent-new-comment-line): Amend the strategy for ensuring that point isn't
	left hard up against the comment closer after M-j.

2019-10-20  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Optimize c-crosses-statement-barrier-p for large blocks of comment.

	This fixes bug #18134.

	* cc-engine.el (c-crosses-statement-barrier-p): Give a limit to the
	c-backward-syntactic-ws which is searching for a virtual semicolon.  In the
	main loop, Use c-forward-syntactic-ws to skip blocks of comments.

2019-10-12  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Remove unneeded backslashes from doc strings and regular expressions

	Also make miscellaneous amendments.

	* cc-align.el, cc-cmds.el, cc-defs.el, cc-engine.el, cc-fonts.el,  cc-langs.el
	* cc-vars.el: Remove lots of unneeded backslashes.

	* cc-awk.el (c-lineup-gnu-DEFUN-intro-cont)
	* cc-langs.el (c-string-innards-re-alist)
	* cc-mode.el (c-<>-multichar-token-regexp)
	(c-stmt-boundary-skip-chars-with-comma, c-auto-ops-re): Remove redundant
	"\\|\r"s from regular expressions.

	* cc-mode.el (c-make-mode-syntax-table): Correct the name of the hook
	normal-erase-is-backspace-MODE-hook from a non-existant hook name.

2019-10-11  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: Correctly handle <:, <::, <::>, etc, according to the C++ standard

	* cc-engine.el (c-before-change-check-<>-operators): Perform checking now on
	an insertion, should point be inside a critical token.
	(c-forward-<>-arglist-recur, c-guess-continued-construct): Check for <::, etc.

	* cc-langs.el (c-<-pseudo-digraph-cont-regexp, c-<-pseudo-digraph-cont-len):
	New lang variables/constants.

2019-10-03  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: Correct the fontification of const auto foo

	* cc-engine.el (c-forward-decl-or-cast-1): Correct a coding error involving
	`and' and `or'.

	* decls-37.{cc,face}: Insert two extra lines to test the current scenario.

2019-10-03  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: Fontify correctly declarators with identifier preceded by &

	The problem was bar in the following being spuriously recognised as a
	function, and foo as a type, as though the & were a *: Foo foo (&bar);.

	* cc-engine.el (c-forward-decl-or-cast-1): New variable
	got-function-name-prefix, which is set when an operator like * (but not &)
	precedes the putative identifer in parentheses.  Test this variable when
	deciding whether or not to "move the type backwards" to the previous
	identifier.

	* cc-langs.el (c-type-decl-operator-prefix-key): New lang const and var.

	* decls-50.{cc,face}: New test files.

2019-09-21  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix wrong fontification of FOO in ASSERT (FOO && !BAR)

	* cc-engine.el (c-forward-decl-or-cast-1): Don't recognize the construct in
	CASE 18, unless additionally at-decl-end is set.

	* statement-29.{cc,face}: New test case.

2019-08-06  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: Prevent End of statement being found after {} in "count << vec{} <<"

	* cc-engine.el (c-beginning-of-statement-1): Check for operators which cannot
	start a statement, which may follow a closing brace.  Don't recognise an end
	of statement in such a case.

	* cc-langs.el (c-operator-re, c-bin-tern-operators, c-unary-operators)
	(c-non-after-{}-operators, c-non-after-{}-ops-re): New lang consts and vars.

	* stream-3.{cc,res}: New test files.

2019-08-02  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix error in macro cache.  This fixes bug #36802

	* cc-engine.el (c-invalidate-macro-cache): Add in a cond arm to handle the
	change position being less than the recorded CPP contruct end.

2019-08-02  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix spurious recognition of operators beginning with, e.g. "or"

	This fixes bug #36801.

	* cc-langs.el (c-pre-lambda-tokens-re): Use c-make-keywords-re rather than
	regexp-opt to make an optimised regexp out of a list of tokens.

2019-08-02  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Fix the timing of application and removal of string fence properties

	This fixes bug #36897.

	* cc-mode.el (c-before-change-check-unbalanced-strings): Check string fence
	text properties are actually present on string delimiters before trying to
	remove them.
	(c-before-change): Amend the nesting of unwind-protect, widen,
	c-restore-string-fences, and c-clear-string-fences.  Move
	invalidate-state-cache to outside of the widening.
	(c-after-change): Amend the nesting of unwind-protect, widen,
	c-restore-string-fences, and c-clear-string-fences.

2019-07-28  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Fix (c-beginning-of-statement -1) getting stuck with structs.

	In particular, with an initialization such as struct foo {..} bar = {...};

	* cc-cmds.el (c-forward-to-nth-EOF-{): Rename to c-forward-to-nth-EOF-\;-or-},
	and when the starting (or ending) position is in the "variable" part of a
	struct/class/union/enum/etc., move to after the terminating semicolon.  Adjust
	the counting such that N only gets decremented on a successful movement over
	{..}.
	(c-beginning-of-defun, c-end-of-defun): Rename the calls to
	c-forward-to-nth-EOF-}, as above.

2019-07-27  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Java Mode: Fix handling of nested generics ending in >>>.

	This fixes bug #24671.

	* cc-langs.el (c-multichar->-op-not->>-regexp): remove, transforming into ...
	(c-multichar->-op-not->>->>>-regexp) New lang const/var.

	* cc-engine.el (c-forward-<>-arglist-recur): use the new
	c-multichar->-op-not->>->>>-regexp in place of the old
	c-multichar->-op-not->>-regexp.

	* generics-2.{java,face}: New test files.

2019-07-27  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Stop /**/ spuriously fontifying as a doc comment under gtkdoc

	Also fix infinite loops by correcting two regexps.

	* cc-langs.el (c-last-c-comment-end-on-line-re)
	(c-last-open-c-comment-start-on-line-re): Correct the regexp fragments
	"\\*+[^/]" to "\\*+\\([^*/]\\|$\\)".

	* cc-fonts.el (gtkdoc-font-lock-keywords): Disallow /**/ for doc comment
	fontification.

2019-07-26  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode.  Create lang vars for certain skipping expressions at compile time

	This saves repeated calculations at run time.

	* cc-langs.el (c-stmt-boundary-skip-chars, c-stmt-boundary-skip-list)
	(c-stmt-boundary-skip-chars-with-comma, c-stmt-boundary-skip-list-with-comma):
	New lang constants/variables.

	* cc-engine.el (c-commas-bound-stmts): New variable
	(c-beginning-of-statement-1): Set c-commas-bound-stmts rather than
	c-stmt-delim-chars.
	(c-crosses-statement-barrier-p): Remove the now unneeded calculations of
	c-stmt-delim-chars.  Set skip chars to one of the new lang variables, and
	later to a substring of it.
	(c-at-statement-start-p): Set c-syntactic-skip-backward from the new
	variables.
	(c-at-expression-start-p): Bind c-commas-bound-stmts.  Use
	c-stmt-delim-chars-with-comma rather than c-stmt-delim-chars in a backward
	scan.
	(c-guess-basic-syntax): Bind c-commas-bound-stmts rather than
	c-stmt-delim-chars to itself.  Bind c-commas-bound-stmts to t at another place
	rather than setting c-stmt-delim-chars to c-stmt-delim-chars-with-comma.

2019-07-25  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* cc-awk.el (c-awk-var-num-ket-re): Remove /x80-/xff from it.

	Emacs isn't using ISO8859-1 by default any more.  Also remove \ from \( and \)
	in c-awk-non-arith-op-bra-re.

2019-07-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Fix problems in CC Mode with " being entered into a comment at EOB.

	* cc-engine.el (c-full-lit-near-cache): Amend the definition such that an
	element's END element will be nil if the pertinent literal is open at EOB.
	(c-full-pp-to-literal): Before setting the aforementioned END element, check
	that we're no longer in a literal.  (c-literal-limits): When
	c-full-pp-to-literal returns a list with a nil END element, replace this by
	(point-max) to keep the interface of c-literal-limits unchanged.

	* cc-mode.el (c-after-change-mark-abnormal-strings): Having found a string
	quote, check it is not inside an unterminated comment (i.e. one at EOB).

2019-07-21  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Implement C++ Mode attributes.  This fixes bug #36650.

	* cc-engine.el (c-looking-at-c++-attribute, c-enclosing-c++-attribute)
	(c-slow-enclosing-c++-attribute): New macro and functions.
	(c-crosses-statement-barrier-p): Add [ into skip-chars for C++ Mode, and use
	it to detect and skip over an attribute whilst scanning forward.
	(c-sws-lit-type): Use the new value 'attribute.
	(c-invalidate-sws-region-before): Put a save-match-data around this function.
	Detect and handle an enclosing attribute at either END or BEG.
	(c-invalidate-sws-region-after): Handle C++ attributes.
	(c-forward-sws, c-backward-sws): Handle C++ attributes.

	* cc-mode.el (c-fl-decl-end): Detect and handle point being inside a C++
	attribute.

	* attribute-1.{cc,res,face}: New test files.

2019-07-17  Alan Mackenzie  <bug-cc-mode@gnu.org>

	* cc-fonts.el (gtkdoc-font-lock-keywords): Fix faulty regexp

2019-07-16  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: allow bogously "adjacent" double quote marks to pair up syntactically

	For this introduce the text property c-fl-syn-tab to "mirror" syntax-table.

	* cc-defs.el (c-is-escaped, c-will-be-escaped, c-put-syn-tab, c-clear-syn-tab)
	(c-clear-syn-tab-properties, c-with-extended-string-fences): new macros.
	(c-point): Use c-is-escaped
	(c-search-forward-char-property, c-search-backward-char-property)
	(c-search-forward-char-property-with-value-on-char)
	(c-search-forward-char-property-without-value-on-char): Fix regexp error
	involving \n.

	* cc-engine.el (c-semi-pp-to-literal): Use c-with-extended-string-fences
	around a parse-partial-sexp.
	(c-full-get-near-cache-entry): Fix an off-by-one error.
	(c-full-pp-to-literal): Avoid writing duplicate entries into a cache.
	(c-after-change-unmark-raw-strings): Use c-clear-syn-tab-properties.

	* cc-mode.el (c-leave-cc-mode-mode): Clear the c-fl-syn-tab properties, too.
	(c-basic-common-init): Mark c-fl-syn-tab as a non-sticky text property.
	(c-depropertize-new-text): Also handle c-fl-syn-tab.
	(c-multiline-string-check-final-quote, c-parse-quotes-after-change): Use
	c-is-escaped.
	(c-fl-syn-tab-region): New variable.
	(c-clear-string-fences, c-restore-string-fences, c-remove-string-fences): New
	functions.
	(c-before-change-check-unbalanced-strings)
	(c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string):
	Use the new functions and macros.
	(c-before-change, c-after-change, c-font-lock-fontify-region): Restore the
	syntax-table text properties from c-fl-syn-tab text properties for these
	functions.
	(c-electric-pair-inhibit-predicate): Test the c-fl-syn-tab property rather
	than syntax-table.

2019-07-08  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Fix coding error in c-forward-decl-or-cast-1.  This fixes bug #36492.

	* cc-engine.el (c-forward-decl-or-cast-1): While testing for, e.g., foo(),
	check we've found the ( before trying to go to its position.

	* decls-49.{c,face}: New test files.

2019-07-08  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Fix bug #36474, such that CC Mode quotes work properly in electric-pair-mode

	Also finishes the fix for bug #36423.

	* cc-mode.el (c-initialize-cc-mode): Add an `eval-after-load' to set
	electric-pair-inhibit-predicate for existing CC Mode buffers when
	elec-pair.elc gets loaded.
	(c-basic-common-init): Set electric-pair-inhibit-predicate when a CC Mode mode
	gets initialized.
	(c-electric-pair-inhibit-predicate): New function.

2019-07-04  Alan Mackenzie  <bug-cc-mode@gnu.org>

	Fix an infinite loop in c-end-of-macro.  Should fix bug #36484

	Also fix two faulty regexps, save-match-data, and check c-major-mode-is
	'c++-mode where needed.

	* cc-langs.el (c-last-c-comment-end-on-line-re)
	(c-last-open-c-comment-start-on-line-re): Handle repeated *s in regexp
	correctly.

	* cc-engine.el (c-beginning-of-macro, c-end-of-macro): Protect the match-data
	with save-match-data around regexp operations.
	(c-end-of-macro): In the loop handling multiline block comments, check a
	comment actually is multiline.

	* cc-mode.el (c-depropertize-CPP): Only call
	c-depropertize-raw-strings-in-region in C++ Mode.

2019-07-02  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode: Improve handling of unbalanced strings

	* cc-fonts.el (c-before-font-lock-functions): Add function
	c-after-change-escape-NL-in-string into value for most languages.

	* cc-mode.el (c-after-change-escape-NL-in-string): New function.
	(c-before-change-check-unbalanced-strings): Handle the making and breaking of
	escaped newlines, by removal or addition of text.

2019-06-30  Alan Mackenzie  <bug-cc-mode@gnu.org>

	C++ Mode: change the default doc comment style from nothing to gtkdoc

	Also amend a pertinent regular expression.  This fixes bug #11865.

	* cc-vars.el (c-doc-comment-style): Insert an entry for c++-mode, namely
	gtkdoc.

	* cc-fonts.el (gtkdoc-font-lock-keywords): Amend the regexp recognizing the
	introductory "/**" to allow subsequent characters on that line.

1063
2019-06-19  Alan Mackenzie  <bug-cc-mode@gnu.org>
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106

	Update the repository for the release of CC Mode 5.34.

	* ANNOUNCEMENT: Update to release 5.34.

	* ChangeLog: Prefix the entries for changes since 5.33.

	* MANIFEST: Remove reference to cc-fix.el, which no longer exists.

	* NEWS: Prefix user visible changes in 5.34 to the file.

	* README: Update the note of tested Emacsen for CC Mode 5.34.  Change the
	recommended version of makeinfo to the newer perl versions.

	* changelinks: Add a link for changes-534.php.

	* changes-534.php: New file.

	* compat.php: Update to 5.34, and mention the (X)Emacs releases it was tested
	on.  Remove the reference to cc-fix.el, which no longer exists.

	* contrib.php: This file has been deleted, since it was very out of date.

	* filladapt.el, filladapt.el.diff: Convert the old style backquote form to
	modern style.

	* filladapt.php: Note also the backquote modification in filladapt.el.

	* hgaccess.php: Update to 5.34.  Remove the link to http://hginit.com, which
	no longer exists.

	* index.php: Update to 5.34.  Remove the link to contrib.php.

	* links.h: Replace link to changes-533.php with one to changes-534.php.

	* release.php: Update to 5.34.

	* cc-align.el, cc-awk.el, cc-bytecomp.el, cc-cmds.el, cc-defs.el,
	* cc-engine.el, cc-fonts.el, cc-guess.el, cc-langs.el, cc-menus.el, cc-mode.el,
	* cc-styles.el, cc-subword.el, cc-vars.el: Update the copyright notices.

	* cc-mode.texi: Update for release 5.34, update the copyright notice.

1107
2019-06-17  Alan Mackenzie  <bug-cc-mode@gnu.org>
1108 1109 1110 1111 1112 1113 1114 1115 1116

	Move defvars of c-doc-line-join-re + two others from cc-fonts.el to cc-mode.el

	This is because these variables are needed at runtime even when cc-fonts.el
	hasn't been loaded, as in XEmacs when font locking hasn't been enabled.

	* cc-fonts.el (c-doc-line-join-re, c-doc-bright-comment-start-re)
	(c-doc-line-join-end-ch): Move definitions to cc-mode.el.

1117
2019-06-17  Alan Mackenzie  <bug-cc-mode@gnu.org>
1118 1119 1120 1121 1122 1123 1124

	Remove the now unneeded c-font-lock-flush from CC Mode.

	* cc-defs.el (c-font-lock-flush): Delete this macro.

	* cc-engine.el (c-propertize-raw-string-opener): Delete the call to the macro.

1125
2019-06-16  Alan Mackenzie  <bug-cc-mode@gnu.org>
1126 1127 1128 1129 1130 1131 1132 1133 1134 1135

	CC Mode: remedy recent loss in performance.

	* cc-engine.el (c-back-over-member-initializers): call c-parse-state outside
	of the narrowing operation.

	* cc-fonts.el (c-get-fontification-context, c-font-lock-cut-off-declarators):
	Replace calls to c-determine-limit with crude position calculations for
	speed.

1136
2019-06-16  Alan Mackenzie  <bug-cc-mode@gnu.org>
1137 1138 1139 1140 1141 1142 1143 1144

	Move defvar of c-syntax-table-hwm from cc-mode.el to cc-defs.el.

	* cc-defs.el (c-syntax-table-hwm): Move defvar here, so that the variable is
	declared for its uses in the definition of c-emacs-features.

	* cc-engine.el, cc-mode.el: Remove the now superfluous declarations.

1145
2019-06-15  Alan Mackenzie  <bug-cc-mode@gnu.org>
1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158

	Maintain c-syntax-table-hwm when changing syntax-table text properties

	* cc-defs.el (c-min-property-position): New macro
	(c-put-char-property, c-clear-char-property, c-clear-char-properties)
	(c-clear-char-property-with-value-function)
	(c-clear-char-property-with-value-on-char-function)
	(c-put-char-properties-on-char): Adjust c-syntax-table-hwm appropriately when
	syntax-table text properties are changed.

	* cc-engine.el (c-truncate-lit-pos-cache): Remove the now unneeded setting of
	c-syntax-table-hwm.

1159
2019-06-15  Alan Mackenzie  <bug-cc-mode@gnu.org>
1160 1161 1162

	* cc-langs.el (c-opt-op-identitier-prefix): Remove this obsolete alias

1163
2019-06-13  Alan Mackenzie  <bug-cc-mode@gnu.org>
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183

	Depessimize bits of CC Mode for long C macros.

	* cc-engine.el (c-end-of-macro): Check for being in a degenerate zero length
	"macro", when setting the macro cache.
	(c-determine-+ve-limit): Add in a missing goto-char form for when start-pos is
	non-nil.
	(c-back-over-member-initializers): Add a search limit parameter.

	* cc-fonts.el (c-get-fontification-context): Add a search limit to
	c-go-up-list-backward.
	(c-font-lock-cut-off-declarators): Add a search limit to
	c-back-over-member-initializers.

	* cc-mode.el (c-before-change-check-unbalanced-strings): Don't set c-new-END
	to the end of logical line (which might be a long macro).
	(c-after-change-mark-abnormal-strings): Calculate end-hwm in place of the
	setting of c-new-END (above).  Use this as a search limit rather than
	c-new-END.

1184
2019-06-13  Alan Mackenzie  <bug-cc-mode@gnu.org>
1185 1186 1187 1188 1189 1190 1191 1192 1193

	CC Mode: replace an erroneous re-search-forward with search-forward

	Move two declarations to a more suitable point in the cc-engine.el.

	* cc-engine.el (c-after-change-unmark-raw-strings): Change an
	re-search-forward to search-forward.
	(c-semi-lit-near-cache, c-semi-near-cache-limit): Move the declarations.

1194
2019-06-13  Alan Mackenzie  <bug-cc-mode@gnu.org>
1195 1196 1197 1198 1199 1200 1201 1202

	Move declaration of c-syntax-table-hwm to avoid compiler warnings.

	This variable was declared after an invocation of a defsubst which used it,
	the defsubst being in another file.

	* cc-mode (c-syntax-table-hwm): Move the declaration to earlier in the file.

1203
2019-06-12  Alan Mackenzie  <bug-cc-mode@gnu.org>
1204 1205 1206

	* cc-mode.el: sytax-ppss-after-change-function -> syntax-ppss-flush-cache

1207
2019-06-12  Alan Mackenzie  <bug-cc-mode@gnu.org>
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218

	CC Mode: Add a workaround for syntax-ppss ignoring syntax-table prop changes

	* cc-engine.el (c-truncate-lit-pos-cache): Maintain the new variable
	c-syntax-table-hwm after buffer changes.

	* cc-mode.el (c-syntax-table-hwm): New variable.
	(c-before-change): Set c-syntax-table-hwm to "infinity".
	(c-after-change): Call syntax-ppss-after-change-function, just before a font
	locking is due to take place.

1219
2019-06-06  Alan Mackenzie  <bug-cc-mode@gnu.org>
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240

	Change the literal regexp which never matches from "a\\`" to "\\`a\\`".

	This matches the regexp now used in the Emacs master (under the name
	`regexp-unmatchable') and is slightly faster.

	* cc-defs.el (c-make-keywords-re)
	* cc-langs.el (c-cpp-include-key, c-assignment-op-regexp)
	(c-block-comment-ender-regexp, c-font-lock-comment-end-skip)
	(c-block-comment-start-regexp, c-line-comment-start-regexp)
	(c-doc-comment-start-regexp, c-decl-start-colon-kwd-re)
	(c-type-decl-prefix-key, c-type-decl-operator-prefix-key)
	(c-pre-id-bracelist-key, c-enum-clause-introduction-re)
	(c-nonlabel-token-2-key)
	* cc-engine.el (c-beginning-of-statement-1, c-forward-decl-or-cast-1)
	(c-looking-at-decl-block)
	* cc-fonts.el (c-doc-line-join-re, c-doc-bright-comment-start-re)
	* cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end)
	* cc-vars.el (c-noise-macro-with-parens-name-re, c-noise-macro-name-re)
	(c-make-noise-macro-regexps): Make the above mentioned subtitution.

1241
2019-06-04  Alan Mackenzie  <bug-cc-mode@gnu.org>
1242 1243 1244 1245 1246 1247 1248 1249 1250

	Automatically detect whether .h file is C or C++

	* lisp/progmodes/cc-mode.el (c-or-c++-mode): A new function which analyses
	contents of the buffer to determine whether it looks like C++ source code and
	based on that enables c-mode or c++-mode.
	(c-or-c++-mode--regexp): Regular expression which, when it matches a buffer,
	signals file is C++.

1251
2019-06-02  Alan Mackenzie  <bug-cc-mode@gnu.org>
1252 1253 1254

	* cc-vars.el, cc-mode.texi: Remove unwanted developer comments

1255
2019-06-02  Alan Mackenzie  <bug-cc-mode@gnu.org>
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274

	Change default offset of CC Mode syntactic symbol inlambda to 0

	It's previous default was c-lineup-inexpr-block.  This change is mainly to
	prevent excessive indentation of the innards of C++ lambda functions.

	* cc-vars.el (c-offsets-alist): Amend the offset for inlambda to 0.

	* cc-mode.texi (FAQ): Amend the answer to the question about this matter.

	* 000tests.el (cc-test-teststyle): Amend the offset for inlambda.

	* lambda-1.{pike,res}, arglist-21.{pike,res}.  Add Local Variables sections
	with the old setting for inlambda, and regenerate the resfiles.

	* lambda-3.{cc,res,face}, lambda-4.{cc,res,face}, decls-5.{pike,res}.
	Reindent the .cc files, and (re)generate the .res and .face files.
	lambda-4.res is a new file.

1275
2019-06-01  Alan Mackenzie  <bug-cc-mode@gnu.org>
1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290

	Debug and disentangle the literal cacheing in CC Mode

	(Final Commit)

	* cc-engine.el (c-semi-trim-near-cache): Correct a comparison with the wrong
	...-limit variable.
	(c-semi-pp-to-literal): Remove a wrong setting of c-lit-pos-cache-limit.
	(c-full-get-near-cache-entry): Eliminate extravagant and unneeded coding.
	(c-state-cache-init, c-record-parse-state-state): No longer manipulate
	c-lit-pos-cache, which is no longer regarded as part of c-parse-state.

	* cc-mode.el (c-basic-common-init): Call c-truncate-lit-pos-cache to initialize
	the literal cache.

1291
2019-06-01  Alan Mackenzie  <bug-cc-mode@gnu.org>
1292 1293 1294

	Permute certain literal cacheing functions in cc-engine.el; amend comments

1295
2019-06-01  Alan Mackenzie  <bug-cc-mode@gnu.org>
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323

	Tidy up the literal cacheing in CC Mode, optimizing c-full-pp-to-literal

	(Intermediate commit)

	* cc-engine.el, cc-fonts.el, cc-mode.el, : Rename:
	c-state-semi-nonlit-pos-cache -> c-lit-pos-cache,
	c-state-semi-nonlit-pos-cache-limit -> c-lit-pos-cache-limit,
	c-state-semi-nonlit-near-cache -> c-semi-lit-near-cache,
	c-truncate-semi-nonlit-pos-cache -> c-truncate-lit-pos-cache,
	c-state-semi-trim-near-cache -> c-semi-trim-near-cache,
	c-state-semi-get-near-cache-entry -> c-semi-get-near-cache-entry,
	c-state-semi-put-near-cache-entry -> c-semi-put-near-cache-entry,
	c-state-semi-pp-to-literal -> c-semi-pp-to-literal,
	c-state-full-pp-to-literal -> c-full-pp-to-literal,
	c-state-semi-trim-cache -> c-trim-lit-pos-cache.

	* cc-engine.el (c-semi-near-cache-limit): New variable.
	(c-truncate-lit-pos-cache): This now truncates the cache variables for all
	three lit- sub-caches.
	(c-semi-put-near-cache-entry): Increase c-semi-near-cache-limit to the
	position of the new entry.
	(c-full-near-cache-limit, c-full-lit-near-cache): New variables.
	(c-full-trim-near-cache, c-full-get-near-cache-entry)
	(c-full-put-near-cache-entry): New functions.
	(c-full-pp-to-literal): Amend to use the new functions, and to optimize the
	use of the available caches, similarly to c-semi-pp-to-literal.

1324
2019-05-30  Alan Mackenzie  <bug-cc-mode@gnu.org>
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338

	Optimize one of CC Mode's syntax caches for long comments and strings.

	* cc-langs.el (c-block-comment-awkward-chars): New lang constant and variable.

	* cc-engine.el (c-state-semi-nonlit-pos-cache): Enhance the doc comment.
	(c-state-semi-get-near-cache-entry, c-state-semi-pp-to-literal): Reuse entry
	if the sought position is in a literal, and lies between the literal start and
	the entry's position.
	(c-cache-to-parse-ps-state, c-parse-ps-state-below): Amend such that instead
	of cacheing a state for a position after a backslash or first character of a
	2-character comment delimiter, this is done for the previous character
	position.

1339
2019-05-21  Alan Mackenzie  <bug-cc-mode@gnu.org>
1340 1341 1342 1343 1344 1345 1346 1347 1348 1349

	C Mode: Fix indentation of DEFUN's function's argument list.

	Formally, when DEFUNs still used knr argument lists, these were indented by
	the syntactic context knr-argdecl-intro (5 columns).  Since this is no longer
	the case, we now just use c-basic-offset (2 columns in "gnu" style).

	* cc-align.el (c-indent-gnu-DEFUN-intro-cont): Modernize the indentation.
	Amend the doc string accordingly.

1350
2019-05-20  Alan Mackenzie  <bug-cc-mode@gnu.org>
1351 1352 1353 1354 1355 1356 1357 1358 1359

	CC Mode: Remove unused code from c-maybe-re-mark-raw-string

	Acknowledge that when the function is called, it is always at the start of a
	string, never in the middle or at the end of one.

	* cc-engine.el (c-maybe-re-mark-raw-string): Reformulate the cond form into a
	`when' form, with all but the first arm of the cond discarded.

1360
2019-05-18  Alan Mackenzie  <bug-cc-mode@gnu.org>
1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374

	Handle several consecutive noise macros in declaration contexts.

	In the bug scenario, the second and subsequent noise macros with parentheses
	were getting font-lock-type-face.

	* cc-engine.el (c-end-of-token, c-forward-noise-clause-not-macro-decl): New
	functions.
	(c-find-decl-prefix-search): Handle noise macros by skipping over them.
	(c-forward-decl-or-cast-1): In the loop checking for types, skip over all
	consecutive noise macros with parens, not just one.

	* macro-32.{c,face}: New test files.

1375
2019-05-15  Alan Mackenzie  <bug-cc-mode@gnu.org>
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385

	CC Mode: fix indentation in switch statement after "case a(1):".

	* cc-engine.el (c-beginning-of-statement-1): Enhance the analysis of case
	labels to handle parenthesised expressions (e.g. macros).

	* cc-langs.el (c-nonlabel-nonparen-token-key): New lang const and lang var.

	* switch-18.{cc,res}: New test files.

1386
2019-05-10  Alan Mackenzie  <bug-cc-mode@gnu.org>
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410

	Optimize CC Mode a bit for repetitive insertion and replace-regexp

	This is mainly by enhancing a parse-partial-sexp cache to retain recently
	calculated values.  Also, there are several miscellaneous optimizations and
	bug fixes.

	* cc-engine.el (c-state-semi-nonlit-near-cache): New buffer local variable.
	(c-state-semi-trim-near-cache, c-state-semi-get-near-cache-entry)
	(c-state-semi-put-near-cache-entry, c-state-semi-trim-cache): New functions.
	(c-state-semi-pp-to-literal, c-state-full-pp-to-literal): Use the new "near"
	cache.
	(c-parse-ps-state-below): Use the new function c-state-semi-trim-cache.
	(c-before-change-check-<>-operators): Check simply for < or > in the
	neighbourhood before doing more expensive processing.
	(c-maybe-re-mark-raw-string): Give a backward search limit to an operation
	which was needlessly lacking one.

	* cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end): Check a certain regexp
	is valid before performing the (somewhat expensive) actions of these
	functions.
	(c-fl-decl-start): In the search for a C++ lambda capture list, replace (slow)
	calculation of c-parse-state by a (less slow) c-go-up-list-backward.

1411
2019-05-06  Alan Mackenzie  <bug-cc-mode@gnu.org>
1412 1413 1414 1415 1416 1417 1418 1419 1420

	c-beginning-of-statement-1: Handle syntactic WS macros properly.

	* cc-engine.el (c-beginning-of-statement-1): The variable before-sws-pos
	should record the position of a closing paren/brace/bracket before moving
	backwards over a sexp.  When there is a syntactic WS macro between the
	starting point and the closing p/b/b, setq before-sws-pos again after moving
	backward over the macro.

1421
2019-05-02  Alan Mackenzie  <bug-cc-mode@gnu.org>
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441

	Fix fontification of first item in CC Mode macro without parentheses

	* cc-engine.el (c-find-decl-prefix-search): Handle the new matching
	possibility (of a #define construct) in the new c-decl-prefix-or-start-re.
	(c-find-decl-spots): Allow the initial search for an in-macro starting point
	settle on the # of #define, to facilitate the regexp matching in
	c-find-decl-prefix-search.

	* cc-langs.el (c-anchored-hash-define-no-parens): New lang const.
	(c-literal-start-regexp): Correct what was always supposed to be a "generic
	string" regexp element.
	(c-decl-prefix-or-start-re): Enhance also to match "#define <identifier>".
	(c-dposr-cpp-macro-depth): New lang variable and lang constant

	* macro-27.face: Regenerated following correction of fontification.

	* macro-31.{c,face}: New test file containing a multiline comment in a macro,
	and a struct-like macro without argument parentheses.

1442
2019-05-02  Alan Mackenzie  <bug-cc-mode@gnu.org>
1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456

	CC Mode: Fix multiline block comments in macros.

	In particulr, handle multiline block comments whose newlines are not escaped.
	There is an example of this in #define EXTRA_CONTEXT_FIELDS in editfns.c.

	* cc-engine.el (c-beginning-of-macro, c-end-of-macro): Enclose the loops
	scanning escaped newlines with outer loops which check heuristically for,
	respectively, a block comment ender and a block comment starter on the lines
	we end up on.  (A rigorous syntactic check would be too slow, here.)

	* cc-langs.el (c-last-c-comment-end-on-line-re)
	(c-last-open-c-comment-start-on-line-re): New language constants/variables.

1457
2019-04-30  Alan Mackenzie  <bug-cc-mode@gnu.org>
1458 1459 1460 1461 1462 1463 1464 1465

	CC Mode: in certain font lock loops, check point is not beyond limit.

	* cc-fonts.el (c-font-lock-enum-body, autodoc-font-lock-line-markup): As part
	of the `while' condition, check that the previous iteration of the loop hasn't
	moved point past `limit', thus obviating "wrong side of point" errors in
	re-search-forward, etc.

1466
2019-04-27  Alan Mackenzie  <bug-cc-mode@gnu.org>
1467 1468 1469 1470 1471 1472 1473

	Fix slow scrolling in C++ buffers with lots of template delimiters.

	* cc-engine.el (c-update-brace-stack): bind c-parse-and-markup-<>-arglists and
	c-restricted-<>-arglists to t around the call to c-forward-<>-arglist, to
	force the marking of template delimiters with syntax-table text properties.

1474
2019-04-26  Alan Mackenzie  <bug-cc-mode@gnu.org>
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486

	Fix the formatting of '\' (including apostrophes) in CC Mode.

	In particular, the second apostrophe must also get font-lock-warning-face.

	* cc-mode.el (c-parse-quotes-before-change, c-parse-quotes-after-change): Add
	cond arms to recognize and handle the anomalous construct '\'.  Correct the
	handling of c-new-BEG in c-parse-quotes-before-change.

	* constants-4.{c,face}: Add some new valid and invalid character constants.
	Regenerate the face file.

1487
2019-04-25  Alan Mackenzie  <bug-cc-mode@gnu.org>
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511

	Restore fontification of delimiters of multiline CC Mode strings.

	E.g., on typing the closing delimiter of a string continued onto a second
	line, the opening delimiter retained its font-lock-warning-face.

	* cc-defs.el (c-c++-raw-string-opener-re, c-c++-raw-string-opener-1-re): New
	constants.
	(c-sub-at-c++-raw-string-opener, c-at-c++-raw-string-opener): New macros.

	* cc-engine.el (c-raw-string-pos, c-depropertize-raw-strings-in-region)
	(c-after-change-unmark-raw-strings): Replace uses of open-coded raw string
	regexps by the new constants and macros in cc-defs.el.

	* cc-fonts.el (c-font-lock-raw-strings): Ditto

	* cc-mode.el (c-before-change-check-unbalanced-strings): Set c-new-BEG to the
	beginning of the string when we encounter its closing ".  When not in a raw
	string, but in a string, clear syntax-table properties from its delimiters and
	set c-new-BEG/END to its limits.
	(c-after-change-mark-abnormal-strings): When applying syntax-table properties
	to string delimiters, also set c-new-BEG/END to ensure subsequent
	fontification.

1512
2019-04-25  Alan Mackenzie  <bug-cc-mode@gnu.org>
1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528

	Fix some corner cases in the recognition of C++ raw strings.

	These are where changing the identifier in a raw string delimiter causes
	different delimiters to match eachother.

	* cc-engine.el (c-raw-string-end-delim-disrupted): New variable.
	(c-before-change-check-raw-strings): Use new variable.
	(c-after-change-unmark-raw-strings): When typing into an opening delimiter or
	altering its close delimiter causes the opening delimiter to match a later
	closing delimiter, clear all syntax-table char properties from the opening
	delimiter onwards, and set c-new-END to point max.  Also, when changing a
	closing delimiter, check whether its new value matches a previously open
	opening delimiter earlier in the buffer, and amend the syntax-table text
	properties appropriately.

1529
2019-04-23  Alan Mackenzie  <bug-cc-mode@gnu.org>
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544

	Optimize for typing characters into long C++ raw strings.

	* cc-fonts.el (c-font-lock-complex-decl-prepare, c-font-lock-objc-methods)
	(c-font-lock-declarations, c-font-lock-enum-tail)
	(c-font-lock-cut-off-declarators, c-font-lock-enclosing-decls): If the chunk
	been fontified consists entirely of comments and strings, don't attempt to
	perform the function's action.

	* cc-mode.el (c-before-change-check-unbalanced-strings): Don't expand
	(c-new-BEG c-new-END) unnecessarily to the entire raw string being fontified.
	(c-fl-decl-start, c-fl-decl-end): When in a (raw or otherwise) string, don't
	return a position outside of the string (which used to cause unneeded
	fontification).

1545
2019-04-20  Alan Mackenzie  <bug-cc-mode@gnu.org>
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579

	Fix Pike Mode's autodoc doc comments style's continued lines.

	* cc-engine.el (c-forward-sws, c-backward-sws): Recognize matches of
	c-doc-line-join-re as syntactic whitespace.
	(c-find-decl-prefix-search): Recognize and move over matches of
	c-doc-line-join-re as whitespace.
	(c-find-decl-spots): Before moving backward a char, check (bobp).  Before
	moving forward over a comment, check it isn't possibly a "bright" comment.

	* cc-fonts.el (c-get-doc-comment-style): New function, extracted from
	c-compose-keywords-list.
	(c-compose-keywords-list): Call the above new function.
	(pike-font-lock-keywords, pike-font-lock-keywords-2)
	(pike-font-lock-keywords-3): Call c-set-doc-comment-res.
	(c-doc-line-join-re, c-doc-bright-comment-start-re, c-doc-line-join-end-ch):
	New variables.
	(c-set-doc-comment-re-element, c-set-doc-comment-char-list): New macros.
	(c-set-doc-comment-res): New function.
	(c-font-lock-doc-comments): For consistency and repeatability, in a sequence
	of C++ style doc comments, don't fontify the region between BOL and the
	comment marker.
	(autodoc-line-join-re, autodoc-bright-comment-start-re)
	(autodoc-line-join-end-ch): New variables.

	* cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end): New functions.
	(c-change-expand-fl-region, c-context-expand-fl-region): Call the above two
	new functions for extra possibilities for the start and end of a construct.

	* cc-mode.texi (Doc Comments): Add a sentence drawing attention to the
	possibility of fontifying constructs within a doc comment.

	* docs-2.{pike,face}: Amend two "FIXME" comments.  Regenerate the face file.

1580
2019-04-13  Alan Mackenzie  <bug-cc-mode@gnu.org>
1581 1582 1583

	* cc-langs.el (c-class-id-suffix-ws-ids-kwds): Correct a spelling mistake

1584
2019-04-13  Alan Mackenzie  <bug-cc-mode@gnu.org>
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595

	Implement "final" before C++ class inheritance lists.

	* cc-langs.el (c-class-id-suffix-ws-ids-kwds, c-class-id-suffix-ws-ids-key):
	New lang const/var.

	* cc-engine.el (c-guess-basic-syntax CASE 5D.4): Check for and skip over any
	matches for c-class-id-suffix-ws-ids-key (i.e. "final") before ":".

	* decls-48.{cc,res}: New test files.

1596
2019-04-12  Alan Mackenzie  <bug-cc-mode@gnu.org>
1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610

	Analyze C++ method with & or && ref-qualifier as defun, not brace list

	Also firm up detection of beginning of brace list in
	c-looking-at-or-maybe-in-bracelist.

	* cc-engine.el (c-looking-at-or-maybe-in-bracelist): On detection of such a
	ref-qualifier, set braceassignp to nil.  When this variable has a nil value,
	return nil as the value of the function.  On encountering a } when scanning
	backwards, recognise this as the end of a previous construct and stop the
	scan.

	* decls-47.{cc,res}: New test files.

1611
2019-03-30  Alan Mackenzie  <bug-cc-mode@gnu.org>
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630

	Allow a CC Mode derived mode to have strings delimited by single quotes.

	Also fix the bug where the delimiters of '\033', etc. got the error face.

	* cc-langs.el (c-single-quotes-quote-strings): Enhance the doc string.
	(c-string-delims): Change doc string to doc comment.

	* cc-mode.el (c-before-change-check-unbalanced-strings): In searches and
	comparisons, take account of the string delimiters possibly being '.  Fix
	argument in call of c-before-change-check-unbalanced-strings.
	(c-parse-quotes-before-change, c-parse-quotes-after-change): Bind
	case-fold-search to nil.  Analyze escape constructs inside character constants
	more accurately, in particular accepting as valid more than one character
	after /[0-7], /x, /u, and /U.  Amend calculations to account for this extra
	length.

	* constants-4.{c,face}: New test files.

1631
2019-03-29  Alan Mackenzie  <bug-cc-mode@gnu.org>
1632 1633 1634 1635 1636

	Fix (again) regexp bug in CC Mode.

	* cc-mode.el (c-after-change-mark-abnormal-strings): "|\\\r" -> "\\|\r".

1637
2019-03-27  Alan Mackenzie  <bug-cc-mode@gnu.org>
1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689

	Improve C++ raw string fontification.

	Integrate the handling of raw string and ordinary string fontification.

	* cc-defs.el (c-font-lock-flush)
	(c-search-forward-char-property-without-value-on-char): new macros.
	(c-point): In the 'eoll arm, check for eobp.
	(c-search-forward-char-property-with-value-on-char): Handle the &optional
	limit argument being nil.
	(c-clear-char-property-with-value-on-char-function)
	(c-clear-char-property-with-value-on-char): Return the position of the first
	cleared property.

	* cc-engine.el (c-find-decl-prefix-search): Don't spuriously recognize the
	change of face at a ) as the start of a string (a "pseudo match").
	(c-old-beg-rs c-old-end-rs): New variables.
	(c-raw-string-pos): Analyze raw string delimiters more carefully.
	(c-raw-string-in-end-delim): New function.
	(c-depropertize-raw-string): Largely rewritten.
	(c-before-change-check-raw-strings): New functionality: only remove the
	syntax-table text properties from raw strings whose delimiters are about to
	change.
	(c-propertize-raw-string-id): New function.
	(c-after-change-re-mark-raw-strings): Remove, incorporating functionality into
	other functions.
	(c-propertize-raw-string-opener): Largely rewritten.
	(c-after-change-re-mark-raw-strings): Removed.
	(c-after-change-unmark-raw-strings, c-after-change-unmark-raw-strings): New
	functions.

	* cc-fonts.el (c-font-lock-raw-strings): Largely rewritten.

	* cc-langs.el (c-before-font-lock-functions): Replace
	c-after-change-re-mark-unbalanced-strings by
	c-after-change-mark-abnormal-strings in the t, c+objc, c++ and java sections.
	Add c-after-change-unmark-raw-strings and remove
	c-after-change-re-mark-raw-strings from the c++ section.

	* cc-mode.el (c-old-BEG c-old-END): Remove.
	(c-old-END-literality): New variable.
	(c-depropertize-CPP): Remove syntax-table properties from raw strings within
	macros.
	(c-before-change-check-unbalanced-strings): Call
	c-truncate-semi-nonlit-pos-cache to preserve the integrity of the cache.
	(c-before-change-check-unbalanced-strings): Call
	c-truncate-semi-nonlit-pos-cache, largely rewritten.
	(c-after-change-re-mark-unbalanced-strings): Renamed to
	c-after-change-mark-abnormal-strings.  Call c-maybe-re-mark-raw-string.

	* string-4.{cc,face,res}: New test files.

1690
2019-03-15  Alan Mackenzie  <bug-cc-mode@gnu.org>
1691 1692 1693

	* doc/misc/cc-mode.texi (Config Basics): in @itemize, @asis -> @w{}

1694
2019-03-12  Alan Mackenzie  <bug-cc-mode@gnu.org>
1695 1696 1697

	* cc-mode.el (c-fl-decl-start): Remove some developer comments.

1698
2019-03-12  Alan Mackenzie  <bug-cc-mode@gnu.org>
1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751

	Correct the indentation of CC Mode brace lists

	while preserving the indentation of nested C++ uniform initialization.

	* cc-align.el (c-lineup-2nd-brace-entry-in-arglist)
	(c-lineup-class-decl-init-+, c-lineup-class-decl-init-after-brace): New
	indentation functions.

	* cc-engine.el (c-forward-class-decl): New function.
	(c-do-declarators): New function, partially extracted from
	c-font-lock-declarators, which now calls the new function.
	(c-inside-bracelist-p): Amend the introductory comment.
	(c-add-stmt-syntax): Add code to prevent the spurious recognition of a
	'defun-block-intro when a brace pair is used as an initializer.
	(c-evaluate-offset): No longer ignore vectors of length >= 2.
	(c-calc-offset): Refactor clumsily nested `if'/`or' into a cond form.

	* cc-fonts.el (c-font-lock-declarators): Replace the bulk of this function by
	a call to the new c-forward-class-decl.

	* cc-langs.el (c-type-decl-prefix-key): Recognize "~" as a type decl operator.

	* cc-mode.el (c-fl-decl-start): While searching backward for a "}" at an EOD,
	deal with actually finding the end of a brace list.

	* cc-mode.texi (List Line-Up): document c-lineup-2nd-brace-entry-in-arglist,
	c-lineup-class-decl-init-+, and c-lineup-class-decl-init-after-brace.

	* cc-styles.el (c-style-alist): In styles "gnu", "bsd", "stroustrup",
	"python", and "java", change the offset for brace-list-intro from the default
	value or c-lineup-arglist-intro-after-paren to a list beginning with the
	symbol first, followed by two of the new alignment functions, followed by +.

	* cc-vars.el (c-offset-alist): Change the default value of brace-list-entry
	from c-lineup-under-anchor back to 0.

	* 000-tests.el (cc-test-teststyle): Set the entry in c-offsets-alist for
	brace-list-intro to the same as in c-style-alist, above.

	* bracelist-2.pike: Reindent.

	* bracelist-25.{cc,res,face}: Reindent the .cc, then regenerate the .res and
	.face

	* bracelist-31.{c,res}: Reindent the .c, then regenerate the .res.

	* bracelist-33.{cc,res}: New test files.

	* bracelist-9.c: Reindent.

	* class-21.c: Reindent.

1752
2019-03-09  Alan Mackenzie  <bug-cc-mode@gnu.org>
1753 1754 1755 1756 1757 1758 1759

	CC Mode: Correct some incorrect regular expressions:

	* cc-awk.el (c-awk-regexp-char-list-re): "^" -> "\\^".  R*x?R* -> \(R*x\)?R*.

	* cc-mode.el (c-after-change-re-mark-unbalanced-strings): "|" -> "\\|".

1760
2019-03-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
1761 1762 1763 1764 1765 1766 1767 1768 1769 1770

	* cc-mode.texi: Work around makeinfo alignment bug.  Fix problem with ss index

	* cc-mode.texi (top level): Using txicommandconditionals to differentiate
	between the C and perl versions of Texinfo, create an "ss index" unless we are
	both using the C Texinfo and are building the .dvi output format.
	(Config Basics): Work around a perl Texinfo alignment bug by writing a
	separate version of an item list structure for this version, simplifying it
	considerably.

1771
2019-03-03  Alan Mackenzie  <bug-cc-mode@gnu.org>
1772 1773 1774 1775 1776 1777 1778 1779 1780 1781

	Correct some slightly incorrect regular expressions:

	* cc-awk.el (c-awk-harmless-char-re, c-awk-harmless-line-char-re)
	(c-awk-_-harmless-nonws-char-re): [...\\\\...] -> [...\\...].

	* cc-engine.el (c-literal-limits): "*/" -> "\\*/".

	* cc-mode.el (c-after-change-re-mark-unbalanced-strings): "\\\r" -> "\r".

1782
2019-02-17  Alan Mackenzie  <bug-cc-mode@gnu.org>
1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812

	Fontify C function identifiers in parentheses correctly (e.g. in lisp.h)

	Fix handling of CC Mode's syntactic WS cache.  Make noise-macro option
	variables buffer local.

	* cc-engine.el (c-put-is-sws, c-put-in-sws, c-remove-is-sws, c-remove-in-sws)
	(c-remove-is-and-in-sws): Add edebug specs.
	(c-invalidate-sws-region-before): Add a `beg' parameter.  Handle noise
	macros like other literals.
	(c-invalidate-sws-region-after-del): Move the adjustment of (cdr
	c-sws-lit-limits) due to buffer change to c-invalidate-sws-region-after.
	(c-invalidate-sws-region-after-ins): Move (goto-char end) to the correct
	place.
	(c-invalidate-sws-region-after): Adjust (cdr c-sws-lit-limits) due to buffer
	change.  Handle noise macros.
	(c-backward-sws): Set simple-ws-beg appropriately when the start point is in
	the middle of a noise macro.
	(c-forward-decl-or-cast-1): Recognize a function identifier being declared in
	parentheses.

	* cc-mode.el (c-before-change): Supply a `beg' argument to
	c-invalidate-sws-region-before.

	* cc-vars.el (c-noise-macro-with-parens-name-re, c-noise-macro-name-re)
	(c-noise-macro-names, c-noise-macro-with-parens-names): Make these buffer
	local variables.

	* decls-46.{c,face}: New test files.

1813
2019-01-28  Alan Mackenzie  <bug-cc-mode@gnu.org>
1814 1815 1816 1817 1818 1819 1820 1821 1822

	Fix c-beginning-of-statement-1 wrongly returning `previous', not `same'

	This was happening when the start position was already at a beginning of
	statement, and LIM was also this position.

	* cc-engine.el (c-beginning-of-statement-1): Make (setq ret 'previous) depend
	on (>= (point) lim) at the pertinent place in the source.

1823
2019-01-26  Alan Mackenzie  <bug-cc-mode@gnu.org>
1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836

	Distinguish better between nil and `same' in c-beginning-of-statement-1

	This corrects a slight flaw in today's previous commits for this function.

	* cc-mode (c-bos-pop-state, c-bos-pop-state-and-retry): set pre-stmt-found to
	t when throwing nil to the catch form in c-beginning-of-statement-1 to
	terminate its loop.
	(c-beginning-of-statement-1): New local variable pre-stmt-found, which gets
	set to t to indicate some backward stop to further scanning has been found.
	This contrasts with the case where the search limit is passed.  Use this
	variable in deciding whether or not the result of the function should be nil.

1837
2019-01-26  Alan Mackenzie  <bug-cc-mode@gnu.org>
1838 1839 1840

	Remove developer comments accidentally left in previous commit

1841
2019-01-26  Alan Mackenzie  <bug-cc-mode@gnu.org>
1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855

	Detect when we hit limit in backward search in c-just-after-func-arglist-p

	This is a correction of the faulty patch made on 2019-01-03.

	This fixes a bug reported by Yasushi SHOJI <yasushi.shoji@gmail.com> to
	emacs-devel on 2018-11-26.

	* cc-engine.el (c-beginning-of-statement-1): Add new parameter HIT-LIM which,
	if non-nil causes the function to return nil rather than 'same when we reach
	the backward search limit without finding the beginning of statement.
	(c-just-after-func-arglist-p): Supply argument t to this new parameter in call
	to c-beginning-of-statement-1.

1856
2019-01-25  Alan Mackenzie  <bug-cc-mode@gnu.org>
1857 1858 1859 1860 1861 1862 1863 1864

	Fix a loop in c-fl-decl-start.  This fixes bug #34186.

	* cc-mode.el (c-fl-decl-start) In the pair of operations
	c-syntactic-skip-backward and c-forward-syntactic-ws, ensure the latter
	doesn't come back to the position before the former, and break out of the
	enclosing loop if it does.

1865
2019-01-22  Alan Mackenzie  <bug-cc-mode@gnu.org>
1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877

	Extend electric-pair-mode actions to < and >, and also to ( and ) in literals

	* cc-cmds.el (c-electric-lt-gt): Actuate electric-pair-mode if a < or > is
	typed in a context where this is meaningful (#include, or template).
	(c-electric-paren): Allow electric-pair-mode activity in a comment or string.

	* cc-defs.el (c-make-keywords-re): Fix a bug where lists of source symbols
	could get overwritten when parameter adorn is set to 'appendable.

	* cc-langs.el (c-cpp-include-key): New lang const and var.

1878
2019-01-15  Alan Mackenzie  <bug-cc-mode@gnu.org>
1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896

	Make CC Mode and electric-pair-mode work together.  This fixes bug #33794

	* cc-cmds.el (c-electric-pound, c-electric-slash, c-electric-star)
	(c-electric-semi&comma, c-electric-colon, c-electric-lt-gt): Bind
	post-self-insert-hook to nil around calls to self-insert-command to protect
	against arbitrary functionality confusing CC Mode.
	(c-do-brace-electrics): New function, extracted from c-electric-brace and
	enhanced.
	(c-electric-brace): Bind post-self-insert-hook to nil around the call to
	self-insert-command.  When electric-pair-mode is configured, call
	electric-pair-post-self-insert-function.  Handle any deletion done by this
	function.  Call c-do-brace-electrics for the inserted brace, and perhaps for a
	brace inserted by electric-pair-self-insert-function.
	(c-electric-paren): Bind post-self-insert-hook to nil around the call to
	self-insert-command.  When electric-pair-mode is configured, call
	electric-pair-post-self-insert-function.

1897
2019-01-03  Alan Mackenzie  <bug-cc-mode@gnu.org>
1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909

	Detect when we hit limit in backward search in c-just-after-func-arglist-p

	This fixes a bug reported by Yasushi SHOJI <yasushi.shoji@gmail.com> to
	emacs-devel on 2018-11-26, where wrong analysis and fontification occurred.

	* cc-engine.el (c-beginning-of-statement-1): Add new parameter HIT-LIM which,
	if non-nil causes the function to return nil rather than 'same when we reach
	the backward search limit without finding the beginning of statement.
	(c-just-after-func-arglist-p): Supply argument t to this new parameter in call
	to c-beginning-of-statement-1.

1910
2018-12-30  Alan Mackenzie  <bug-cc-mode@gnu.org>
1911 1912 1913 1914 1915 1916 1917 1918 1919

	CC Mode - use font-lock-comment-delimiter-face on block comment end delimiters

	In particular when the default comment type is currently line comments.  Do
	this by setting font-lock-comment-end-skip.

	* cc-cmds.el (c-font-lock-comment-end-skip): New lang const.
	(font-lock-comment-end-skip): New c-lang-setvar.

1920
2018-12-20  Alan Mackenzie  <bug-cc-mode@gnu.org>
1921 1922 1923 1924 1925 1926 1927 1928

	Check result from c-backward-token-2 to avoid infinite loop

	This fixes bug #33784.

	* cc-fonts.el (c-get-fontification-context): While moving back over enclosing
	parentheses, check that c-backward-token-2 actually moves.

1929
2018-12-10  Alan Mackenzie  <bug-cc-mode@gnu.org>
1930 1931 1932 1933 1934 1935 1936 1937 1938

	CC Mode: stop extra parens on expression causing false fontification as type

	* cc-fonts.el (c-get-fontification-context): recognize arithmetic operator
	followed by several open parentheses, not just one, as not being an argument
	list.

	* statement-27.{cc,face}: New test files

1939
2018-12-10  Alan Mackenzie  <bug-cc-mode@gnu.org>
1940 1941 1942 1943 1944 1945 1946 1947 1948 1949

	CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer to type a"

	* cc-engine.el (c-forward-decl-or-cast-1): When testing for an identifier
	after "a *", on failure additionally check for a digit, setting a new flag
	variable got-number if one is found.  In the test for CASE 18, check this
	flag.

	* statement-28.{cc,face}: New test files.

1950
2018-12-07  Alan Mackenzie  <bug-cc-mode@gnu.org>
1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962

	CC Mode: Compensate for backward-sexp ignoring trailing commas after {...}

	This fixes bug #32808.

	* cc-engine.el (c-beginning-of-statement-1): New variable comma-delimited, set
	when we're about to scan backward over a comma.  Do not reckon a brace block
	as bounding a statement when it is followed or preceded by a comma (except
	when argument comma-delim is non-nil).
	(c-guess-basic-syntax, CASE 9C): Call c-beginning-of-statement-1 with argument
	comma-delim changed to non-nil.

1963
2018-11-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
1964 1965 1966 1967 1968 1969 1970

	Fix bug #33416, where typing a ) in a comment at EOB caused a loop (CC Mode).

	* cc-mode.el (c-fl-decl-start): A c-forward-syntactic-ws leaves point inside
	whitespace when moving over a comment at EOB which has no terminating LF.
	Check this possibility and correct for it.

1971
2018-10-30  Alan Mackenzie  <bug-cc-mode@gnu.org>
1972 1973 1974 1975 1976 1977 1978 1979 1980 1981

	Fix C++ Mode dynamic error with string delimiters.

	Fixes bug #33163

	* cc-mode.el (c-before-change-check-unbalanced-strings): Use the correct
	variable `end' in place of the wrong `c-new-END'.
	(c-after-change-re-mark-unbalanced-strings): Correct a logic error whilst
	skipping over comments.

1982
2018-10-14  Alan Mackenzie  <bug-cc-mode@gnu.org>
1983 1984 1985 1986 1987 1988 1989 1990 1991

	Add ~44 edebug specs to CC Mode.

	* cc-cmds.el, cc-defs.el, cc-engine.el, cc-fonts.el, cc-langs.el: Add lots of
	edebug specs.

	* cc-engine.el (c-state-maybe-marker): Tidy up so as to evaluate an argument
	only once at runtime.

1992
2018-09-26  Alan Mackenzie  <bug-cc-mode@gnu.org>
1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004

	CC Mode: consider tails of compound identifiers when seeking found types.

	* cc-engine.el (c-forward-over-token): New function, extracted from ...
	(c-forward-over-token-and-ws): Refactor to use the above.
	(c-forward-type): Use c-check-qualified-type in place of c-check-type
	(twice).
	(c-forward-over-compound-identifier): New function.
	(c-check-qualified-type): New function.

	* decls-45.{cc,face}: New test files.

2005
2018-08-27  Alan Mackenzie  <bug-cc-mode@gnu.org>
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017

	CC Mode: Fix syntactic context of BOD sometimes being 'topmost-intro-cont

	This happened when the type of the previous function was a struct, etc.,
	declaration.

	* cc-mode (c-guess-basic-syntax CASE 5N): Check here (for 'topmost-intro-cont)
	that the first opening brace after BOD is the opening brace preceding the
	starting point.

	* decls-44.{c,res}: New test files.

2018
2018-08-27  Alan Mackenzie  <bug-cc-mode@gnu.org>
2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029

	c-where-wrt-brace-construct: deal with point following a struct's semicolon.

	More precisely, when point is right after the terminating semicolon of a
	construct like "struct foo { .... } bar;", the function must return
	'at-function-end.

	* cc-cmds.el (c-where-wrt-brace-construct): Surround an existing test for
	'at-function-end with an `or' form, the other arm testing for being after the
	semicolon above.

2030
2018-08-26  Alan Mackenzie  <bug-cc-mode@gnu.org>
2031 2032 2033