From: Alan Mackenzie Date: Tue, 20 Dec 2011 16:00:47 +0000 (+0000) Subject: Update programs.texi and cc-mode.texi for new CC Mode features: X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/47d42d81afa02760899d55c7d7ae847492928648 Update programs.texi and cc-mode.texi for new CC Mode features: cc-mode.texi: Update version string to 5.32. programs.texi: Describe "guessing" of indentation style. Update C-M-a/e. --- diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3475dda704..22f9a4ae7c 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2011-12-20 Alan Mackenzie + + * programs.texi (Motion in C): Update the description of C-M-a and + C-M-e, they now DTRT in enclosing scopes. + (Custom C Indent): Add @dfn{guessing} of the indentation style. + 2011-12-20 Chong Yidong * maintaining.texi (VCS Concepts): Add "working tree" terminology. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index bb62ad67b2..892c574734 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -38,8 +38,8 @@ Highlight program syntax (@pxref{Font Lock}). * Glasses:: Making identifiersLikeThis more readable. * Semantic:: Suite of editing tools based on source code parsing. * Misc for Programs:: Other Emacs features useful for editing programs. -* C Modes:: Special commands of C, C++, Objective-C, - Java, and Pike modes. +* C Modes:: Special commands of C, C++, Objective-C, Java, + IDL, Pike and AWK modes. * Asm Mode:: Asm mode and its special features. @ifnottex * Fortran:: Fortran mode and its special features. @@ -606,6 +606,13 @@ information on customizing indentation for C and related modes, including how to override parts of an existing style and how to define your own styles. + As an alternative to specifying a style, you can get Emacs to +@dfn{guess} the style by scanning a code buffer which is already +formatted. To do this, call @kbd{M-x c-guess} in your sample buffer. +You can then apply this guessed style to other buffers with @kbd{M-x +c-guess-install}. @xref{Guessing the Style,,, ccmode, the CC Mode +Manual}, for more details about this mechanism. + @node Parentheses @section Commands for Editing with Parentheses @@ -1462,17 +1469,17 @@ with Emacs. related modes. @table @code -@item M-x c-beginning-of-defun -@itemx M-x c-end-of-defun +@item C-M-a +@itemx C-M-e @findex c-beginning-of-defun @findex c-end-of-defun Move point to the beginning or end of the current function or -top-level definition. These are found by searching for the least +top-level definition. In languages with enclosing scopes (such as +C++'s classes) the @dfn{current function} is the immediate one, +possibly inside a scope. Otherwise it is the one defined by the least enclosing braces. (By contrast, @code{beginning-of-defun} and -@code{end-of-defun} search for braces in column zero.) If you are -editing code where the opening brace of a function isn't placed in -column zero, you may wish to bind @code{C-M-a} and @code{C-M-e} to -these commands. @xref{Moving by Defuns}. +@code{end-of-defun} search for braces in column zero.) @xref{Moving +by Defuns}. @item C-c C-u @kindex C-c C-u @r{(C mode)} diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 5d8e05806e..dcf816e7fd 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-12-20 Alan Mackenzie + + * cc-mode.texi: Update version string 5.31 -> 5.32. + 2011-12-06 Juanma Barranquero * gnus-faq.texi (FAQ 2-1, FAQ 3-8, FAQ 4-14, FAQ 9-1): Fix typos. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index c36e45e60f..8b589259a4 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -190,7 +190,7 @@ developing GNU and promoting software freedom.'' @titlepage @sp 10 -@center @titlefont{CC Mode 5.31} +@center @titlefont{CC Mode 5.32} @sp 2 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} @sp 2 @@ -378,7 +378,7 @@ was added in version 5.30. This manual describes @ccmode{} @comment The following line must appear on its own, so that the -version 5.31. +version 5.32. @comment Release.py script can update the version number automatically @ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C,