Simplify index entries; fix #1712.
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index e37618a..02ce783 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -76,7 +76,10 @@
 The :keyword:`if` statement
 ===========================
 
-.. index:: statement: if
+.. index::
+   statement: if
+   keyword: elif
+   keyword: else
 
 The :keyword:`if` statement is used for conditional execution:
 
@@ -85,10 +88,6 @@
           : ( "elif" `expression` ":" `suite` )*
           : ["else" ":" `suite`]
 
-.. index::
-   keyword: elif
-   keyword: else
-
 It selects exactly one of the suites by evaluating the expressions one by one
 until one is found to be true (see section :ref:`booleans` for the definition of
 true and false); then that suite is executed (and no other part of the
@@ -104,6 +103,7 @@
 .. index::
    statement: while
    pair: loop; statement
+   keyword: else
 
 The :keyword:`while` statement is used for repeated execution as long as an
 expression is true:
@@ -112,8 +112,6 @@
    while_stmt: "while" `expression` ":" `suite`
              : ["else" ":" `suite`]
 
-.. index:: keyword: else
-
 This repeatedly tests the expression and, if it is true, executes the first
 suite; if the expression is false (which may be the first time it is tested) the
 suite of the :keyword:`else` clause, if present, is executed and the loop
@@ -137,8 +135,10 @@
 .. index::
    statement: for
    pair: loop; statement
-
-.. index:: object: sequence
+   keyword: in
+   keyword: else
+   pair: target; list
+   object: sequence
 
 The :keyword:`for` statement is used to iterate over the elements of a sequence
 (such as a string, tuple or list) or other iterable object:
@@ -147,11 +147,6 @@
    for_stmt: "for" `target_list` "in" `expression_list` ":" `suite`
            : ["else" ":" `suite`]
 
-.. index::
-   keyword: in
-   keyword: else
-   pair: target; list
-
 The expression list is evaluated once; it should yield an iterable object.  An
 iterator is created for the result of the ``expression_list``.  The suite is
 then executed once for each item provided by the iterator, in the order of
@@ -214,7 +209,10 @@
 The :keyword:`try` statement
 ============================
 
-.. index:: statement: try
+.. index::
+   statement: try
+   keyword: except
+   keyword: finally
 
 The :keyword:`try` statement specifies exception handlers and/or cleanup code
 for a group of statements:
@@ -233,8 +231,6 @@
    :keyword:`finally` did not work. :keyword:`try`...\ :keyword:`except` had to be
    nested in :keyword:`try`...\ :keyword:`finally`.
 
-.. index:: keyword: except
-
 The :keyword:`except` clause(s) specify one or more exception handlers. When no
 exception occurs in the :keyword:`try` clause, no exception handler is executed.
 When an exception occurs in the :keyword:`try` suite, a search for an exception
@@ -376,12 +372,8 @@
 .. note::
 
    In Python 2.5, the :keyword:`with` statement is only allowed when the
-   ``with_statement`` feature has been enabled.  It will always be enabled in
-   Python 2.6.  This ``__future__`` import statement can be used to enable the
-   feature::
-
-      from __future__ import with_statement
-
+   ``with_statement`` feature has been enabled.  It is always enabled in
+   Python 2.6.
 
 .. seealso::
 
@@ -397,10 +389,10 @@
 ====================
 
 .. index::
-   pair: function; definition
    statement: def
-
-.. index::
+   pair: function; definition
+   pair: function; name
+   pair: name; binding
    object: user-defined function
    object: function
 
@@ -421,10 +413,6 @@
    parameter: `identifier` | "(" `sublist` ")"
    funcname: `identifier`
 
-.. index::
-   pair: function; name
-   pair: name; binding
-
 A function definition is an executable statement.  Its execution binds the
 function name in the current local namespace to a function object (a wrapper
 around the executable code for the function).  This function object contains a
@@ -505,10 +493,13 @@
 =================
 
 .. index::
-   pair: class; definition
+   object: class
    statement: class
-
-.. index:: object: class
+   pair: class; definition
+   pair: class; name
+   pair: name; binding
+   pair: execution; frame
+   single: inheritance
 
 A class definition defines a class object (see section :ref:`types`):
 
@@ -517,12 +508,6 @@
    inheritance: "(" [`expression_list`] ")"
    classname: `identifier`
 
-.. index::
-   single: inheritance
-   pair: class; name
-   pair: name; binding
-   pair: execution; frame
-
 A class definition is an executable statement.  It first evaluates the
 inheritance list, if present.  Each item in the inheritance list should evaluate
 to a class object or class type which allows subclassing.  The class's suite is
@@ -535,13 +520,13 @@
 to this class object in the original local namespace.
 
 **Programmer's note:** Variables defined in the class definition are class
-variables; they are shared by all instances.  To define instance variables, they
-must be given a value in the :meth:`__init__` method or in another method.  Both
-class and instance variables are accessible through the notation
-"``self.name``", and an instance variable hides a class variable with the same
-name when accessed in this way.  Class variables with immutable values can be
-used as defaults for instance variables. For :term:`new-style class`\es,
-descriptors can be used to create instance variables with different
+variables; they are shared by all instances.  To create instance variables, they
+can be set in a method with ``self.name = value``.  Both class and instance
+variables are accessible through the notation "``self.name``", and an instance
+variable hides a class variable with the same name when accessed in this way.
+Class variables can be used as defaults for instance variables, but using
+mutable values there can lead to unexpected results.  For :term:`new-style
+class`\es, descriptors can be used to create instance variables with different
 implementation details.
 
 .. rubric:: Footnotes
@@ -552,4 +537,3 @@
 .. [#] Currently, control "flows off the end" except in the case of an exception or the
    execution of a :keyword:`return`, :keyword:`continue`, or :keyword:`break`
    statement.
-