Add arch taglines
[bpt/emacs.git] / man / programs.texi
index df649b9..e377556 100644 (file)
@@ -181,6 +181,10 @@ delimiter from starting a defun.  Here's an example:
 ")
 @end example
 
+  To help you catch violations of this convention, Font Lock mode
+highlights confusing opening delimiters (those that ought to be
+quoted) in bold red.
+
   In the earliest days, the original Emacs found defuns by moving
 upward a level of parentheses or braces until there were no more
 levels to go up.  This always required scanning all the way back to
@@ -254,7 +258,7 @@ bindings for that purpose.
 @cindex buffer definitions index
 @cindex tags
 
-  The Imenu facility offers a way to find the the major definitions in
+  The Imenu facility offers a way to find the major definitions in
 a file by name.  It is also useful in text formatter major modes,
 where it treats each chapter, section, etc., as a definition.
 (@xref{Tags}, for a more powerful feature that handles multiple files
@@ -281,8 +285,8 @@ buffer.
   When you change the contents of a buffer, if you add or delete
 definitions, you can update the buffer's index based on the
 new contents by invoking the @samp{*Rescan*} item in the menu.
-Rescanning happens automatically you set @code{imenu-auto-rescan} to a
-non-@code{nil} value.  There is no need to rescan because of small
+Rescanning happens automatically if you set @code{imenu-auto-rescan} to
+non-@code{nil} value.  There is no need to rescan because of small
 changes in the text.
 
 @vindex imenu-sort-function
@@ -303,6 +307,7 @@ The Speedbar can also use it (@pxref{Speedbar}).
 
 @node Which Function
 @subsection Which Function Mode
+@cindex current function name in mode line
 
   Which Function mode is a minor mode that displays the current
 function name in the mode line, updating it as you move around in a
@@ -474,55 +479,17 @@ the containing list.
 
 @vindex lisp-body-indent
   Certain functions override the standard pattern.  Functions whose
-names start with @code{def} treat the the second lines as the start of
+names start with @code{def} treat the second lines as the start of
 a @dfn{body}, by indenting the second line @code{lisp-body-indent}
 additional columns beyond the open-parenthesis that starts the
 expression.
 
+@cindex @code{lisp-indent-function} property
   You can override the standard pattern in various ways for individual
-functions, according to the @code{lisp-indent-function} property of the
-function name.  There are four possibilities for this property:
-
-@table @asis
-@item @code{nil}
-This is the same as no property---use the standard indentation pattern.
-@item @code{defun}
-Handle this function like a @samp{def} construct: treat the second
-line as the start of a @dfn{body}.
-@item a number, @var{number}
-The first @var{number} arguments of the function are
-@dfn{distinguished} arguments; the rest are considered the body
-of the expression.  A line in the expression is indented according to
-whether the first argument on it is distinguished or not.  If the
-argument is part of the body, the line is indented @code{lisp-body-indent}
-more columns than the open-parenthesis starting the containing
-expression.  If the argument is distinguished and is either the first
-or second argument, it is indented @emph{twice} that many extra columns.
-If the argument is distinguished and not the first or second argument,
-the line uses the standard pattern.
-@item a symbol, @var{symbol}
-@var{symbol} should be a function name; that function is called to
-calculate the indentation of a line within this expression.  The
-function receives two arguments:
-@table @asis
-@item @var{state}
-The value returned by @code{parse-partial-sexp} (a Lisp primitive for
-indentation and nesting computation) when it parses up to the
-beginning of this line.
-@item @var{pos}
-The position at which the line being indented begins.
-@end table
-@noindent
-It should return either a number, which is the number of columns of
-indentation for that line, or a list whose car is such a number.  The
-difference between returning a number and returning a list is that a
-number says that all following lines at the same nesting level should
-be indented just like this one; a list says that following lines might
-call for different indentations.  This makes a difference when the
-indentation is being computed by @kbd{C-M-q}; if the value is a
-number, @kbd{C-M-q} need not recalculate indentation for the following
-lines until the end of the list.
-@end table
+functions, according to the @code{lisp-indent-function} property of
+the function name.  Normally you would use this for macro definitions
+and specify it using the @code{declare} construct (@pxref{Defining
+Macros,,, elisp, the Emacs Lisp Reference Manual}).
 
 @node C Indent
 @subsection Commands for C Indentation
@@ -624,7 +591,7 @@ existing Java mode buffer by typing @kbd{M-x java-mode} there.
 Project for C; it is the default, so as to encourage use of our
 recommended style.
 
-  @xref{Customizing Indentation,,, cc-mode, the CC Mode Manual}, for
+  @xref{Customizing Indentation,,, ccmode, the CC Mode Manual}, for
 more 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.
@@ -671,8 +638,6 @@ Move forward over a balanced expression (@code{forward-sexp}).
 Move backward over a balanced expression(@code{backward-sexp}).
 @item C-M-k
 Kill balanced expression forward (@code{kill-sexp}).
-@item C-M-@key{DEL}
-Kill balanced expression backward (@code{backward-kill-sexp}).
 @item C-M-t
 Transpose expressions (@code{transpose-sexps}).
 @item C-M-@@
@@ -719,17 +684,9 @@ opposite direction.
 @cindex killing expressions
 @kindex C-M-k
 @findex kill-sexp
-@kindex C-M-DEL
-@findex backward-kill-sexp
   Killing a whole balanced expression can be done with @kbd{C-M-k}
-(@code{kill-sexp}) or @kbd{C-M-@key{DEL}} (@code{backward-kill-sexp}).
-@kbd{C-M-k} kills the characters that @kbd{C-M-f} would move over, and
-@kbd{C-M-@key{DEL}} kills the characters that @kbd{C-M-b} would move
-over.  On some machines, @kbd{C-M-@key{DEL}} typed on the console is a
-command to reboot; when that is so, you cannot use it as an Emacs
-command.  This conflict is rare, though: usually the @key{DEL} key for
-Emacs is really @key{BACKSPACE}, and the reboot command is
-@kbd{C-M-@key{DELETE}}, so there is no conflict.
+(@code{kill-sexp}).  @kbd{C-M-k} kills the characters that @kbd{C-M-f}
+would move over.
 
 @cindex transposition of expressions
 @kindex C-M-t
@@ -871,7 +828,9 @@ underline.  @xref{Face Customization}.
 @cindex comments
 
   Because comments are such an important part of programming, Emacs
-provides special commands for editing and inserting comments.
+provides special commands for editing and inserting comments.  It can
+also do spell checking on comments with Flyspell Prog mode
+(@pxref{Spelling}).
 
 @menu
 * Comment Commands::    Inserting, killing, and indenting comments.
@@ -1314,14 +1273,14 @@ Specifies what kind of hidden blocks to open in Isearch mode.
 The value should be one of these four symbols.
 
 @table @code
-@item block
-Open only blocks.
+@item code
+Open only code blocks.
 @item comment
 Open only comments.
 @item t
-Open both blocks and comments.
+Open both code blocks and comments.
 @item nil
-Open neither blocks nor comments.
+Open neither code blocks nor comments.
 @end table
 
 @item hs-special-modes-alist
@@ -1392,7 +1351,7 @@ display, so you can use it even on read-only buffers.  You can use the
 command @kbd{M-x glasses-mode} to enable or disable the mode in the
 current buffer; you can also add @code{glasses-mode} to the mode hook
 of the programming language major modes in which you normally want
-to use Glasses mode.        
+to use Glasses mode.
 
 @node Misc for Programs
 @section Other Features Useful for Editing Programs
@@ -1555,7 +1514,14 @@ colon with no reindentation or newlines by typing @kbd{C-c :}:
 
 @table @kbd
 @item C-c :
+@ifinfo
+@c This uses ``colon'' instead of a literal `:' because Info cannot
+@c cope with a `:' in a menu
+@kindex C-c @key{colon} @r{(C mode)}
+@end ifinfo
+@ifnotinfo
 @kindex C-c : @r{(C mode)}
+@end ifnotinfo
 @findex c-scope-operator
 Insert a double colon scope operator at point, without reindenting the
 line or adding any newlines (@code{c-scope-operator}).
@@ -1829,7 +1795,7 @@ runs the hook @code{fortran-mode-hook} (@pxref{Hooks}).
 @cindex Fortran77 and Fortran90
 @findex f90-mode
 @findex fortran-mode
-  Fortan mode is meant for editing Fortran77 ``fixed format'' source
+  Fortran mode is meant for editing Fortran77 ``fixed format'' source
 code.  For editing the modern Fortran90 ``free format'' source code,
 use F90 mode (@code{f90-mode}).  Emacs normally uses Fortran mode for
 files with extension @samp{.f}, @samp{.F} or @samp{.for}, and F90 mode
@@ -2146,6 +2112,15 @@ full-line comments by setting the variable
 @code{fortran-comment-indent-char} to the single-character string you want
 to use.
 
+@vindex fortran-directive-re
+  Compiler directive lines, or preprocessor lines, have much the same
+appearance as comment lines.  It is important, though, that such lines
+never be indented at all, no matter what the value of
+@code{fortran-comment-indent-style}.  The variable
+@code{fortran-directive-re} is a regular expression that specifies which
+lines are directives.  Matching lines are never indented, and receive
+distinctive font-locking.
+
 @vindex comment-line-start
 @vindex comment-line-start-skip
   Fortran mode introduces two variables @code{comment-line-start} and
@@ -2308,3 +2283,7 @@ Insert or align a comment.
 
   The variable @code{asm-comment-char} specifies which character
 starts comments in assembler syntax.
+
+@ignore
+   arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0
+@end ignore