X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/dcace64668b4e815d3924ee6c7e07479d9313eb6..aad94676b75af17436d50b9ede870d098700a694:/man/programs.texi diff --git a/man/programs.texi b/man/programs.texi index 57ff1b35ba..ab557d4522 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -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 @@ -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,11 +479,12 @@ 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: @@ -871,7 +877,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. @@ -1555,7 +1563,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 +1844,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 +2161,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