aboutsummaryrefslogtreecommitdiffstats
path: root/man/programs.texi
diff options
context:
space:
mode:
authorRichard M. Stallman2006-02-08 00:11:23 +0000
committerRichard M. Stallman2006-02-08 00:11:23 +0000
commitdfec8297317cb3074ef7df25eff0fc908ba861d6 (patch)
tree72b5ee74bde2f2a776b3e07e272a17c93e1a7b85 /man/programs.texi
parent3f7ba267740e16c406e1509a86ec58867fe34e33 (diff)
downloademacs-dfec8297317cb3074ef7df25eff0fc908ba861d6.tar.gz
emacs-dfec8297317cb3074ef7df25eff0fc908ba861d6.zip
Minor cleanups.
(Comment Commands): Mention momentary Transient Mark mode. (Matching): Be more specific about customizing show-paren-mode. (Info Lookup): Don't list the modes that support C-h S. Just say what it does in an unsupported mode. (Man Page): Delete excessive info on customizing woman. (Motion in C): Don't mention c-for/backward-into-nomenclature.
Diffstat (limited to 'man/programs.texi')
-rw-r--r--man/programs.texi144
1 files changed, 46 insertions, 98 deletions
diff --git a/man/programs.texi b/man/programs.texi
index b3870eeafee..3e7978952a4 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -259,8 +259,8 @@ defun. This is the easiest way to get ready to kill the defun in
259order to move it to a different place in the file. If you use the 259order to move it to a different place in the file. If you use the
260command while point is between defuns, it uses the following defun. 260command while point is between defuns, it uses the following defun.
261Successive uses of @kbd{C-M-h}, or using it in Transient Mark mode 261Successive uses of @kbd{C-M-h}, or using it in Transient Mark mode
262when the mark is active, includes an additional defun in the region 262when the mark is active, extends the end of the region to include one
263each time. 263more defun each time.
264 264
265 In C mode, @kbd{C-M-h} runs the function @code{c-mark-function}, 265 In C mode, @kbd{C-M-h} runs the function @code{c-mark-function},
266which is almost the same as @code{mark-defun}; the difference is that 266which is almost the same as @code{mark-defun}; the difference is that
@@ -296,9 +296,9 @@ name. You can also add the buffer's index to the menu bar by calling
296@code{imenu-add-menubar-index}. If you want to have this menu bar 296@code{imenu-add-menubar-index}. If you want to have this menu bar
297item available for all buffers in a certain major mode, you can do 297item available for all buffers in a certain major mode, you can do
298this by adding @code{imenu-add-menubar-index} to its mode hook. But 298this by adding @code{imenu-add-menubar-index} to its mode hook. But
299if you have done that, you will have to wait each time you visit a 299if you have done that, you will have to wait a little while each time
300file in that mode, while Emacs finds all the definitions in that 300you visit a file in that mode, while Emacs finds all the definitions
301buffer. 301in that buffer.
302 302
303@vindex imenu-auto-rescan 303@vindex imenu-auto-rescan
304 When you change the contents of a buffer, if you add or delete 304 When you change the contents of a buffer, if you add or delete
@@ -374,8 +374,6 @@ usual conventions of the language you are editing.
374Adjust indentation of current line. 374Adjust indentation of current line.
375@item C-j 375@item C-j
376Equivalent to @key{RET} followed by @key{TAB} (@code{newline-and-indent}). 376Equivalent to @key{RET} followed by @key{TAB} (@code{newline-and-indent}).
377@item @key{LINEFEED}
378This key, if the keyboard has it, is another way to enter @kbd{C-j}.
379@end table 377@end table
380 378
381@kindex TAB @r{(programming modes)} 379@kindex TAB @r{(programming modes)}
@@ -400,8 +398,8 @@ the characters around it.
400@kindex C-j 398@kindex C-j
401@findex newline-and-indent 399@findex newline-and-indent
402 When entering lines of new code, use @kbd{C-j} 400 When entering lines of new code, use @kbd{C-j}
403(@code{newline-and-indent}), which is equivalent to a @key{RET} 401(@code{newline-and-indent}), which is equivalent to @key{RET}
404followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a 402followed by @key{TAB}. @kbd{C-j} at the end of a line creates a
405blank line and then gives it the appropriate indentation. 403blank line and then gives it the appropriate indentation.
406 404
407 @key{TAB} indents a line that starts within a parenthetical grouping 405 @key{TAB} indents a line that starts within a parenthetical grouping
@@ -412,7 +410,7 @@ behavior is convenient in cases where you have overridden the standard
412result of @key{TAB} because you find it unaesthetic for a particular 410result of @key{TAB} because you find it unaesthetic for a particular
413line. 411line.
414 412
415 By default, an open-parenthesis, open-brace or other opening 413 In some modes, an open-parenthesis, open-brace or other opening
416delimiter at the left margin is assumed by Emacs (including the 414delimiter at the left margin is assumed by Emacs (including the
417indentation routines) to be the start of a function. This speeds up 415indentation routines) to be the start of a function. This speeds up
418indentation commands. If you will be editing text which contains 416indentation commands. If you will be editing text which contains
@@ -422,7 +420,7 @@ functions, even inside strings or comments, you must set
422Paren}, for more information on this. 420Paren}, for more information on this.
423 421
424 Normally, lines are indented with tabs and spaces. If you want Emacs 422 Normally, lines are indented with tabs and spaces. If you want Emacs
425to use spaces only, see @ref{Just Spaces}. 423to use spaces only, set @code{indent-tabs-mode} (@pref{Just Spaces}).
426 424
427@node Multi-line Indent 425@node Multi-line Indent
428@subsection Indenting Several Lines 426@subsection Indenting Several Lines
@@ -587,8 +585,8 @@ typing @key{C-M-q} at the start of a function definition.
587 585
588@kindex C-c . @r{(C mode)} 586@kindex C-c . @r{(C mode)}
589@findex c-set-style 587@findex c-set-style
590 To choose a style for the current buffer, use the command @kbd{C-c 588 To choose a style for the current buffer, use the command @w{@kbd{C-c
591.}. Specify a style name as an argument (case is not significant). 589.}}. Specify a style name as an argument (case is not significant).
592This command affects the current buffer only, and it affects only 590This command affects the current buffer only, and it affects only
593future invocations of the indentation commands; it does not reindent 591future invocations of the indentation commands; it does not reindent
594the code already in the buffer. To reindent the whole buffer in the 592the code already in the buffer. To reindent the whole buffer in the
@@ -740,7 +738,7 @@ that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like
740the mark at the beginning of the previous balanced expression. The 738the mark at the beginning of the previous balanced expression. The
741alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. When you 739alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. When you
742repeat this command, or use it in Transient Mark mode when the mark is 740repeat this command, or use it in Transient Mark mode when the mark is
743active, it extends the region by one sexp each time. 741active, it extends the end of the region by one sexp each time.
744 742
745 In languages that use infix operators, such as C, it is not possible 743 In languages that use infix operators, such as C, it is not possible
746to recognize all balanced expressions as such because there can be 744to recognize all balanced expressions as such because there can be
@@ -791,9 +789,7 @@ parenthetical groupings, skipping blithely over any amount of text
791that doesn't include meaningful parentheses (symbols, strings, etc.). 789that doesn't include meaningful parentheses (symbols, strings, etc.).
792 790
793@kindex C-M-u 791@kindex C-M-u
794@kindex C-M-d
795@findex backward-up-list 792@findex backward-up-list
796@findex down-list
797 @kbd{C-M-n} and @kbd{C-M-p} try to stay at the same level in the 793 @kbd{C-M-n} and @kbd{C-M-p} try to stay at the same level in the
798parenthesis structure. To move @emph{up} one (or @var{n}) levels, use 794parenthesis structure. To move @emph{up} one (or @var{n}) levels, use
799@kbd{C-M-u} (@code{backward-up-list}). @kbd{C-M-u} moves backward up 795@kbd{C-M-u} (@code{backward-up-list}). @kbd{C-M-u} moves backward up
@@ -801,6 +797,8 @@ past one unmatched opening delimiter. A positive argument serves as a
801repeat count; a negative argument reverses the direction of motion, so 797repeat count; a negative argument reverses the direction of motion, so
802that the command moves forward and up one or more levels. 798that the command moves forward and up one or more levels.
803 799
800@kindex C-M-d
801@findex down-list
804 To move @emph{down} in the parenthesis structure, use @kbd{C-M-d} 802 To move @emph{down} in the parenthesis structure, use @kbd{C-M-d}
805(@code{down-list}). In Lisp mode, where @samp{(} is the only opening 803(@code{down-list}). In Lisp mode, where @samp{(} is the only opening
806delimiter, this is nearly the same as searching for a @samp{(}. An 804delimiter, this is nearly the same as searching for a @samp{(}. An
@@ -852,11 +850,9 @@ highlighted. (There is no need to highlight the opening delimiter in
852that case, because the cursor appears on top of that character.) Use 850that case, because the cursor appears on top of that character.) Use
853the command @kbd{M-x show-paren-mode} to enable or disable this mode. 851the command @kbd{M-x show-paren-mode} to enable or disable this mode.
854 852
855 By default, @code{show-paren-mode} uses colors to highlight the 853 Show Paren mode uses the faces @code{show-paren-match} and
856parentheses. However, if your display doesn't support colors, you can 854@code{show-paren-mismatch} to highlight parentheses; you can customize
857customize the faces @code{show-paren-match-face} and 855them to control how highlighting looks. @xref{Face Customization}.
858@code{show-paren-mismatch-face} to use other attributes, such as bold or
859underline. @xref{Face Customization}.
860 856
861@node Comments 857@node Comments
862@section Manipulating Comments 858@section Manipulating Comments
@@ -911,11 +907,11 @@ The new comment begins with the string Emacs thinks comments should
911start with (the value of @code{comment-start}; see below). Point is 907start with (the value of @code{comment-start}; see below). Point is
912after that string, so you can insert the text of the comment right 908after that string, so you can insert the text of the comment right
913away. If the major mode has specified a string to terminate comments, 909away. If the major mode has specified a string to terminate comments,
914@kbd{M-;} inserts that too, to keep the syntax valid. 910@kbd{M-;} inserts that after point, to keep the syntax valid.
915 911
916 If the text of the line extends past the comment column, then the 912 If the text of the line extends past the comment column, this
917comment start string is indented to a suitable boundary (usually, at 913command indents the comment start string to a suitable boundary
918least one space is inserted). 914(usually, at least one space is inserted).
919 915
920 You can also use @kbd{M-;} to align an existing comment. If a line 916 You can also use @kbd{M-;} to align an existing comment. If a line
921already contains the comment-start string, @kbd{M-;} reindents it to 917already contains the comment-start string, @kbd{M-;} reindents it to
@@ -943,7 +939,8 @@ removes comment delimiters on each line of the region. (If every line
943is a comment, it removes comment delimiters from each; otherwise, it 939is a comment, it removes comment delimiters from each; otherwise, it
944adds comment delimiters to each.) If you are not using Transient Mark 940adds comment delimiters to each.) If you are not using Transient Mark
945mode, then you should use the commands @code{comment-region} and 941mode, then you should use the commands @code{comment-region} and
946@code{uncomment-region} to do these jobs (@pxref{Multi-Line Comments}). 942@code{uncomment-region} to do these jobs (@pxref{Multi-Line Comments}),
943or else enable Transient Mark mode momentarily (@pxref{Momentary Mark}).
947A prefix argument used in these circumstances specifies how many 944A prefix argument used in these circumstances specifies how many
948comment delimiters to add or how many to delete. 945comment delimiters to add or how many to delete.
949 946
@@ -964,8 +961,8 @@ and by not changing the indentation of a triple-semicolon comment at all.
964 (1+ x)) ; This line adds one. 961 (1+ x)) ; This line adds one.
965@end example 962@end example
966 963
967 For C-like buffers, you can configure the exact effect of @kbd{M-;} 964 For C-like modes, you can configure the exact effect of @kbd{M-;}
968more flexibly than for most buffers by setting the user options 965more flexibly than for most buffers by setting the variables
969@code{c-indent-comment-alist} and 966@code{c-indent-comment-alist} and
970@code{c-indent-comments-syntactically-p}. For example, on a line 967@code{c-indent-comments-syntactically-p}. For example, on a line
971ending in a closing brace, @kbd{M-;} puts the comment one space after 968ending in a closing brace, @kbd{M-;} puts the comment one space after
@@ -992,7 +989,7 @@ in just this fashion.
992@kindex C-c C-c (C mode) 989@kindex C-c C-c (C mode)
993@findex comment-region 990@findex comment-region
994 To turn existing lines into comment lines, use the @kbd{M-x 991 To turn existing lines into comment lines, use the @kbd{M-x
995comment-region} command (or type @kbd{C-c C-c} in C-like buffers). It 992comment-region} command (or type @kbd{C-c C-c} in C-like modes). It
996adds comment delimiters to the lines that start in the region, thus 993adds comment delimiters to the lines that start in the region, thus
997commenting them out. With a negative argument, it does the 994commenting them out. With a negative argument, it does the
998opposite---it deletes comment delimiters from the lines in the region. 995opposite---it deletes comment delimiters from the lines in the region.
@@ -1103,29 +1100,31 @@ use in your program.
1103@findex info-lookup-symbol 1100@findex info-lookup-symbol
1104@findex info-lookup-file 1101@findex info-lookup-file
1105@kindex C-h S 1102@kindex C-h S
1106 For C, Lisp, and other languages that have documentation in Info, 1103 For many major modes, that apply to languages that have
1107you can use @kbd{C-h S} (@code{info-lookup-symbol}) to view the Info 1104documentation in Info, you can use @kbd{C-h S}
1108documentation for a symbol used in the program. You specify the 1105(@code{info-lookup-symbol}) to view the Info documentation for a
1109symbol with the minibuffer; the default is the symbol appearing in the 1106symbol used in the program. You specify the symbol with the
1110buffer at point. For example, in C mode this looks for the symbol in 1107minibuffer; the default is the symbol appearing in the buffer at
1111the C Library Manual. 1108point. For example, in C mode this looks for the symbol in the C
1109Library Manual. The command only works if the appropriate manual's
1110Info files are installed.
1112 1111
1113 The major mode determines where to look for documentation for the 1112 The major mode determines where to look for documentation for the
1114symbol---which Info files to look in, and which indices to search. 1113symbol---which Info files to look in, and which indices to search.
1115You can also use @kbd{M-x info-lookup-file} to look for documentation 1114You can also use @kbd{M-x info-lookup-file} to look for documentation
1116for a file name. 1115for a file name.
1117 1116
1118 This feature currently supports the modes AWK, Autoconf, Bison, C, 1117 If you use @kbd{C-h S} in a major mode that does not support it,
1119Emacs Lisp, LaTeX, M4, Makefile, Octave, Perl, Scheme, and Texinfo, 1118it asks you to specify the ``symbol help mode''. You should enter
1120provided you have installed the relevant Info files, which are 1119a command such as @code{c-mode} that would select a major
1121typically available with the appropriate GNU package. 1120mode which @kbd{C-h S} does support.
1122 1121
1123@node Man Page 1122@node Man Page
1124@subsection Man Page Lookup 1123@subsection Man Page Lookup
1125 1124
1126@cindex manual page 1125@cindex manual page
1127 On Unix, the main form of on-line documentation was the @dfn{manual 1126 On Unix, the main form of on-line documentation was the @dfn{manual
1128page} or @dfn{man page}. In the GNU operating system, we hope to 1127page} or @dfn{man page}. In the GNU operating system, we aim to
1129replace man pages with better-organized manuals that you can browse 1128replace man pages with better-organized manuals that you can browse
1130with Info (@pxref{Misc Help}). This process is not finished, so it is 1129with Info (@pxref{Misc Help}). This process is not finished, so it is
1131still useful to read manual pages. 1130still useful to read manual pages.
@@ -1151,8 +1150,8 @@ a man page from a specific section, type
1151when @kbd{M-x manual-entry} prompts for the topic. For example, to 1150when @kbd{M-x manual-entry} prompts for the topic. For example, to
1152read the man page for the C library function @code{chmod} (as opposed 1151read the man page for the C library function @code{chmod} (as opposed
1153to a command of the same name), type @kbd{M-x manual-entry @key{RET} 1152to a command of the same name), type @kbd{M-x manual-entry @key{RET}
1154chmod(2) @key{RET}} (@code{chmod} is a system call, so it is in 1153chmod(2) @key{RET}}. (@code{chmod} is a system call, so it is in
1155section @samp{2}). 1154section @samp{2}.)
1156 1155
1157@vindex Man-switches 1156@vindex Man-switches
1158 If you do not specify a section, the results depend on how the 1157 If you do not specify a section, the results depend on how the
@@ -1203,42 +1202,6 @@ several manual pages by the same name exist in different sections, it
1203pops up a window with possible candidates asking you to choose one of 1202pops up a window with possible candidates asking you to choose one of
1204them. 1203them.
1205 1204
1206@vindex woman-manpath
1207 By default, @kbd{M-x woman} looks for manual pages in the
1208directories specified in the @code{MANPATH} environment variable. (If
1209@code{MANPATH} is not set, @code{woman} uses a suitable default value,
1210which can be customized.) More precisely, @code{woman} looks for
1211subdirectories that match the shell wildcard pattern @file{man*} in each one
1212of these directories, and tries to find the manual pages in those
1213subdirectories. When first invoked, @kbd{M-x woman} converts the
1214value of @code{MANPATH} to a list of directory names and stores that
1215list in the @code{woman-manpath} variable. Changing the value of this
1216variable is another way to control the list of directories used.
1217
1218@vindex woman-path
1219 You can also augment the list of directories searched by
1220@code{woman} by setting the value of the @code{woman-path} variable.
1221This variable should hold a list of specific directories which
1222@code{woman} should search, in addition to those in
1223@code{woman-manpath}. Unlike @code{woman-manpath}, the directories in
1224@code{woman-path} are searched for the manual pages, not for
1225@file{man*} subdirectories.
1226
1227@findex woman-find-file
1228 Occasionally, you might need to display manual pages that are not in
1229any of the directories listed by @code{woman-manpath} and
1230@code{woman-path}. The @kbd{M-x woman-find-file} command prompts for a
1231name of a manual page file, with completion, and then formats and
1232displays that file like @kbd{M-x woman} does.
1233
1234@vindex woman-dired-keys
1235 The first time you invoke @kbd{M-x woman}, it defines the Dired
1236@kbd{W} key to run the @code{woman-find-file} command on the current
1237line's file. You can disable this by setting the variable
1238@code{woman-dired-keys} to @code{nil}. @xref{Dired}. In addition,
1239the Tar-mode @kbd{w} key is define to invoke @code{woman-find-file} on
1240the current line's archive member.
1241
1242 For more information about setting up and using @kbd{M-x woman}, see 1205 For more information about setting up and using @kbd{M-x woman}, see
1243@ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The WoMan 1206@ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The WoMan
1244Manual}. 1207Manual}.
@@ -1325,8 +1288,8 @@ Hide all blocks @var{n} levels below this block
1325Non-@code{nil} says that @kbd{hs-hide-all} should hide comments too. 1288Non-@code{nil} says that @kbd{hs-hide-all} should hide comments too.
1326 1289
1327@item hs-isearch-open 1290@item hs-isearch-open
1328Specifies what kind of hidden blocks to open in Isearch mode. 1291Specifies what kind of hidden blocks incremental search should make
1329The value should be one of these four symbols: 1292visible. The value should be one of these four symbols:
1330 1293
1331@table @code 1294@table @code
1332@item code 1295@item code
@@ -1533,24 +1496,6 @@ moves by sentences instead of statements.
1533Move point to the end of the innermost C statement or sentence; like 1496Move point to the end of the innermost C statement or sentence; like
1534@kbd{M-a} except that it moves in the other direction 1497@kbd{M-a} except that it moves in the other direction
1535(@code{c-end-of-statement}). 1498(@code{c-end-of-statement}).
1536
1537@item M-x c-backward-into-nomenclature
1538@findex c-backward-into-nomenclature
1539Move point backward to beginning of a C++ nomenclature section or
1540word. With prefix argument @var{n}, move @var{n} times. If @var{n}
1541is negative, move forward. C++ nomenclature means a symbol name in
1542the style of NamingSymbolsWithMixedCaseAndNoUnderlines; each capital
1543letter begins a section or word. Rather than this command, you might
1544well prefer the newer ``Subword Mode'', which does the same thing
1545better. @xref{Other C Commands}.
1546
1547In the GNU project, we recommend using underscores to separate words
1548within an identifier in C or C++, rather than using case distinctions.
1549
1550@item M-x c-forward-into-nomenclature
1551@findex c-forward-into-nomenclature
1552Move point forward to end of a C++ nomenclature section or word.
1553With prefix argument @var{n}, move @var{n} times.
1554@end table 1499@end table
1555 1500
1556@node Electric C 1501@node Electric C
@@ -1661,6 +1606,9 @@ the flag @samp{/w} on the mode line after the mode name
1661(e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in 1606(e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in
1662non-CC Mode buffers. 1607non-CC Mode buffers.
1663 1608
1609In the GNU project, we recommend using underscores to separate words
1610within an identifier in C or C++, rather than using case distinctions.
1611
1664@item M-x c-context-line-break 1612@item M-x c-context-line-break
1665@findex c-context-line-break 1613@findex c-context-line-break
1666This command inserts a line break and indents the new line in a manner 1614This command inserts a line break and indents the new line in a manner