update.
[chise/xemacs-chise.git-] / info / standards.info-2
index 4473101..8fd19bd 100644 (file)
@@ -1,12 +1,12 @@
-This is Info file ../info/standards.info, produced by Makeinfo version
-1.68 from the input file standards.texi.
+This is ../info/standards.info, produced by makeinfo version 4.0 from
+standards.texi.
 
 START-INFO-DIR-ENTRY
 * Standards: (standards).        GNU coding standards.
 END-INFO-DIR-ENTRY
 
-   GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free
-Software Foundation, Inc.
+   GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996,
+1997, 1998, 1999 Free Software Foundation, Inc.
 
    Permission is granted to make and distribute verbatim copies of this
 manual provided the copyright notice and this permission notice are
@@ -23,6 +23,271 @@ versions, except that this permission notice may be stated in a
 translation approved by the Free Software Foundation.
 
 \1f
+File: standards.info,  Node: Comments,  Next: Syntactic Conventions,  Prev: Formatting,  Up: Writing C
+
+Commenting Your Work
+====================
+
+   Every program should start with a comment saying briefly what it is
+for.  Example: `fmt - filter for simple filling of text'.
+
+   Please write the comments in a GNU program in English, because
+English is the one language that nearly all programmers in all
+countries can read.  If you do not write English well, please write
+comments in English as well as you can, then ask other people to help
+rewrite them.  If you can't write comments in English, please find
+someone to work with you and translate your comments into English.
+
+   Please put a comment on each function saying what the function does,
+what sorts of arguments it gets, and what the possible values of
+arguments mean and are used for.  It is not necessary to duplicate in
+words the meaning of the C argument declarations, if a C type is being
+used in its customary fashion.  If there is anything nonstandard about
+its use (such as an argument of type `char *' which is really the
+address of the second character of a string, not the first), or any
+possible values that would not work the way one would expect (such as,
+that strings containing newlines are not guaranteed to work), be sure
+to say so.
+
+   Also explain the significance of the return value, if there is one.
+
+   Please put two spaces after the end of a sentence in your comments,
+so that the Emacs sentence commands will work.  Also, please write
+complete sentences and capitalize the first word.  If a lower-case
+identifier comes at the beginning of a sentence, don't capitalize it!
+Changing the spelling makes it a different identifier.  If you don't
+like starting a sentence with a lower case letter, write the sentence
+differently (e.g., "The identifier lower-case is ...").
+
+   The comment on a function is much clearer if you use the argument
+names to speak about the argument values.  The variable name itself
+should be lower case, but write it in upper case when you are speaking
+about the value rather than the variable itself.  Thus, "the inode
+number NODE_NUM" rather than "an inode".
+
+   There is usually no purpose in restating the name of the function in
+the comment before it, because the reader can see that for himself.
+There might be an exception when the comment is so long that the
+function itself would be off the bottom of the screen.
+
+   There should be a comment on each static variable as well, like this:
+
+     /* Nonzero means truncate lines in the display;
+        zero means continue them.  */
+     int truncate_lines;
+
+   Every `#endif' should have a comment, except in the case of short
+conditionals (just a few lines) that are not nested.  The comment should
+state the condition of the conditional that is ending, _including its
+sense_.  `#else' should have a comment describing the condition _and
+sense_ of the code that follows.  For example:
+
+     #ifdef foo
+       ...
+     #else /* not foo */
+       ...
+     #endif /* not foo */
+     #ifdef foo
+       ...
+     #endif /* foo */
+
+but, by contrast, write the comments this way for a `#ifndef':
+
+     #ifndef foo
+       ...
+     #else /* foo */
+       ...
+     #endif /* foo */
+     #ifndef foo
+       ...
+     #endif /* not foo */
+
+\1f
+File: standards.info,  Node: Syntactic Conventions,  Next: Names,  Prev: Comments,  Up: Writing C
+
+Clean Use of C Constructs
+=========================
+
+   Please explicitly declare all arguments to functions.  Don't omit
+them just because they are `int's.
+
+   Declarations of external functions and functions to appear later in
+the source file should all go in one place near the beginning of the
+file (somewhere before the first function definition in the file), or
+else should go in a header file.  Don't put `extern' declarations inside
+functions.
+
+   It used to be common practice to use the same local variables (with
+names like `tem') over and over for different values within one
+function.  Instead of doing this, it is better declare a separate local
+variable for each distinct purpose, and give it a name which is
+meaningful.  This not only makes programs easier to understand, it also
+facilitates optimization by good compilers.  You can also move the
+declaration of each local variable into the smallest scope that includes
+all its uses.  This makes the program even cleaner.
+
+   Don't use local variables or parameters that shadow global
+identifiers.
+
+   Don't declare multiple variables in one declaration that spans lines.
+Start a new declaration on each line, instead.  For example, instead of
+this:
+
+     int    foo,
+            bar;
+
+write either this:
+
+     int foo, bar;
+
+or this:
+
+     int foo;
+     int bar;
+
+(If they are global variables, each should have a comment preceding it
+anyway.)
+
+   When you have an `if'-`else' statement nested in another `if'
+statement, always put braces around the `if'-`else'.  Thus, never write
+like this:
+
+     if (foo)
+       if (bar)
+         win ();
+       else
+         lose ();
+
+always like this:
+
+     if (foo)
+       {
+         if (bar)
+           win ();
+         else
+           lose ();
+       }
+
+   If you have an `if' statement nested inside of an `else' statement,
+either write `else if' on one line, like this,
+
+     if (foo)
+       ...
+     else if (bar)
+       ...
+
+with its `then'-part indented like the preceding `then'-part, or write
+the nested `if' within braces like this:
+
+     if (foo)
+       ...
+     else
+       {
+         if (bar)
+           ...
+       }
+
+   Don't declare both a structure tag and variables or typedefs in the
+same declaration.  Instead, declare the structure tag separately and
+then use it to declare the variables or typedefs.
+
+   Try to avoid assignments inside `if'-conditions.  For example, don't
+write this:
+
+     if ((foo = (char *) malloc (sizeof *foo)) == 0)
+       fatal ("virtual memory exhausted");
+
+instead, write this:
+
+     foo = (char *) malloc (sizeof *foo);
+     if (foo == 0)
+       fatal ("virtual memory exhausted");
+
+   Don't make the program ugly to placate `lint'.  Please don't insert
+any casts to `void'.  Zero without a cast is perfectly fine as a null
+pointer constant, except when calling a varargs function.
+
+\1f
+File: standards.info,  Node: Names,  Next: System Portability,  Prev: Syntactic Conventions,  Up: Writing C
+
+Naming Variables and Functions
+==============================
+
+   The names of global variables and functions in a program serve as
+comments of a sort.  So don't choose terse names--instead, look for
+names that give useful information about the meaning of the variable or
+function.  In a GNU program, names should be English, like other
+comments.
+
+   Local variable names can be shorter, because they are used only
+within one context, where (presumably) comments explain their purpose.
+
+   Try to limit your use of abbreviations in symbol names.  It is ok to
+make a few abbreviations, explain what they mean, and then use them
+frequently, but don't use lots of obscure abbreviations.
+
+   Please use underscores to separate words in a name, so that the Emacs
+word commands can be useful within them.  Stick to lower case; reserve
+upper case for macros and `enum' constants, and for name-prefixes that
+follow a uniform convention.
+
+   For example, you should use names like `ignore_space_change_flag';
+don't use names like `iCantReadThis'.
+
+   Variables that indicate whether command-line options have been
+specified should be named after the meaning of the option, not after
+the option-letter.  A comment should state both the exact meaning of
+the option and its letter.  For example,
+
+     /* Ignore changes in horizontal whitespace (-b).  */
+     int ignore_space_change_flag;
+
+   When you want to define names with constant integer values, use
+`enum' rather than `#define'.  GDB knows about enumeration constants.
+
+   Use file names of 14 characters or less, to avoid creating gratuitous
+problems on older System V systems.  You can use the program `doschk'
+to test for this.  `doschk' also tests for potential name conflicts if
+the files were loaded onto an MS-DOS file system--something you may or
+may not care about.
+
+\1f
+File: standards.info,  Node: System Portability,  Next: CPU Portability,  Prev: Names,  Up: Writing C
+
+Portability between System Types
+================================
+
+   In the Unix world, "portability" refers to porting to different Unix
+versions.  For a GNU program, this kind of portability is desirable, but
+not paramount.
+
+   The primary purpose of GNU software is to run on top of the GNU
+kernel, compiled with the GNU C compiler, on various types of CPU.  The
+amount and kinds of variation among GNU systems on different CPUs will
+be comparable to the variation among Linux-based GNU systems or among
+BSD systems today.  So the kinds of portability that are absolutely
+necessary are quite limited.
+
+   But many users do run GNU software on non-GNU Unix or Unix-like
+systems.  So supporting a variety of Unix-like systems is desirable,
+although not paramount.
+
+   The easiest way to achieve portability to most Unix-like systems is
+to use Autoconf.  It's unlikely that your program needs to know more
+information about the host platform than Autoconf can provide, simply
+because most of the programs that need such knowledge have already been
+written.
+
+   Avoid using the format of semi-internal data bases (e.g.,
+directories) when there is a higher-level alternative (`readdir').
+
+   As for systems that are not like Unix, such as MSDOS, Windows, the
+Macintosh, VMS, and MVS, supporting them is often a lot of work.  When
+that is the case, it is better to spend your time adding features that
+will be useful on GNU and GNU/Linux, rather than on supporting other
+incompatible systems.
+
+\1f
 File: standards.info,  Node: CPU Portability,  Next: System Functions,  Prev: System Portability,  Up: Writing C
 
 Portability between CPUs
@@ -58,22 +323,24 @@ that pass their arguments along to `printf' and friends:
 
      error (s, a1, a2, a3)
           char *s;
-          int a1, a2, a3;
+          char *a1, *a2, *a3;
      {
        fprintf (stderr, "error: ");
        fprintf (stderr, s, a1, a2, a3);
      }
 
-In practice, this works on all machines, and it is much simpler than any
-"correct" alternative.  Be sure *not* to use a prototype for such
+In practice, this works on all machines, since a pointer is generally
+the widest possible kind of argument, and it is much simpler than any
+"correct" alternative.  Be sure _not_ to use a prototype for such
 functions.
 
    However, avoid casting pointers to integers unless you really need
-to.  These assumptions really reduce portability, and in most programs
-they are easy to avoid.  In the cases where casting pointers to
-integers is essential--such as, a Lisp interpreter which stores type
-information as well as an address in one word--it is ok to do so, but
-you'll have to make explicit provisions to handle different word sizes.
+to.  Outside of special situations, such casts greatly reduce
+portability, and in most programs they are easy to avoid.  In the cases
+where casting pointers to integers is essential--such as, a Lisp
+interpreter which stores type information as well as an address in one
+word--it is ok to do it, but you'll have to make explicit provisions to
+handle different word sizes.
 
 \1f
 File: standards.info,  Node: System Functions,  Next: Internationalization,  Prev: CPU Portability,  Up: Writing C
@@ -90,6 +357,10 @@ functions to avoid unnecessary loss of portability.
    * Don't use the value of `sprintf'.  It returns the number of
      characters written on some systems, but not on all systems.
 
+   * `main' should be declared to return type `int'.  It should
+     terminate either by calling `exit' or by returning the integer
+     status code; make sure it cannot ever return an undefined value.
+
    * Don't declare system functions explicitly.
 
      Almost any declaration for a system function is wrong on some
@@ -184,7 +455,7 @@ defined in systems where the corresponding functions exist.  One way to
 get them properly defined is to use Autoconf.
 
 \1f
-File: standards.info,  Node: Internationalization,  Prev: System Functions,  Up: Writing C
+File: standards.info,  Node: Internationalization,  Next: Mmap,  Prev: System Functions,  Up: Writing C
 
 Internationalization
 ====================
@@ -212,35 +483,75 @@ translations for this package from the translations for other packages.
 Normally, the text domain name should be the same as the name of the
 package--for example, `fileutils' for the GNU file utilities.
 
-   To enable gettext to work, avoid writing code that makes assumptions
-about the structure of words.  Don't construct words from parts.  Here
-is an example of what not to do:
+   To enable gettext to work well, avoid writing code that makes
+assumptions about the structure of words or sentences.  When you want
+the precise text of a sentence to vary depending on the data, use two or
+more alternative string constants each containing a complete sentences,
+rather than inserting conditionalized words or phrases into a single
+sentence framework.
 
-     prinf ("%d file%s processed", nfiles,
-            nfiles > 1 ? "s" : "");
+   Here is an example of what not to do:
+
+     printf ("%d file%s processed", nfiles,
+             nfiles != 1 ? "s" : "");
 
 The problem with that example is that it assumes that plurals are made
 by adding `s'.  If you apply gettext to the format string, like this,
 
-     prinf (gettext ("%d file%s processed"), nfiles,
-            nfiles > 1 ? "s" : "");
+     printf (gettext ("%d file%s processed"), nfiles,
+             nfiles != 1 ? "s" : "");
 
 the message can use different words, but it will still be forced to use
 `s' for the plural.  Here is a better way:
 
-     prinf ((nfiles > 1 ? "%d files processed"
-             : "%d file processed"),
-            nfiles);
+     printf ((nfiles != 1 ? "%d files processed"
+              : "%d file processed"),
+             nfiles);
 
 This way, you can apply gettext to each of the two strings
 independently:
 
-     prinf ((nfiles > 1 ? gettext ("%d files processed")
-             : gettext ("%d file processed")),
-            nfiles);
+     printf ((nfiles != 1 ? gettext ("%d files processed")
+              : gettext ("%d file processed")),
+             nfiles);
+
+This can be any method of forming the plural of the word for "file", and
+also handles languages that require agreement in the word for
+"processed".
+
+   A similar problem appears at the level of sentence structure with
+this code:
+
+     printf ("#  Implicit rule search has%s been done.\n",
+             f->tried_implicit ? "" : " not");
+
+Adding `gettext' calls to this code cannot give correct results for all
+languages, because negation in some languages requires adding words at
+more than one place in the sentence.  By contrast, adding `gettext'
+calls does the job straightfowardly if the code starts out like this:
+
+     printf (f->tried_implicit
+             ? "#  Implicit rule search has been done.\n",
+             : "#  Implicit rule search has not been done.\n");
 
-This can handle any language, no matter how it forms the plural of the
-word for "file."
+\1f
+File: standards.info,  Node: Mmap,  Prev: Internationalization,  Up: Writing C
+
+Mmap
+====
+
+   Don't assume that `mmap' either works on all files or fails for all
+files.  It may work on some files and fail on others.
+
+   The proper way to use `mmap' is to try it on the specific file for
+which you want to use it--and if `mmap' doesn't work, fall back on
+doing the job in another way using `read' and `write'.
+
+   The reason this precaution is needed is that the GNU kernel (the
+HURD) provides a user-extensible file system, in which there can be many
+different kinds of "ordinary files."  Many of them support `mmap', but
+some do not.  It is important to make programs handle all these kinds
+of files.
 
 \1f
 File: standards.info,  Node: Documentation,  Next: Managing Releases,  Prev: Writing C,  Up: Top
@@ -252,8 +563,9 @@ Documenting Programs
 
 * GNU Manuals::                 Writing proper manuals.
 * Manual Structure Details::    Specific structure conventions.
+* License for Manuals::         Writing the distribution terms for a manual.
 * NEWS File::                   NEWS files supplement manuals.
-* Change Logs::                        Recording Changes
+* Change Logs::                 Recording Changes
 * Man Pages::                   Man pages are secondary.
 * Reading other Manuals::       How far you can go in learning
                                 from other manuals.
@@ -265,28 +577,60 @@ GNU Manuals
 ===========
 
    The preferred way to document part of the GNU system is to write a
-manual in the Texinfo formatting language.  See the Texinfo manual,
-either the hardcopy, or the on-line version available through `info' or
-the Emacs Info subsystem (`C-h i').
-
-   The manual should document all of the program's command-line options
-and all of its commands.  It should give examples of their use.  But
-don't organize the manual as a list of features.  Instead, organize it
-logically, by subtopics.  Address the goals that a user will have in
-mind, and explain how to accomplish them.
+manual in the Texinfo formatting language.  This makes it possible to
+produce a good quality formatted book, using TeX, and to generate an
+Info file.  It is also possible to generate HTML output from Texinfo
+source.  See the Texinfo manual, either the hardcopy, or the on-line
+version available through `info' or the Emacs Info subsystem (`C-h i').
+
+   Programmers often find it most natural to structure the documentation
+following the structure of the implementation, which they know.  But
+this structure is not necessarily good for explaining how to use the
+program; it may be irrelevant and confusing for a user.
+
+   At every level, from the sentences in a paragraph to the grouping of
+topics into separate manuals, the right way to structure documentation
+is according to the concepts and questions that a user will have in mind
+when reading it.  Sometimes this structure of ideas matches the
+structure of the implementation of the software being documented--but
+often they are different.  Often the most important part of learning to
+write good documentation is learning to notice when you are structuring
+the documentation like the implementation, and think about better
+alternatives.
+
+   For example, each program in the GNU system probably ought to be
+documented in one manual; but this does not mean each program should
+have its own manual.  That would be following the structure of the
+implementation, rather than the structure that helps the user
+understand.
+
+   Instead, each manual should cover a coherent _topic_.  For example,
+instead of a manual for `diff' and a manual for `diff3', we have one
+manual for "comparison of files" which covers both of those programs,
+as well as `cmp'.  By documenting these programs together, we can make
+the whole subject clearer.
+
+   The manual which discusses a program should document all of the
+program's command-line options and all of its commands.  It should give
+examples of their use.  But don't organize the manual as a list of
+features.  Instead, organize it logically, by subtopics.  Address the
+questions that a user will ask when thinking about the job that the
+program does.
 
    In general, a GNU manual should serve both as tutorial and reference.
 It should be set up for convenient access to each topic through Info,
 and for reading straight through (appendixes aside).  A GNU manual
 should give a good introduction to a beginner reading through from the
-start, and should also provide all the details that hackers want.
+start, and should also provide all the details that hackers want.  The
+Bison manual is a good example of this--please take a look at it to see
+what we mean.
 
    That is not as hard as it first sounds.  Arrange each chapter as a
 logical breakdown of its topic, but order the sections, and write their
 text, so that reading the chapter straight through makes sense.  Do
 likewise when structuring the book into chapters, and when structuring a
-section into paragraphs.  The watchword is, *at each point, address the
-most fundamental and important issue raised by the preceding text.*
+section into paragraphs.  The watchword is, _at each point, address the
+most fundamental and important issue raised by the preceding text._
 
    If necessary, add extra chapters at the beginning of the manual which
 are purely tutorial and cover the basics of the subject.  These provide
@@ -294,32 +638,40 @@ the framework for a beginner to understand the rest of the manual.  The
 Bison manual provides a good example of how to do this.
 
    Don't use Unix man pages as a model for how to write GNU
-documentation; they are a bad example to follow.
+documentation; most of them are terse, badly structured, and give
+inadequate explanation of the underlying concepts.  (There are, of
+course exceptions.)  Also Unix man pages use a particular format which
+is different from what we use in GNU manuals.
+
+   Please include an email address in the manual for where to report
+bugs _in the manual_.
 
    Please do not use the term "pathname" that is used in Unix
 documentation; use "file name" (two words) instead.  We use the term
-"path" only for search paths, which are lists of file names.
+"path" only for search paths, which are lists of directory names.
+
+   Please do not use the term "illegal" to refer to erroneous input to a
+computer program.  Please use "invalid" for this, and reserve the term
+"illegal" for violations of law.
 
 \1f
-File: standards.info,  Node: Manual Structure Details,  Next: NEWS File,  Prev: GNU Manuals,  Up: Documentation
+File: standards.info,  Node: Manual Structure Details,  Next: License for Manuals,  Prev: GNU Manuals,  Up: Documentation
 
 Manual Structure Details
 ========================
 
-   The title page of the manual should state the version of the program
-to which the manual applies.  The Top node of the manual should also
-contain this information.  If the manual is changing more frequently
-than or independent of the program, also state a version number for the
-manual in both of these places.
-
-   The manual should have a node named `PROGRAM Invocation' or
-`Invoking PROGRAM', where PROGRAM stands for the name of the program
-being described, as you would type it in the shell to run the program.
-This node (together with its subnodes, if any) should describe the
-program's command line arguments and how to run it (the sort of
-information people would look in a man page for).  Start with an
-`@example' containing a template for all the options and arguments that
-the program uses.
+   The title page of the manual should state the version of the
+programs or packages documented in the manual.  The Top node of the
+manual should also contain this information.  If the manual is changing
+more frequently than or independent of the program, also state a version
+number for the manual in both of these places.
+
+   Each program documented in the manual should have a node named
+`PROGRAM Invocation' or `Invoking PROGRAM'.  This node (together with
+its subnodes, if any) should describe the program's command line
+arguments and how to run it (the sort of information people would look
+in a man page for).  Start with an `@example' containing a template for
+all the options and arguments that the program uses.
 
    Alternatively, put a menu item in some menu whose item name fits one
 of the above patterns.  This identifies the node which that item points
@@ -332,7 +684,22 @@ quickly reading just this part of its manual.
 for each program described.
 
 \1f
-File: standards.info,  Node: NEWS File,  Next: Change Logs,  Prev: Manual Structure Details,  Up: Documentation
+File: standards.info,  Node: License for Manuals,  Next: NEWS File,  Prev: Manual Structure Details,  Up: Documentation
+
+License for Manuals
+===================
+
+   If the manual contains a copy of the GNU GPL or GNU LGPL, or if it
+contains chapters that make political or personal statements, please
+copy the distribution terms of the GNU Emacs Manual, and adapt it by
+modifying appropriately the list of special chapters that may not be
+modified or deleted.
+
+   If the manual does not contain any such chapters, then imitate the
+simpler distribution terms of the Texinfo manual.
+
+\1f
+File: standards.info,  Node: NEWS File,  Next: Change Logs,  Prev: License for Manuals,  Up: Documentation
 
 The NEWS File
 =============
@@ -358,17 +725,48 @@ Change Logs
 files.  The purpose of this is so that people investigating bugs in the
 future will know about the changes that might have introduced the bug.
 Often a new bug can be found by looking at what was recently changed.
-More importantly, change logs can help eliminate conceptual
-inconsistencies between different parts of a program; they can give you
-a history of how the conflicting concepts arose.
+More importantly, change logs can help you eliminate conceptual
+inconsistencies between different parts of a program, by giving you a
+history of how the conflicting concepts arose and who they came from.
+
+* Menu:
+
+* Change Log Concepts::
+* Style of Change Logs::
+* Simple Changes::
+* Conditional Changes::
+
+\1f
+File: standards.info,  Node: Change Log Concepts,  Next: Style of Change Logs,  Up: Change Logs
+
+Change Log Concepts
+-------------------
 
-   A change log file is normally called `ChangeLog' and covers an
+   You can think of the change log as a conceptual "undo list" which
+explains how earlier versions were different from the current version.
+People can see the current version; they don't need the change log to
+tell them what is in it.  What they want from a change log is a clear
+explanation of how the earlier version differed.
+
+   The change log file is normally called `ChangeLog' and covers an
 entire directory.  Each directory can have its own change log, or a
 directory can use the change log of its parent directory-it's up to you.
 
    Another alternative is to record change log information with a
 version control system such as RCS or CVS.  This can be converted
-automatically to a `ChangeLog' file.
+automatically to a `ChangeLog' file using `rcs2log'; in Emacs, the
+command `C-x v a' (`vc-update-change-log') does the job.
+
+   There's no need to describe the full purpose of the changes or how
+they work together.  If you think that a change calls for explanation,
+you're probably right.  Please do explain it--but please put the
+explanation in comments in the code, where people will see it whenever
+they see the code.  For example, "New function" is enough for the
+change log when you add a function, because there should be a comment
+before the function definition to explain what it does.
+
+   However, sometimes it is useful to write one line to describe the
+overall purpose of a batch of changes.
 
    The easiest way to add an entry to `ChangeLog' is with the Emacs
 command `M-x add-change-log-entry'.  An entry should have an asterisk,
@@ -376,12 +774,13 @@ the name of the changed file, and then in parentheses the name of the
 changed functions, variables or whatever, followed by a colon.  Then
 describe the changes you made to that function or variable.
 
-   Separate unrelated entries with blank lines.  When two entries
-represent parts of the same change, so that they work together, then
-don't put blank lines between them.  Then you can omit the file name
-and the asterisk when successive entries are in the same file.
+\1f
+File: standards.info,  Node: Style of Change Logs,  Next: Simple Changes,  Prev: Change Log Concepts,  Up: Change Logs
+
+Style of Change Logs
+--------------------
 
-   Here are some examples:
+   Here are some examples of change log entries:
 
      * register.el (insert-register): Return nil.
      (jump-to-register): Likewise.
@@ -398,43 +797,84 @@ and the asterisk when successive entries are in the same file.
 
    It's important to name the changed function or variable in full.
 Don't abbreviate function or variable names, and don't combine them.
-Subsequent maintainers will often search for a function name to find
-all the change log entries that pertain to it; if you abbreviate the
-name, they won't find it when they search.  For example, some people
-are tempted to abbreviate groups of function names by writing `*
-register.el ({insert,jump-to}-register)'; this is not a good idea,
-since searching for `jump-to-register' or `insert-register' would not
-find the entry.
+Subsequent maintainers will often search for a function name to find all
+the change log entries that pertain to it; if you abbreviate the name,
+they won't find it when they search.
 
-   There's no need to describe the full purpose of the changes or how
-they work together.  It is better to put such explanations in comments
-in the code.  That's why just "New function" is enough; there is a
-comment with the function in the source to explain what it does.
+   For example, some people are tempted to abbreviate groups of function
+names by writing `* register.el ({insert,jump-to}-register)'; this is
+not a good idea, since searching for `jump-to-register' or
+`insert-register' would not find that entry.
 
-   However, sometimes it is useful to write one line to describe the
-overall purpose of a large batch of changes.
+   Separate unrelated change log entries with blank lines.  When two
+entries represent parts of the same change, so that they work together,
+then don't put blank lines between them.  Then you can omit the file
+name and the asterisk when successive entries are in the same file.
 
-   You can think of the change log as a conceptual "undo list" which
-explains how earlier versions were different from the current version.
-People can see the current version; they don't need the change log to
-tell them what is in it.  What they want from a change log is a clear
-explanation of how the earlier version differed.
+\1f
+File: standards.info,  Node: Simple Changes,  Next: Conditional Changes,  Prev: Style of Change Logs,  Up: Change Logs
+
+Simple Changes
+--------------
+
+   Certain simple kinds of changes don't need much detail in the change
+log.
 
    When you change the calling sequence of a function in a simple
 fashion, and you change all the callers of the function, there is no
-need to make individual entries for all the callers.  Just write in the
-entry for the function being called, "All callers changed."
+need to make individual entries for all the callers that you changed.
+Just write in the entry for the function being called, "All callers
+changed."
+
+     * keyboard.c (Fcommand_execute): New arg SPECIAL.
+     All callers changed.
 
    When you change just comments or doc strings, it is enough to write
-an entry for the file, without mentioning the functions.  Write just,
-"Doc fix."
+an entry for the file, without mentioning the functions.  Just "Doc
+fixes" is enough for the change log.
 
    There's no need to make change log entries for documentation files.
 This is because documentation is not susceptible to bugs that are hard
 to fix.  Documentation does not consist of parts that must interact in a
 precisely engineered fashion.  To correct an error, you need not know
-the history of the erroneous passage; it is enough to compare the
-passage with the way the program actually works.
+the history of the erroneous passage; it is enough to compare what the
+documentation says with the way the program actually works.
+
+\1f
+File: standards.info,  Node: Conditional Changes,  Prev: Simple Changes,  Up: Change Logs
+
+Conditional Changes
+-------------------
+
+   C programs often contain compile-time `#if' conditionals.  Many
+changes are conditional; sometimes you add a new definition which is
+entirely contained in a conditional.  It is very useful to indicate in
+the change log the conditions for which the change applies.
+
+   Our convention for indicating conditional changes is to use square
+brackets around the name of the condition.
+
+   Here is a simple example, describing a change which is conditional
+but does not have a function or entity name associated with it:
+
+     * xterm.c [SOLARIS2]: Include string.h.
+
+   Here is an entry describing a new definition which is entirely
+conditional.  This new definition for the macro `FRAME_WINDOW_P' is
+used only when `HAVE_X_WINDOWS' is defined:
+
+     * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined.
+
+   Here is an entry for a change within the function `init_display',
+whose definition as a whole is unconditional, but the changes themselves
+are contained in a `#ifdef HAVE_LIBNCURSES' conditional:
+
+     * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent.
+
+   Here is an entry for a change that takes affect only when a certain
+macro is _not_ defined:
+
+     (gethostname) [!HAVE_SOCKETS]: Replace with winsock version.
 
 \1f
 File: standards.info,  Node: Man Pages,  Next: Reading other Manuals,  Prev: Change Logs,  Up: Documentation
@@ -489,7 +929,7 @@ documentation.  Copying from free documentation may be ok; please check
 with the FSF about the individual case.
 
 \1f
-File: standards.info,  Node: Managing Releases,  Prev: Documentation,  Up: Top
+File: standards.info,  Node: Managing Releases,  Next: References,  Prev: Documentation,  Up: Top
 
 The Release Process
 *******************
@@ -504,9 +944,9 @@ GNU software.
 
 * Menu:
 
-* Configuration::              How Configuration Should Work
+* Configuration::               How Configuration Should Work
 * Makefile Conventions::       Makefile Conventions
-* Releases::                   Making Releases
+* Releases::                    Making Releases
 
 \1f
 File: standards.info,  Node: Configuration,  Next: Makefile Conventions,  Up: Managing Releases
@@ -523,12 +963,12 @@ they affect compilation.
 
    One way to do this is to make a link from a standard name such as
 `config.h' to the proper configuration file for the chosen system.  If
-you use this technique, the distribution should *not* contain a file
+you use this technique, the distribution should _not_ contain a file
 named `config.h'.  This is so that people won't be able to build the
 program without configuring it first.
 
    Another thing that `configure' can do is to edit the Makefile.  If
-you do this, the distribution should *not* contain a file named
+you do this, the distribution should _not_ contain a file named
 `Makefile'.  Instead, it should include a file `Makefile.in' which
 contains the input used for editing.  Once again, this is so that people
 won't be able to build the program without configuring it first.
@@ -604,8 +1044,8 @@ parts of the package:
      The package PACKAGE will be installed, so configure this package
      to work with PACKAGE.
 
-     Possible values of PACKAGE include `x', `x-toolkit', `gnu-as' (or
-     `gas'), `gnu-ld', `gnu-libc', and `gdb'.
+     Possible values of PACKAGE include `gnu-as' (or `gas'), `gnu-ld',
+     `gnu-libc', `gdb', `x', and `x-toolkit'.
 
      Do not use a `--with' option to specify the file name to use to
      find certain files.  That is outside the scope of what `--with'
@@ -668,7 +1108,8 @@ Makefile Conventions
 ====================
 
    This node describes conventions for writing the Makefiles for GNU
-programs.
+programs.  Using Automake will help you write a Makefile that follows
+these conventions.
 
 * Menu:
 
@@ -677,6 +1118,8 @@ programs.
 * Command Variables::          Variables for Specifying Commands
 * Directory Variables::                Variables for Installation Directories
 * Standard Targets::           Standard Targets for Users
+* Install Command Categories::  Three categories of commands in the `install'
+                                  rule: normal, pre-install and post-install.
 
 \1f
 File: standards.info,  Node: Makefile Basics,  Next: Utilities in Makefiles,  Up: Makefile Conventions
@@ -710,14 +1153,16 @@ part of the make or `$(srcdir)/' if the file is an unchanging part of
 the source code.  Without one of these prefixes, the current search
 path is used.
 
-   The distinction between `./' and `$(srcdir)/' is important when
-using the `--srcdir' option to `configure'.  A rule of the form:
+   The distinction between `./' (the "build directory") and
+`$(srcdir)/' (the "source directory") is important because users can
+build in a separate directory using the `--srcdir' option to
+`configure'.  A rule of the form:
 
      foo.1 : foo.man sedscript
              sed -e sedscript foo.man > foo.1
 
-will fail when the current directory is not the source directory,
-because `foo.man' and `sedscript' are not in the current directory.
+will fail when the build directory is not the source directory, because
+`foo.man' and `sedscript' are in the the source directory.
 
    When using GNU `make', relying on `VPATH' to find the source file
 will work in the case where there is a single dependency file, since
@@ -741,349 +1186,18 @@ is best written as:
      foo.1 : foo.man sedscript
              sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@
 
-   Try to make the build and installation targets, at least (and all
-their subtargets) work correctly with a parallel `make'.
-
-\1f
-File: standards.info,  Node: Utilities in Makefiles,  Next: Command Variables,  Prev: Makefile Basics,  Up: Makefile Conventions
-
-Utilities in Makefiles
-----------------------
-
-   Write the Makefile commands (and any shell scripts, such as
-`configure') to run in `sh', not in `csh'.  Don't use any special
-features of `ksh' or `bash'.
-
-   The `configure' script and the Makefile rules for building and
-installation should not use any utilities directly except these:
+   GNU distributions usually contain some files which are not source
+files--for example, Info files, and the output from Autoconf, Automake,
+Bison or Flex.  Since these files normally appear in the source
+directory, they should always appear in the source directory, not in the
+build directory.  So Makefile rules to update them should put the
+updated files in the source directory.
 
-     cat cmp cp echo egrep expr false grep
-     ln mkdir mv pwd rm rmdir sed test touch true
+   However, if a file does not appear in the distribution, then the
+Makefile should not put it in the source directory, because building a
+program in ordinary circumstances should not modify the source directory
+in any way.
 
-   Stick to the generally supported options for these programs.  For
-example, don't use `mkdir -p', convenient as it may be, because most
-systems don't support it.
-
-   It is a good idea to avoid creating symbolic links in makefiles,
-since a few systems don't support them.
-
-   The Makefile rules for building and installation can also use
-compilers and related programs, but should do so via `make' variables
-so that the user can substitute alternatives.  Here are some of the
-programs we mean:
-
-     ar bison cc flex install ld lex
-     make makeinfo ranlib texi2dvi yacc
-
-   Use the following `make' variables:
-
-     $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX)
-     $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
-
-   When you use `ranlib', you should make sure nothing bad happens if
-the system does not have `ranlib'.  Arrange to ignore an error from
-that command, and print a message before the command to tell the user
-that failure of the `ranlib' command does not mean a problem.  (The
-Autoconf `AC_PROG_RANLIB' macro can help with this.)
-
-   If you use symbolic links, you should implement a fallback for
-systems that don't have symbolic links.
-
-   It is ok to use other utilities in Makefile portions (or scripts)
-intended only for particular systems where you know those utilities
-exist.
-
-\1f
-File: standards.info,  Node: Command Variables,  Next: Directory Variables,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
-
-Variables for Specifying Commands
----------------------------------
-
-   Makefiles should provide variables for overriding certain commands,
-options, and so on.
-
-   In particular, you should run most utility programs via variables.
-Thus, if you use Bison, have a variable named `BISON' whose default
-value is set with `BISON = bison', and refer to it with `$(BISON)'
-whenever you need to use Bison.
-
-   File management utilities such as `ln', `rm', `mv', and so on, need
-not be referred to through variables in this way, since users don't
-need to replace them with other programs.
-
-   Each program-name variable should come with an options variable that
-is used to supply options to the program.  Append `FLAGS' to the
-program-name variable name to get the options variable name--for
-example, `BISONFLAGS'.  (The name `CFLAGS' is an exception to this
-rule, but we keep it because it is standard.)  Use `CPPFLAGS' in any
-compilation command that runs the preprocessor, and use `LDFLAGS' in
-any compilation command that does linking as well as in any direct use
-of `ld'.
-
-   If there are C compiler options that *must* be used for proper
-compilation of certain files, do not include them in `CFLAGS'.  Users
-expect to be able to specify `CFLAGS' freely themselves.  Instead,
-arrange to pass the necessary options to the C compiler independently
-of `CFLAGS', by writing them explicitly in the compilation commands or
-by defining an implicit rule, like this:
-
-     CFLAGS = -g
-     ALL_CFLAGS = -I. $(CFLAGS)
-     .c.o:
-             $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
-
-   Do include the `-g' option in `CFLAGS', because that is not
-*required* for proper compilation.  You can consider it a default that
-is only recommended.  If the package is set up so that it is compiled
-with GCC by default, then you might as well include `-O' in the default
-value of `CFLAGS' as well.
-
-   Put `CFLAGS' last in the compilation command, after other variables
-containing compiler options, so the user can use `CFLAGS' to override
-the others.
-
-   Every Makefile should define the variable `INSTALL', which is the
-basic command for installing a file into the system.
-
-   Every Makefile should also define the variables `INSTALL_PROGRAM'
-and `INSTALL_DATA'.  (The default for each of these should be
-`$(INSTALL)'.)  Then it should use those variables as the commands for
-actual installation, for executables and nonexecutables respectively.
-Use these variables as follows:
-
-     $(INSTALL_PROGRAM) foo $(bindir)/foo
-     $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
-
-Always use a file name, not a directory name, as the second argument of
-the installation commands.  Use a separate command for each file to be
-installed.
-
-\1f
-File: standards.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: Command Variables,  Up: Makefile Conventions
-
-Variables for Installation Directories
---------------------------------------
-
-   Installation directories should always be named by variables, so it
-is easy to install in a nonstandard place.  The standard names for these
-variables are described below.  They are based on a standard filesystem
-layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
-other modern operating systems.
-
-   These two variables set the root for the installation.  All the other
-installation directories should be subdirectories of one of these two,
-and nothing should be directly installed into these two directories.
-
-`prefix'
-     A prefix used in constructing the default values of the variables
-     listed below.  The default value of `prefix' should be
-     `/usr/local'.  When building the complete GNU system, the prefix
-     will be empty and `/usr' will be a symbolic link to `/'.  (If you
-     are using Autoconf, write it as `@prefix@'.)
-
-`exec_prefix'
-     A prefix used in constructing the default values of some of the
-     variables listed below.  The default value of `exec_prefix' should
-     be `$(prefix)'.  (If you are using Autoconf, write it as
-     `@exec_prefix@'.)
-
-     Generally, `$(exec_prefix)' is used for directories that contain
-     machine-specific files (such as executables and subroutine
-     libraries), while `$(prefix)' is used directly for other
-     directories.
-
-   Executable programs are installed in one of the following
-directories.
-
-`bindir'
-     The directory for installing executable programs that users can
-     run.  This should normally be `/usr/local/bin', but write it as
-     `$(exec_prefix)/bin'.  (If you are using Autoconf, write it as
-     `@bindir@'.)
-
-`sbindir'
-     The directory for installing executable programs that can be run
-     from the shell, but are only generally useful to system
-     administrators.  This should normally be `/usr/local/sbin', but
-     write it as `$(exec_prefix)/sbin'.  (If you are using Autoconf,
-     write it as `@sbindir@'.)
-
-`libexecdir'
-     The directory for installing executable programs to be run by other
-     programs rather than by users.  This directory should normally be
-     `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'.
-     (If you are using Autoconf, write it as `@libexecdir@'.)
-
-   Data files used by the program during its execution are divided into
-categories in two ways.
-
-   * Some files are normally modified by programs; others are never
-     normally modified (though users may edit some of these).
-
-   * Some files are architecture-independent and can be shared by all
-     machines at a site; some are architecture-dependent and can be
-     shared only by machines of the same kind and operating system;
-     others may never be shared between two machines.
-
-   This makes for six different possibilities.  However, we want to
-discourage the use of architecture-dependent files, aside from object
-files and libraries.  It is much cleaner to make other data files
-architecture-independent, and it is generally not hard.
-
-   Therefore, here are the variables Makefiles should use to specify
-directories:
-
-`datadir'
-     The directory for installing read-only architecture independent
-     data files.  This should normally be `/usr/local/share', but write
-     it as `$(prefix)/share'.  (If you are using Autoconf, write it as
-     `@datadir@'.)  As a special exception, see `$(infodir)' and
-     `$(includedir)' below.
-
-`sysconfdir'
-     The directory for installing read-only data files that pertain to a
-     single machine-that is to say, files for configuring a host.
-     Mailer and network configuration files, `/etc/passwd', and so
-     forth belong here.  All the files in this directory should be
-     ordinary ASCII text files.  This directory should normally be
-     `/usr/local/etc', but write it as `$(prefix)/etc'.  (If you are
-     using Autoconf, write it as `@sysconfdir@'.)
-
-     Do not install executables in this directory (they probably belong
-     in `$(libexecdir)' or `$(sbindir)').  Also do not install files
-     that are modified in the normal course of their use (programs
-     whose purpose is to change the configuration of the system
-     excluded).  Those probably belong in `$(localstatedir)'.
-
-`sharedstatedir'
-     The directory for installing architecture-independent data files
-     which the programs modify while they run.  This should normally be
-     `/usr/local/com', but write it as `$(prefix)/com'.  (If you are
-     using Autoconf, write it as `@sharedstatedir@'.)
-
-`localstatedir'
-     The directory for installing data files which the programs modify
-     while they run, and that pertain to one specific machine.  Users
-     should never need to modify files in this directory to configure
-     the package's operation; put such configuration information in
-     separate files that go in `$(datadir)' or `$(sysconfdir)'.
-     `$(localstatedir)' should normally be `/usr/local/var', but write
-     it as `$(prefix)/var'.  (If you are using Autoconf, write it as
-     `@localstatedir@'.)
-
-`libdir'
-     The directory for object files and libraries of object code.  Do
-     not install executables here, they probably ought to go in
-     `$(libexecdir)' instead.  The value of `libdir' should normally be
-     `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
-     are using Autoconf, write it as `@libdir@'.)
-
-`infodir'
-     The directory for installing the Info files for this package.  By
-     default, it should be `/usr/local/info', but it should be written
-     as `$(prefix)/info'.  (If you are using Autoconf, write it as
-     `@infodir@'.)
-
-`includedir'
-     The directory for installing header files to be included by user
-     programs with the C `#include' preprocessor directive.  This
-     should normally be `/usr/local/include', but write it as
-     `$(prefix)/include'.  (If you are using Autoconf, write it as
-     `@includedir@'.)
-
-     Most compilers other than GCC do not look for header files in
-     `/usr/local/include'.  So installing the header files this way is
-     only useful with GCC.  Sometimes this is not a problem because some
-     libraries are only really intended to work with GCC.  But some
-     libraries are intended to work with other compilers.  They should
-     install their header files in two places, one specified by
-     `includedir' and one specified by `oldincludedir'.
-
-`oldincludedir'
-     The directory for installing `#include' header files for use with
-     compilers other than GCC.  This should normally be `/usr/include'.
-     (If you are using Autoconf, you can write it as `@oldincludedir@'.)
-
-     The Makefile commands should check whether the value of
-     `oldincludedir' is empty.  If it is, they should not try to use
-     it; they should cancel the second installation of the header files.
-
-     A package should not replace an existing header in this directory
-     unless the header came from the same package.  Thus, if your Foo
-     package provides a header file `foo.h', then it should install the
-     header file in the `oldincludedir' directory if either (1) there
-     is no `foo.h' there or (2) the `foo.h' that exists came from the
-     Foo package.
-
-     To tell whether `foo.h' came from the Foo package, put a magic
-     string in the file--part of a comment--and `grep' for that string.
-
-   Unix-style man pages are installed in one of the following:
-
-`mandir'
-     The top-level directory for installing the man pages (if any) for
-     this package.  It will normally be `/usr/local/man', but you should
-     write it as `$(prefix)/man'.  (If you are using Autoconf, write it
-     as `@mandir@'.)
-
-`man1dir'
-     The directory for installing section 1 man pages.  Write it as
-     `$(mandir)/man1'.
-
-`man2dir'
-     The directory for installing section 2 man pages.  Write it as
-     `$(mandir)/man2'
-
-`...'
-     *Don't make the primary documentation for any GNU software be a
-     man page.  Write a manual in Texinfo instead.  Man pages are just
-     for the sake of people running GNU software on Unix, which is a
-     secondary application only.*
-
-`manext'
-     The file name extension for the installed man page.  This should
-     contain a period followed by the appropriate digit; it should
-     normally be `.1'.
-
-`man1ext'
-     The file name extension for installed section 1 man pages.
-
-`man2ext'
-     The file name extension for installed section 2 man pages.
-
-`...'
-     Use these names instead of `manext' if the package needs to
-     install man pages in more than one section of the manual.
-
-   And finally, you should set the following variable:
-
-`srcdir'
-     The directory for the sources being compiled.  The value of this
-     variable is normally inserted by the `configure' shell script.
-     (If you are using Autconf, use `srcdir = @srcdir@'.)
-
-   For example:
-
-     # Common prefix for installation directories.
-     # NOTE: This directory must exist when you start the install.
-     prefix = /usr/local
-     exec_prefix = $(prefix)
-     # Where to put the executable for the command `gcc'.
-     bindir = $(exec_prefix)/bin
-     # Where to put the directories used by the compiler.
-     libexecdir = $(exec_prefix)/libexec
-     # Where to put the Info files.
-     infodir = $(prefix)/info
-
-   If your program installs a large number of files into one of the
-standard user-specified directories, it might be useful to group them
-into a subdirectory particular to that program.  If you do this, you
-should write the `install' rule to create these subdirectories.
-
-   Do not expect the user to include the subdirectory name in the value
-of any of the variables listed above.  The idea of having a uniform set
-of variable names for installation directories is to enable the user to
-specify the exact same values for several different GNU packages.  In
-order for this to be useful, all the packages must be designed so that
-they will work sensibly when the user does so.
+   Try to make the build and installation targets, at least (and all
+their subtargets) work correctly with a parallel `make'.