diff options
| author | Gerd Moellmann | 1999-12-12 18:44:55 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-12-12 18:44:55 +0000 |
| commit | b1c609b18d389ce3a15a4bee73540ac9a4ac0ec5 (patch) | |
| tree | 4581466d5ddebf34b6fc43078b67d69d25a2336b | |
| parent | d7bd46ed5f4602f27f28aa1ac38afb48309aab39 (diff) | |
| download | emacs-b1c609b18d389ce3a15a4bee73540ac9a4ac0ec5.tar.gz emacs-b1c609b18d389ce3a15a4bee73540ac9a4ac0ec5.zip | |
cc-mode changes.
| -rw-r--r-- | etc/NEWS | 142 |
1 files changed, 142 insertions, 0 deletions
| @@ -410,6 +410,148 @@ the difference that the command will be run on each file individually. | |||
| 410 | ** The variable mail-specify-envelope-from controls whether to | 410 | ** The variable mail-specify-envelope-from controls whether to |
| 411 | use the -f option when sending mail. | 411 | use the -f option when sending mail. |
| 412 | 412 | ||
| 413 | ** CC mode changes. | ||
| 414 | |||
| 415 | Note: This release contains changes that might not be compatible with | ||
| 416 | current user setups (although it's believed that these | ||
| 417 | incompatibilities will only show in very uncommon circumstances). | ||
| 418 | However, since the impact is uncertain, these changes may be rolled | ||
| 419 | back depending on user feedback. Therefore there's no forward | ||
| 420 | compatibility guarantee wrt the new features introduced in this | ||
| 421 | release. | ||
| 422 | |||
| 423 | *** New initialization procedure for the style system. | ||
| 424 | When the initial style for a buffer is determined by CC Mode (from the | ||
| 425 | variable c-default-style), the global values of style variables now | ||
| 426 | take precedence over the values specified by the chosen style. This | ||
| 427 | is different than the old behavior: previously, the style-specific | ||
| 428 | settings would override the global settings. This change makes it | ||
| 429 | possible to do simple configuration in the intuitive way with | ||
| 430 | Customize or with setq lines in one's .emacs file. | ||
| 431 | |||
| 432 | By default, the global value of every style variable is the new | ||
| 433 | special symbol set-from-style, which causes the value to be taken from | ||
| 434 | the style system. This means that in effect, only an explicit setting | ||
| 435 | of a style variable will cause the "overriding" behavior described | ||
| 436 | above. | ||
| 437 | |||
| 438 | Also note that global settings override style-specific settings *only* | ||
| 439 | when the initial style of a buffer is chosen by a CC Mode major mode | ||
| 440 | function. When a style is chosen in other ways --- for example, by a | ||
| 441 | call like (c-set-style "gnu") in a hook, or via M-x c-set-style --- | ||
| 442 | then the style-specific values take precedence over any global style | ||
| 443 | values. In Lisp terms, global values override style-specific values | ||
| 444 | only when the new second argument to c-set-style is non-nil; see the | ||
| 445 | function documentation for more info. | ||
| 446 | |||
| 447 | The purpose of these changes is to make it easier for users, | ||
| 448 | especially novice users, to do simple customizations with Customize or | ||
| 449 | with setq in their .emacs files. On the other hand, the new system is | ||
| 450 | intended to be compatible with advanced users' customizations as well, | ||
| 451 | such as those that choose styles in hooks or whatnot. This new system | ||
| 452 | is believed to be almost entirely compatible with current | ||
| 453 | configurations, in spite of the changed precedence between style and | ||
| 454 | global variable settings when a buffer's default style is set. | ||
| 455 | |||
| 456 | (Thanks to Eric Eide for clarifying this explanation a bit.) | ||
| 457 | |||
| 458 | **** c-offsets-alist is now a customizable variable. | ||
| 459 | This became possible as a result of the new initialization behavior. | ||
| 460 | |||
| 461 | This variable is treated slightly differently from the other style | ||
| 462 | variables; instead of using the symbol set-from-style, it will be | ||
| 463 | completed with the syntactic symbols it doesn't already contain when | ||
| 464 | the style is first initialized. This means it now defaults to the | ||
| 465 | empty list to make all syntactic elements get their values from the | ||
| 466 | style system. | ||
| 467 | |||
| 468 | **** Compatibility variable to restore the old behavior. | ||
| 469 | In case your configuration doesn't work with this change, you can set | ||
| 470 | c-old-style-variable-behavior to non-nil to get the old behavior back | ||
| 471 | as far as possible. | ||
| 472 | |||
| 473 | *** Improvements to line breaking and text filling. | ||
| 474 | CC Mode now handles this more intelligently and seamlessly wrt the | ||
| 475 | surrounding code, especially inside comments. For details see the new | ||
| 476 | chapter about this in the manual. | ||
| 477 | |||
| 478 | **** New variable to recognize comment line prefix decorations. | ||
| 479 | The variable c-comment-prefix-regexp has been added to properly | ||
| 480 | recognize the line prefix in both block and line comments. It's | ||
| 481 | primarily used to initialize the various paragraph recognition and | ||
| 482 | adaptive filling variables that the text handling functions uses. | ||
| 483 | |||
| 484 | **** New variable c-block-comment-prefix. | ||
| 485 | This is a generalization of the now obsolete variable | ||
| 486 | c-comment-continuation-stars to handle arbitrary strings. | ||
| 487 | |||
| 488 | **** CC Mode now uses adaptive fill mode. | ||
| 489 | This to make it adapt better to the paragraph style inside comments. | ||
| 490 | |||
| 491 | It's also possible to use other adaptive filling packages inside CC | ||
| 492 | Mode, notably Kyle E. Jones' Filladapt mode (http://wonderworks.com/). | ||
| 493 | A new convenience function c-setup-filladapt sets up Filladapt for use | ||
| 494 | inside CC Mode. | ||
| 495 | |||
| 496 | Note though that the 2.12 version of Filladapt lacks a feature that | ||
| 497 | causes it to work suboptimally when c-comment-prefix-regexp can match | ||
| 498 | the empty string (which it commonly does). A patch for that is | ||
| 499 | available from the CC Mode web site (http://www.python.org/emacs/ | ||
| 500 | cc-mode/). | ||
| 501 | |||
| 502 | **** It's now possible to selectively turn off auto filling. | ||
| 503 | The variable c-ignore-auto-fill is used to ignore auto fill mode in | ||
| 504 | specific contexts, e.g. in preprocessor directives and in string | ||
| 505 | literals. | ||
| 506 | |||
| 507 | **** New context sensitive line break function c-context-line-break. | ||
| 508 | It works like newline-and-indent in normal code, and adapts the line | ||
| 509 | prefix according to the comment style when used inside comments. If | ||
| 510 | you're normally using newline-and-indent, you might want to switch to | ||
| 511 | this function. | ||
| 512 | |||
| 513 | *** Fixes to IDL mode. | ||
| 514 | It now does a better job in recognizing only the constructs relevant | ||
| 515 | to IDL. E.g. it no longer matches "class" as the beginning of a | ||
| 516 | struct block, but it does match the CORBA 2.3 "valuetype" keyword. | ||
| 517 | Thanks to Eric Eide. | ||
| 518 | |||
| 519 | *** Improvements to the Whitesmith style. | ||
| 520 | It now keeps the style consistently on all levels and both when | ||
| 521 | opening braces hangs and when they don't. | ||
| 522 | |||
| 523 | **** New lineup function c-lineup-whitesmith-in-block. | ||
| 524 | |||
| 525 | *** New lineup functions c-lineup-template-args and c-indent-multi-line-block. | ||
| 526 | See their docstrings for details. c-lineup-template-args does a | ||
| 527 | better job of tracking the brackets used as parens in C++ templates, | ||
| 528 | and is used by default to line up continued template arguments. | ||
| 529 | |||
| 530 | *** c-lineup-comment now preserves alignment with a comment on the | ||
| 531 | previous line. It used to instead preserve comments that started in | ||
| 532 | the column specified by comment-column. | ||
| 533 | |||
| 534 | *** c-lineup-C-comments handles "free form" text comments. | ||
| 535 | In comments with a long delimiter line at the start, the indentation | ||
| 536 | is kept unchanged for lines that start with an empty comment line | ||
| 537 | prefix. This is intended for the type of large block comments that | ||
| 538 | contain documentation with its own formatting. In these you normally | ||
| 539 | don't want CC Mode to change the indentation. | ||
| 540 | |||
| 541 | *** The `c' syntactic symbol is now relative to the comment start | ||
| 542 | instead of the previous line, to make integers usable as lineup | ||
| 543 | arguments. | ||
| 544 | |||
| 545 | *** All lineup functions have gotten docstrings. | ||
| 546 | |||
| 547 | *** More preprocessor directive movement functions. | ||
| 548 | c-down-conditional does the reverse of c-up-conditional. | ||
| 549 | c-up-conditional-with-else and c-down-conditional-with-else are | ||
| 550 | variants of these that also stops at "#else" lines (suggested by Don | ||
| 551 | Provan). | ||
| 552 | |||
| 553 | *** Minor improvements to many movement functions in tricky situations. | ||
| 554 | |||
| 413 | ** Isearch changes | 555 | ** Isearch changes |
| 414 | 556 | ||
| 415 | *** In Isearch mode, mouse-2 in the echo area now yanks the current | 557 | *** In Isearch mode, mouse-2 in the echo area now yanks the current |