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