emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100958: Enhance CC Mode manual to co


From: Alan Mackenzie
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100958: Enhance CC Mode manual to cover the new Java features.
Date: Sun, 01 Aug 2010 18:07:10 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100958
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sun 2010-08-01 18:07:10 +0000
message:
  Enhance CC Mode manual to cover the new Java features.
modified:
  doc/misc/ChangeLog
  doc/misc/cc-mode.texi
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2010-07-28 10:25:38 +0000
+++ b/doc/misc/ChangeLog        2010-08-01 18:07:10 +0000
@@ -1,3 +1,12 @@
+2010-08-01  Alan Mackenzie  <address@hidden>
+
+       Enhance the manual for the latest Java Mode.
+
+       * cc-mode.texi (Syntactic Symbols): New symbols annotation-top-cont and
+       annotation-var-cont.
+       (Java Symbols): Page renamed from Anonymous Class Symbol.  Document the
+       two new symbols.
+
 2010-07-28  Michael Albinus  <address@hidden>
 
        * tramp.texi (Traces and Profiles): Describe verbose level 9.

=== modified file 'doc/misc/cc-mode.texi'
--- a/doc/misc/cc-mode.texi     2010-06-24 07:10:51 +0000
+++ b/doc/misc/cc-mode.texi     2010-08-01 18:07:10 +0000
@@ -312,19 +312,19 @@
 
 Syntactic Symbols
 
-* Function Symbols::
-* Class Symbols::
-* Conditional Construct Symbols::
-* Switch Statement Symbols::
-* Brace List Symbols::
-* External Scope Symbols::
-* Paren List Symbols::
-* Literal Symbols::
-* Multiline Macro Symbols::
-* Objective-C Method Symbols::
-* Anonymous Class Symbol::
-* Statement Block Symbols::
-* K&R Symbols::
+* Function Symbols::            
+* Class Symbols::               
+* Conditional Construct Symbols::  
+* Switch Statement Symbols::    
+* Brace List Symbols::          
+* External Scope Symbols::      
+* Paren List Symbols::          
+* Literal Symbols::             
+* Multiline Macro Symbols::     
+* Objective-C Method Symbols::  
+* Java Symbols::
+* Statement Block Symbols::     
+* K&R Symbols::                 
 
 Customizing Indentation
 
@@ -3971,6 +3971,9 @@
 Topmost definition continuation lines.  This is only used in the parts
 that aren't covered by other symbols such as @code{func-decl-cont} and
 @code{knr-argdecl}.  @ref{Function Symbols}.
address@hidden annotation-top-cont
+Topmost definition continuation lines where all previous items are
+annotations.  @ref{Java Symbols}.
 @item member-init-intro
 First line in a member initialization list.  @ref{Class Symbols}.
 @item member-init-cont
@@ -3999,6 +4002,9 @@
 A statement.  @ref{Function Symbols}.
 @item statement-cont
 A continuation of a statement.  @ref{Function Symbols}.
address@hidden annotation-var-cont
+A continuation of a statement where all previous items are
+annotations.  @ref{Java Symbols}.
 @item statement-block-intro
 The first line in a new statement block.  @ref{Conditional Construct
 Symbols}.
@@ -4112,23 +4118,23 @@
 @item inexpr-class
 A class definition inside an expression.  This is used for anonymous
 classes in Java.  It's also used for anonymous array initializers in
-Java.  @ref{Anonymous Class Symbol}.
+Java.  @ref{Java Symbols}.
 @end table
 
 @menu
-* Function Symbols::
-* Class Symbols::
-* Conditional Construct Symbols::
-* Switch Statement Symbols::
-* Brace List Symbols::
-* External Scope Symbols::
-* Paren List Symbols::
-* Literal Symbols::
-* Multiline Macro Symbols::
-* Objective-C Method Symbols::
-* Anonymous Class Symbol::
-* Statement Block Symbols::
-* K&R Symbols::
+* Function Symbols::            
+* Class Symbols::               
+* Conditional Construct Symbols::  
+* Switch Statement Symbols::    
+* Brace List Symbols::          
+* External Scope Symbols::      
+* Paren List Symbols::          
+* Literal Symbols::             
+* Multiline Macro Symbols::     
+* Objective-C Method Symbols::  
+* Java Symbols::
+* Statement Block Symbols::     
+* K&R Symbols::                 
 @end menu
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -4233,7 +4239,7 @@
 
 @noindent
 The primary syntactic symbol for this line is @code{access-label} as
-this a label keyword that specifies access protection in C++.  However,
+this is a label keyword that specifies access protection in C++.  However,
 because this line is also a top-level construct inside a class
 definition, the analysis actually shows two syntactic symbols.  The
 other syntactic symbol assigned to this line is @code{inclass}.
@@ -4740,7 +4746,7 @@
 @xref{Custom Macros}, for more info about the treatment of macros.
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
address@hidden    Objective-C Method Symbols, Anonymous Class Symbol, Multiline 
Macro Symbols, Syntactic Symbols
address@hidden    Objective-C Method Symbols, Java Symbols, Multiline Macro 
Symbols, Syntactic Symbols
 @comment node-name, next, previous, up
 @subsection Objective-C Method Symbols
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -4767,34 +4773,45 @@
 assigned @code{objc-method-call-cont} syntax.
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
address@hidden    Anonymous Class Symbol, Statement Block Symbols, Objective-C 
Method Symbols, Syntactic Symbols
address@hidden    Java Symbols, Statement Block Symbols, Objective-C Method 
Symbols, Syntactic Symbols
 @comment node-name, next, previous, up
address@hidden Anonymous Class Symbol (Java)
address@hidden Java Symbols
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 Java has a concept of anonymous classes which can look something like
 this:
 
 @example
- 1: public void watch(Observable o) @{
- 2:     o.addObserver(new Observer() @{
- 3:             public void update(Observable o, Object arg) @{
- 4:                 history.addElement(arg);
- 5:             @}
- 6:         @});
- 7: @}
+ 1:  @@Test
+ 2:  public void watch(Observable o) @{
+ 3:      @@NonNull
+ 4:      Observer obs = new Observer() @{
+ 5:          public void update(Observable o, Object arg) @{
+ 6:              history.addElement(arg);
+ 7:          @}
+ 8:      @};
+ 9:      o.addObserver(obs);
+ 10: @}
 @end example
 
 @ssindex inexpr-class
 The brace following the @code{new} operator opens the anonymous class.
-Lines 3 and 6 are assigned the @code{inexpr-class} syntax, besides the
+Lines 5 and 8 are assigned the @code{inexpr-class} syntax, besides the
 @code{inclass} symbol used in normal classes.  Thus, the class will be
 indented just like a normal class, with the added indentation given to
 @code{inexpr-class}.  An @code{inexpr-class} syntactic element doesn't
 have an anchor position.
 
address@hidden annotation-top-cont
address@hidden annotation-var-cont
+Line 2 is assigned the @code{annotation-top-cont} syntax, due to it being a
+continuation of a topmost introduction with an annotation symbol preceding
+the current line.  Similarly, line 4 is assigned the @code{annotation-var-cont}
+syntax due to it being a continuation of a variable declaration where preceding
+the declaration is an annotation.
+
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
address@hidden    Statement Block Symbols, K&R Symbols, Anonymous Class Symbol, 
Syntactic Symbols
address@hidden    Statement Block Symbols, K&R Symbols, Java Symbols, Syntactic 
Symbols
 @comment node-name, next, previous, up
 @subsection Statement Block Symbols
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]