]> code.delx.au - gnu-emacs/blobdiff - lispref/tips.texi
Various changes in addition to:
[gnu-emacs] / lispref / tips.texi
index ec53dc420dd094cda3d0580679cbe3c6218ac243..a85147f1d8fd2b8a1bdcd28922fc08c2ca14b915 100644 (file)
@@ -251,10 +251,10 @@ replacements differs from that of the originals.
 
 @item
 Avoid using macros that define functions and variables with names that
-are constructed.  It is best for maintenance wen the name of the
+are constructed.  It is best for maintenance when the name of the
 function or variable being defined is given explicitly in the source
 code, as the second element of the list---as it is when you use
-@code{defun}, @code{defalias}, @code{defvar} and @code{defopt}.
+@code{defun}, @code{defalias}, @code{defvar} and @code{defcustom}.
 
 @item
 Please keep the names of your Emacs Lisp source files to 13 characters
@@ -538,7 +538,7 @@ important arguments.
 
 @item
 For consistency, phrase the verb in the first sentence of a function's
-documentation string as an imperative--for instance, use ``Return the
+documentation string as an imperative---for instance, use ``Return the
 cons of A and B.'' in preference to ``Returns the cons of A and B@.''
 Usually it looks good to do likewise for the rest of the first
 paragraph.  Subsequent paragraphs usually look better if each sentence
@@ -707,8 +707,9 @@ documentation will be shown, even if the symbol is also defined as a
 variable or as a function.
 
 To make a hyperlink to Info documentation, write the name of the Info
-node in single quotes, preceded by @samp{info node} or @samp{Info
-node}.  The Info file name defaults to @samp{emacs}.  For example,
+node (or anchor) in single quotes, preceded by @samp{info node},
+@samp{Info node}, @samp{info anchor} or @samp{Info anchor}.  The Info
+file name defaults to @samp{emacs}.  For example,
 
 @smallexample
 See Info node `Font Lock' and Info node `(elisp)Font Lock Basics'.
@@ -801,19 +802,30 @@ Comments that start with three semicolons, @samp{;;;}, should start at
 the left margin.  These are used, occasionally, for comments within
 functions that should start at the margin.  We also use them sometimes
 for comments that are between functions---whether to use two or three
-semicolons there is a matter of style.
+semicolons depends on whether the comment should be considered a
+``heading'' by Outline minor mode.  By default, comments starting with
+at least three semicolons (followed by a single space and a
+non-whitespace character) are considered headings, comments starting
+with two or less are not.
 
 Another use for triple-semicolon comments is for commenting out lines
 within a function.  We use three semicolons for this precisely so that
-they remain at the left margin.
+they remain at the left margin.  By default, Outline minor mode does
+not consider a comment to be a heading (even if it starts with at
+least three semicolons) if the semicolons are followed by at least two
+spaces.  Thus, if you add an introductory comment to the commented out
+code, make sure to indent it by at least two spaces after the three
+semicolons.
 
 @smallexample
 (defun foo (a)
-;;; This is no longer necessary.
+;;;  This is no longer necessary.
 ;;;  (force-mode-line-update)
   (message "Finished with %s" a))
 @end smallexample
 
+When commenting out entire functions, use two semicolons.
+
 @item ;;;;
 Comments that start with four semicolons, @samp{;;;;}, should be aligned
 to the left margin and are used for headings of major sections of a