Lines Matching +refs:idlwave +refs:indent +refs:to

31 * Defuns::              Commands to operate on major top-level parts
33 * Program Indent:: Adjusting indentation to show the nesting.
36 * Documentation:: Getting documentation of functions you plan to call.
57 indentation, how to do syntax highlighting for the language, and how
58 to find the beginning or end of a function definition. It often has
98 language that you might want to edit. If it doesn't have a mode for
104 In most programming languages, indentation should vary from line to
105 line to illustrate the structure of the program. Therefore, in most
108 Furthermore, @kbd{@key{DEL}} is usually bound to
130 and IDLWAVE (@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}).
149 * Moving by Defuns:: Commands to move over or mark a major definition.
166 If you want to override this convention, you can do so by setting
167 the user option @code{open-paren-in-column-0-is-defun-start} to
168 @code{nil}. If this option is set to @code{t} (the default), commands
173 this convention, you usually won't need to change
185 Move to beginning of current or preceding defun
188 Move to end of current or following defun (@code{end-of-defun}).
193 @cindex move to beginning or end of function
194 @cindex function, move to beginning or end
201 The commands to move to the beginning and end of the current defun
204 positive numeric argument, each repetition moves to the next defun in
208 @var{n} times to the next beginning of a defun. This is not exactly
209 the same place that @kbd{C-M-e} with argument @var{n} would move to;
213 negative argument moves back to an end of a defun, which is not quite
221 is the easiest way to get ready to kill the defun in order to move it
222 to a different place in the file. If the defun is directly preceded
226 active, it extends the end of the region to include one more defun.
246 The Imenu facility offers a way to find the major definitions in
254 the minibuffer, then moves point to that definition. You can use
255 completion to specify the name; the command always displays the whole
259 Alternatively, you can bind the command @code{imenu} to a mouse
260 click. Then it displays mouse menus for you to select a definition
261 name. You can also add the buffer's index to the menu bar by calling
262 @code{imenu-add-menubar-index}. If you want to have this menu bar
264 this by adding @code{imenu-add-menubar-index} to its mode hook. But
265 if you have done that, you will have to wait a little while each time
273 Rescanning happens automatically if you set @code{imenu-auto-rescan} to
274 a non-@code{nil} value. There is no need to rescan because of small
290 Imenu provides the information to guide Which Function mode
312 know how to support it (i.e., all the major modes that support
313 Imenu). You can restrict it to a specific list of major modes by
315 @code{t} (which means to support all available major modes) to a list
322 The best way to keep a program properly indented is to use Emacs to
323 reindent it as you change it. Emacs has commands to indent either a
328 section describes indentation features specific to programming
333 * Multi-line Indent:: Commands to reindent many lines at once.
349 Adjust indentation of current line (@code{indent-for-tab-command}).
356 @findex indent-line-function
358 (@code{indent-for-tab-command}), which was documented in
381 to @code{nil} for indentation to work properly. @xref{Left Margin
387 Sometimes, you may want to reindent several lines of code at a time.
388 One way to do this is to use the mark; when the mark is active and the
390 Alternatively, the command @kbd{C-M-\} (@code{indent-region}) indents
403 @item M-x indent-code-rigidly
409 @findex indent-pp-sexp
416 @code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode,
422 indentation of its first line, move point to that first line and type
429 reindent any continuation lines that may be attached to them.
431 @findex indent-code-rigidly
432 The command @kbd{M-x indent-code-rigidly} rigidly shifts all the
433 lines in the region sideways, like @code{indent-rigidly} does
436 that string. The prefix arg specifies the number of columns to
437 indent.
454 @vindex lisp-indent-offset
455 If the variable @code{lisp-indent-offset} is non-@code{nil}, it overrides
457 such lines are always indented @code{lisp-indent-offset} more columns than
460 @vindex lisp-body-indent
463 a @dfn{body}, by indenting the second line @code{lisp-body-indent}
467 @cindex @code{lisp-indent-function} property
469 functions, according to the @code{lisp-indent-function} property of
484 then indent it like this:
499 @findex c-indent-defun
501 declaration (@code{c-indent-defun}).
505 @findex c-indent-exp
507 (@code{c-indent-exp}). A prefix argument inhibits warning messages
511 @findex c-indent-command
513 (@code{c-indent-command}).
515 @vindex c-tab-always-indent
516 If @code{c-tab-always-indent} is @code{t}, this command always reindents
522 if @code{indent-tabs-mode} is @code{nil}).
533 to the front of the block and then reindents it all.
541 classifies the line syntactically according to its contents and
572 You can also set the variable @code{c-default-style} to specify the
575 one major mode and which indentation style to use for it. For
594 Project for C; it is the default, so as to encourage use of our
600 including how to override parts of an existing style and how to define
605 As an alternative to specifying a style, you can tell Emacs to guess
607 then apply the guessed style to other buffers with @kbd{M-x
621 includes braces, brackets, or whatever delimiters are defined to match
625 in C, these commands apply to braces and brackets too.
627 You can use @kbd{M-x check-parens} to find any unbalanced
648 are referred to internally as @dfn{sexps}@footnote{The word ``sexp''
649 is used to refer to an expression in Lisp.}).
683 the specified number of times; with a negative argument means to move
686 @kbd{C-M-f} and @kbd{C-M-b}, are analogous to @kbd{C-f} and @kbd{C-b},
701 previous balanced expression and the next one. It is analogous to the
703 An argument to @kbd{C-M-t} serves as a repeat count, moving the
712 mark where @kbd{C-M-f} would move to. While the mark is active, each
713 successive call to this command extends the region by shifting the
716 The alias @kbd{C-M-@@} is equivalent to @kbd{C-M-@key{SPC}}.
721 to recognize all balanced expressions because there can be multiple
734 @cindex matching parenthesis and braces, moving to
744 parentheses. They are referred to internally as ``list commands''
772 @kbd{C-M-n} and @kbd{C-M-p} try to stay at the same level in the
784 argument specifies the number of levels to go down.
792 make it easy to see how and whether parentheses (or other delimiters)
811 disables it, but the default is @code{t} to enable it. Set it to
812 @code{jump} to make indication work by momentarily moving the cursor
813 to the matching opening delimiter. Set it to @code{jump-offscreen} to
817 @code{blink-matching-delay} says how many seconds to keep indicating
823 back to search to find the matching opening delimiter. If the match
845 @code{show-paren-highlight-openparen} controls whether to highlight
885 Electric Pair mode, a global minor mode, provides a way to easily
920 mode to skip whitespace forward before deciding whether to skip over
940 starting with three semicolons are supposed to be aligned to the left
943 line will indent the comment to the appropriate position.
982 (@code{comment-indent-new-line}). @xref{Multi-Line Comments}.
985 Add comment delimiters to all the lines in the region.
990 The command to create or align a comment is @kbd{M-;}
993 different jobs relating to comments, depending on the situation where
997 comment delimiters to the region, or removes them. If every line in
1000 delimiters to enclose the text in the region.
1002 If you supply a prefix argument to @kbd{M-;} when a region is
1003 active, that specifies the number of comment delimiters to add or
1008 current line, @kbd{M-;} adds a new comment to the current line. If
1010 characters), the comment is indented to the same position where
1011 @kbd{@key{TAB}} would indent to (@pxref{Basic Indent}). If the line
1013 character on the line. Emacs tries to fit the comment between the
1021 You can also use @kbd{M-;} to align an existing comment. If a line
1022 already contains the comment-start string, @kbd{M-;} realigns it to
1026 @kbd{M-;} is still useful for moving directly to the start of the
1046 Since the comment is saved to the kill ring, you can reinsert it on
1047 another line by moving to the end of that line, doing @kbd{C-y}, and
1048 then @kbd{M-;} to realign the comment. You can achieve the same
1056 The command @kbd{M-x comment-region} is equivalent to calling
1059 this command is bound to @kbd{C-c C-c}. The command @kbd{M-x
1061 argument specifies the number of comment delimiters to remove
1062 (negative arguments specify the number of comment delimiters to add).
1065 setting the variables @code{c-indent-comment-alist} and
1066 @code{c-indent-comments-syntactically-p}. For example, on a line
1077 @findex comment-indent-new-line
1079 If you are typing a comment and wish to continue it to another line,
1080 type @kbd{M-j} or @kbd{C-M-j} (@code{comment-indent-new-line}). This
1082 and indentation to continue the comment.
1117 adds a comment to a line, it tries to place the comment between the
1123 type @kbd{C-x ;} (@code{comment-set-column}) to set the value of
1124 @code{comment-column} in the current buffer to the column where point
1125 is currently located. @kbd{C-u C-x ;} sets the comment column to
1127 @kbd{M-;} to align the current line's comment under the previous one.
1138 comments also. (Note that @samp{\\} is needed in Lisp syntax to
1139 include a @samp{\} in the string, which is needed to deny the first
1163 @vindex comment-indent-function
1164 The variable @code{comment-indent-function} should contain a function
1165 that will be called to compute the alignment for a newly inserted
1169 comment is to be inserted. It should return the column in which the
1170 comment ought to start. For example, the default function bases its
1173 Emacs also tries to align comments on adjacent lines. To override
1175 to indicate an acceptable range of indentation.
1180 Emacs provides several features you can use to look up the
1181 documentation of functions, variables and commands that you plan to
1194 For major modes that apply to languages which have documentation in
1195 Info, you can use @kbd{C-h S} (@code{info-lookup-symbol}) to view the
1202 Emacs determines where to look for documentation for the
1203 symbol---which Info files to look in, and which indices to
1205 info-lookup-file} to look for documentation for a file name.
1208 it asks you to specify the symbol help mode. You should enter
1217 page} or @dfn{man page}. In the GNU operating system, we aim to
1220 still useful to read manual pages.
1226 the @command{man} program to format the corresponding man page. If
1231 to other manual pages. For details, type @kbd{C-h m} while in a Man
1235 Each man page belongs to one of ten or more @dfn{sections}, each
1242 name, whose man page is in section 1; to view the former, type
1250 program accepts a @samp{-a} command-line option, which tells it to
1252 this, change the value of the variable @code{Man-switches} to
1254 @kbd{M-p} to switch between man pages in different sections. The mode
1261 to format and display the man pages; the formatting is done by Emacs,
1272 pops up a window with possible candidates asking you to choose one of
1293 to view the built-in documentation for the Lisp functions and
1294 variables that you want to use. @xref{Name Help}.
1307 global-eldoc-mode}} to turn it off globally.
1311 These variables can be used to configure ElDoc mode:
1315 This variable holds the function which is used to retrieve
1320 it may be customized to compose those functions' results in other
1325 collection of backends for ElDoc. This is what modes should use to
1331 to view a complete documentation (if it has been truncated in the echo
1341 Hideshow mode is a buffer-local minor mode that allows you to
1342 selectively display portions of a program, which are referred to as
1343 @dfn{blocks}. Type @kbd{M-x hs-minor-mode} to toggle this minor mode
1346 When you use Hideshow mode to hide a block, the block disappears
1347 from the screen, to be replaced by an ellipsis (three periods in a
1396 These variables can be used to customize Hideshow mode:
1422 to complete the partial symbol before point. On graphical displays,
1434 mode is enabled, it tries to use the Semantic parser data for
1436 fails at performing completion, it tries to complete using the
1442 minibuffer completion. For instance, if Emacs cannot complete to a
1455 using underscores to separate words within an identifier, rather than
1456 using case distinctions.) Emacs has various features to make it easier
1457 to deal with such symbols.
1461 Glasses mode is a buffer-local minor mode that makes it easier to read
1499 allows Semantic to provide search, navigation, and completion commands
1508 When Semantic mode is enabled, Emacs automatically attempts to
1540 In addition to the above commands, the Semantic package provides a
1541 variety of other ways to make use of parser information. For
1542 instance, you can use it to display a list of completions when Emacs
1558 programming language modes to begin and end at blank lines
1559 (@pxref{Paragraphs}). Therefore, judicious use of blank lines to make
1561 paragraph commands to work on. Auto Fill mode, if enabled in a
1567 motion commands to treat symbols (e.g., @samp{this_is_a_symbol}) as words.
1584 Apart from Hideshow mode (@pxref{Hideshow}), another way to
1585 selectively display parts of a program is to use the selective display
1601 their Unicode characters. You may wish to use this in non-programming
1602 modes as well. You can customize the mode by adding more entries to
1646 * Motion in C:: Commands to move by C statements, etc.
1664 Move point to the beginning or end of the current function or
1675 Move point back to the containing preprocessor conditional, leaving the
1677 argument, move point forward to the end of the containing
1680 @samp{#elif} is equivalent to @samp{#else} followed by @samp{#if}, so
1701 Move point to the beginning of the innermost C statement
1703 of a statement, move to the beginning of the preceding statement. With
1712 Move point to the end of the innermost C statement or sentence; like
1721 @dfn{electric}---in addition to inserting themselves, they also
1728 chaotically indented code. If you are new to CC Mode, you might find
1745 Electric characters insert newlines only when, in addition to the
1767 If you want to delete an entire block of whitespace at point, you
1791 As an alternative to the above commands, you can enable @dfn{hungry
1818 appropriate to the context. In normal code, it does the work of
1821 @kbd{M-j} (@code{c-indent-new-comment-line}).
1823 @code{c-context-line-break} isn't bound to a key by default, but it
1824 needs a binding to be useful. The following code will bind it to
1825 @kbd{@key{RET}}. We use @code{c-initialization-hook} here to make
1826 sure the keymap is loaded before we try to change it.
1858 When you are debugging C code that uses macros, sometimes it is hard to
1860 don't have to figure it out; you can see the expansions.
1877 Highlight parts of the text according to its preprocessor conditionals.
1879 serves as a graphic menu for selecting how to display particular kinds
1881 click on @samp{[A]pply these settings} (or go to that buffer and type
1882 @kbd{a}) to rehighlight the C mode buffer accordingly.
1914 @code{global-cwarn-mode}. You must also enable Font Lock mode to make
1923 @code{hide-ifdef-shadow} to @code{t}, Hide-ifdef minor mode
1932 Find a file related in a special way to the file visited by the
1934 to a C/C++ source file, or vice versa. The variable
1935 @code{ff-related-file-alist} specifies how to compute related file
1949 @code{tab-to-tab-stop}.
1953 Insert a newline and then indent using @code{tab-to-tab-stop}.
1957 preceding colon. Then do @code{tab-to-tab-stop}.