home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / emacs-19.000 / emacs-19 / usr / local / info / emacs-13 < prev    next >
Encoding:
GNU Info File  |  1995-09-11  |  44.7 KB  |  1,071 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.55 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Commands of GUD,  Next: GUD Customization,  Prev: Debugger Operation,  Up: Debuggers
  6.  
  7. Commands of GUD
  8. ---------------
  9.  
  10.    The GUD interaction buffer uses a variant of Shell mode, so the
  11. commands of Shell mode are available (*note Shell Mode::.).  GUD mode
  12. also provides commands for setting and clearing breakpoints, for
  13. selecting stack frames, and for stepping through the program.  These
  14. commands are available both in the GUD buffer and globally, but with
  15. different key bindings.
  16.  
  17.    The breakpoint commands are usually used in source file buffers,
  18. because that is the way to specify where to set or clear the breakpoint.
  19. Here's the global command to set a breakpoint:
  20.  
  21. `C-x SPC'
  22.      Set a breakpoint on the source line that point is on.
  23.  
  24.    Here are the other special commands provided by GUD.  The keys
  25. starting with `C-c' are available only in the GUD interaction buffer.
  26. The bindings that start with `C-x C-a' are available in the GUD buffer
  27. and also in source files.
  28.  
  29. `C-c C-l'
  30. `C-x C-a C-l'
  31.      Display in another window the last line referred to in the GUD
  32.      buffer (that is, the line indicated in the last location message).
  33.      This runs the command `gud-refresh'.
  34.  
  35. `C-c C-s'
  36. `C-x C-a C-s'
  37.      Execute a single line of code (`gud-step').  If the line contains
  38.      a function call, execution stops after entering the called
  39.      function.
  40.  
  41. `C-c C-n'
  42. `C-x C-a C-n'
  43.      Execute a single line of code, stepping across entire function
  44.      calls at full speed (`gud-next').
  45.  
  46. `C-c C-i'
  47. `C-x C-a C-i'
  48.      Execute a single machine instruction (`gud-stepi').
  49.  
  50. `C-c C-r'
  51. `C-x C-a C-r'
  52.      Continue execution without specifying any stopping point.  The
  53.      program will run until it hits a breakpoint, terminates, or gets a
  54.      signal that the debugger is checking for (`gud-cont').
  55.  
  56. `C-c C-d'
  57. `C-x C-a C-d'
  58.      Delete the breakpoint(s) on the current source line, if any
  59.      (`gud-remove').  If you use this command in the GUD interaction
  60.      buffer, it applies to the line where the program last stopped.
  61.  
  62. `C-c C-t'
  63. `C-x C-a C-t'
  64.      Set a temporary breakpoint on the current source line, if any.  If
  65.      you use this command in the GUD interaction buffer, it applies to
  66.      the line where the program last stopped.
  67.  
  68.    The above commands are common to all supported debuggers.  If you are
  69. using GDB or (some versions of) DBX, these additional commands are
  70. available:
  71.  
  72. `C-c <'
  73. `C-x C-a <'
  74.      Select the next enclosing stack frame (`gud-up').  This is
  75.      equivalent to the `up' command.
  76.  
  77. `C-c >'
  78. `C-x C-a >'
  79.      Select the next inner stack frame (`gud-down').  This is
  80.      equivalent to the `down' command.
  81.  
  82.    If you are using GDB, these additional key bindings are available:
  83.  
  84. `TAB'
  85.      With GDB, complete a symbol name (`gud-gdb-complete-command').
  86.      This key is available only in the GUD interaction buffer, and
  87.      requires GDB versions 4.13 and later.
  88.  
  89. `C-c C-f'
  90. `C-x C-a C-f'
  91.      Run the program until the selected stack frame returns (or until it
  92.      stops for some other reason).
  93.  
  94.    These commands interpret a numeric argument as a repeat count, when
  95. that makes sense.
  96.  
  97. 
  98. File: emacs,  Node: GUD Customization,  Prev: Commands of GUD,  Up: Debuggers
  99.  
  100. GUD Customization
  101. -----------------
  102.  
  103.    On startup, GUD runs one of the following hooks: `gdb-mode-hook', if
  104. you are using GDB; `dbx-mode-hook', if you are using DBX;
  105. `sdb-mode-hook', if you are using SDB; `xdb-mode-hook', if you are
  106. using XDB; `perldb-mode-hook', for Perl debugging mode.  You can use
  107. these hooks to define custom key bindings for the debugger interaction
  108. buffer.  *Note Hooks::.
  109.  
  110.    Here is a convenient way to define a command that sends a particular
  111. command string to the debugger, and set up a key binding for it in the
  112. debugger interaction buffer:
  113.  
  114.      (gud-def FUNCTION CMDSTRING BINDING DOCSTRING)
  115.  
  116.    This defines a command named FUNCTION which sends CMDSTRING to the
  117. debugger process, and gives it the documentation string DOCSTRING.  You
  118. can use the command thus defined in any buffer.  If BINDING is
  119. non-`nil', `gud-def' also binds the command to `C-c BINDING' in the GUD
  120. buffer's mode and to `C-x C-a BINDING' generally.
  121.  
  122.    The command string CMDSTRING may contain certain `%'-sequences that
  123. stand for data to be filled in at the time FUNCTION is called:
  124.  
  125. `%f'
  126.      The name of the current source file.  If the current buffer is the
  127.      GUD buffer, then the "current source file" is the file that the
  128.      program stopped in.
  129.  
  130. `%l'
  131.      The number of the current source line.  If the current buffer is
  132.      the GUD buffer, then the "current source line" is the line that
  133.      the program stopped in.
  134.  
  135. `%e'
  136.      The text of the C lvalue or function-call expression at or
  137.      adjacent to point.
  138.  
  139. `%a'
  140.      The text of the hexadecimal address at or adjacent to point.
  141.  
  142. `%p'
  143.      The numeric argument of the called function, as a decimal number.
  144.      If the command is used without a numeric argument, `%p' stands for
  145.      the empty string.
  146.  
  147.      If you don't use `%p' in the command string, the command you define
  148.      ignores any numeric argument.
  149.  
  150. 
  151. File: emacs,  Node: Executing Lisp,  Next: Lisp Libraries,  Prev: Debuggers,  Up: Building
  152.  
  153. Executing Lisp Expressions
  154. ==========================
  155.  
  156.    Emacs has several different major modes for Lisp and Scheme.  They
  157. are the same in terms of editing commands, but differ in the commands
  158. for executing Lisp expressions.  Each mode has its own purpose.
  159.  
  160. Emacs-Lisp mode
  161.      The mode for editing source files of programs to run in Emacs Lisp.
  162.      This mode defines `C-M-x' to evaluate the current defun.  *Note
  163.      Lisp Libraries::.
  164.  
  165. Lisp Interaction mode
  166.      The mode for an interactive session with Emacs Lisp.  It defines
  167.      LFD to evaluate the sexp before point and insert its value in the
  168.      buffer.  *Note Lisp Interaction::.
  169.  
  170. Lisp mode
  171.      The mode for editing source files of programs that run in Lisps
  172.      other than Emacs Lisp.  This mode defines `C-M-x' to send the
  173.      current defun to an inferior Lisp process.  *Note External Lisp::.
  174.  
  175. Inferior Lisp mode
  176.      The mode for an interactive session with an inferior Lisp process.
  177.      This mode combines the special features of Lisp mode and Shell mode
  178.      (*note Shell Mode::.).
  179.  
  180. Scheme mode
  181.      Like Lisp mode but for Scheme programs.
  182.  
  183. Inferior Scheme mode
  184.      The mode for an interactive session with an inferior Scheme
  185.      process.
  186.  
  187. * Menu:
  188.  
  189. These subnodes of the chapter on editing programs describe the editing
  190. commands for working with Lisp programs, which are in fact available
  191. globally.
  192.  
  193. * Lists::          Expressions with balanced parentheses.
  194. * List Commands::     The commands for working with list and sexps.
  195. * Defuns::          Each program is made up of separate functions.
  196.             There are editing commands to operate on them.
  197. * Program Indent::    Adjusting indentation to show the nesting.
  198. * Matching::          Insertion of a close-delimiter flashes matching open.
  199. * Comments::          Inserting, killing, and aligning comments.
  200.  
  201. 
  202. File: emacs,  Node: Lisp Libraries,  Next: Lisp Interaction,  Prev: Executing Lisp,  Up: Building
  203.  
  204. Libraries of Lisp Code for Emacs
  205. ================================
  206.  
  207.    Lisp code for Emacs editing commands is stored in files whose names
  208. conventionally end in `.el'.  This ending tells Emacs to edit them in
  209. Emacs-Lisp mode (*note Executing Lisp::.).
  210.  
  211.    To execute a file of Emacs Lisp code, use `M-x load-file'.  This
  212. command reads a file name using the minibuffer and then executes the
  213. contents of that file as Lisp code.  It is not necessary to visit the
  214. file first; in any case, this command reads the file as found on disk,
  215. not text in an Emacs buffer.
  216.  
  217.    Once a file of Lisp code is installed in the Emacs Lisp library
  218. directories, users can load it using `M-x load-library'.  Programs can
  219. load it by calling `load-library', or with `load', a more primitive
  220. function that is similar but accepts some additional arguments.
  221.  
  222.    `M-x load-library' differs from `M-x load-file' in that it searches
  223. a sequence of directories and tries three file names in each directory.
  224. Suppose your argument is LIB; the three names are `LIB.elc', `LIB.el',
  225. and lastly just `LIB'.  If `LIB.elc' exists, it is by convention the
  226. result of compiling `LIB.el'; it is better to load the compiled file,
  227. since it will load and run faster.
  228.  
  229.    If `load-library' finds that `LIB.el' is newer than `LIB.elc' file,
  230. it prints a warning, because it's likely that somebody made changes to
  231. the `.el' file and forgot to recompile it.
  232.  
  233.    Because the argument to `load-library' is usually not in itself a
  234. valid file name, file name completion is not available.  Indeed, when
  235. using this command, you usually do not know exactly what file name will
  236. be used.
  237.  
  238.    The sequence of directories searched by `M-x load-library' is
  239. specified by the variable `load-path', a list of strings that are
  240. directory names.  The default value of the list contains the directory
  241. where the Lisp code for Emacs itself is stored.  If you have libraries
  242. of your own, put them in a single directory and add that directory to
  243. `load-path'.  `nil' in this list stands for the current default
  244. directory, but it is probably not a good idea to put `nil' in the list.
  245. If you find yourself wishing that `nil' were in the list, most likely
  246. what you really want to do is use `M-x load-file' this once.
  247.  
  248.    Often you do not have to give any command to load a library, because
  249. the commands defined in the library are set up to "autoload" that
  250. library.  Trying to run any of those commands calls `load' to load the
  251. library; this replaces the autoload definitions with the real ones from
  252. the library.
  253.  
  254.    Emacs Lisp code can be compiled into byte-code which loads faster,
  255. takes up less space when loaded, and executes faster.  *Note Byte
  256. Compilation: (elisp)Byte Compilation.  By convention, the compiled code
  257. for a library goes in a separate file whose name consists of the
  258. library source file with `c' appended.  Thus, the compiled code for
  259. `foo.el' goes in `foo.elc'.  That's why `load-library' searches for
  260. `.elc' files first.
  261.  
  262. 
  263. File: emacs,  Node: Lisp Eval,  Next: External Lisp,  Prev: Lisp Interaction,  Up: Building
  264.  
  265. Evaluating Emacs-Lisp Expressions
  266. =================================
  267.  
  268.    Lisp programs intended to be run in Emacs should be edited in
  269. Emacs-Lisp mode; this happens automatically for file names ending in
  270. `.el'.  By contrast, Lisp mode itself is used for editing Lisp programs
  271. intended for other Lisp systems.  To switch to Emacs-Lisp mode
  272. explicitly, use the command `M-x emacs-lisp-mode'.
  273.  
  274.    For testing of Lisp programs to run in Emacs, it is often useful to
  275. evaluate part of the program as it is found in the Emacs buffer.  For
  276. example, after changing the text of a Lisp function definition,
  277. evaluating the definition installs the change for future calls to the
  278. function.  Evaluation of Lisp expressions is also useful in any kind of
  279. editing, for invoking noninteractive functions (functions that are not
  280. commands).
  281.  
  282. `M-:'
  283.      Read a single Lisp expression in the minibuffer, evaluate it, and
  284.      print the value in the echo area (`eval-expression').
  285.  
  286. `C-x C-e'
  287.      Evaluate the Lisp expression before point, and print the value in
  288.      the echo area (`eval-last-sexp').
  289.  
  290. `C-M-x'
  291.      Evaluate the defun containing or after point, and print the value
  292.      in the echo area (`eval-defun').
  293.  
  294. `M-x eval-region'
  295.      Evaluate all the Lisp expressions in the region.
  296.  
  297. `M-x eval-current-buffer'
  298.      Evaluate all the Lisp expressions in the buffer.
  299.  
  300.    `M-:' (`eval-expression') is the most basic command for evaluating a
  301. Lisp expression interactively.  It reads the expression using the
  302. minibuffer, so you can execute any expression on a buffer regardless of
  303. what the buffer contains.  When the expression is evaluated, the current
  304. buffer is once again the buffer that was current when `M-:' was typed.
  305.  
  306.    `M-:' can easily confuse users who do not understand it.  Therefore,
  307. `eval-expression' is normally a disabled command.  Attempting to use
  308. this command asks for confirmation and gives you the option of enabling
  309. it; once you enable the command, confirmation will no longer be
  310. required for it.  *Note Disabling::.
  311.  
  312.    In Emacs-Lisp mode, the key `C-M-x' is bound to the command
  313. `eval-defun', which parses the defun containing or following point as a
  314. Lisp expression and evaluates it.  The value is printed in the echo
  315. area.  This command is convenient for installing in the Lisp environment
  316. changes that you have just made in the text of a function definition.
  317.  
  318.    `C-M-x' treats `defvar' expressions specially.  Normally, evaluating
  319. a `defvar' expression does nothing if the variable it defines already
  320. has a value.  But `C-M-x' unconditionally resets the variable to the
  321. initial value specified in the `defvar' expression.  This special
  322. feature is convenient for debugging Lisp programs.
  323.  
  324.    The command `C-x C-e' (`eval-last-sexp') evaluates the Lisp
  325. expression preceding point in the buffer, and displays the value in the
  326. echo area.  It is available in all major modes, not just Emacs-Lisp
  327. mode.  It does not treat `defvar' specially.
  328.  
  329.    If `C-M-x' or `C-x C-e' is given a numeric argument, it inserts the
  330. value into the current buffer at point, rather than displaying it in
  331. the echo area.  The argument's value does not matter.
  332.  
  333.    The most general command for evaluating Lisp expressions from a
  334. buffer is `eval-region'.  `M-x eval-region' parses the text of the
  335. region as one or more Lisp expressions, evaluating them one by one.
  336. `M-x eval-current-buffer' is similar but evaluates the entire buffer.
  337. This is a reasonable way to install the contents of a file of Lisp code
  338. that you are just ready to test.  Later, as you find bugs and change
  339. individual functions, use `C-M-x' on each function that you change.
  340. This keeps the Lisp world in step with the source file.
  341.  
  342. 
  343. File: emacs,  Node: Lisp Interaction,  Next: Lisp Eval,  Prev: Lisp Libraries,  Up: Building
  344.  
  345. Lisp Interaction Buffers
  346. ========================
  347.  
  348.    The buffer `*scratch*' which is selected when Emacs starts up is
  349. provided for evaluating Lisp expressions interactively inside Emacs.
  350.  
  351.    The simplest way to use the `*scratch*' buffer is to insert Lisp
  352. expressions and type LFD after each expression.  This command reads the
  353. Lisp expression before point, evaluates it, and inserts the value in
  354. printed representation before point.  The result is a complete
  355. typescript of the expressions you have evaluated and their values.
  356.  
  357.    The `*scratch*' buffer's major mode is Lisp Interaction mode, which
  358. is the same as Emacs-Lisp mode except for the binding of LFD.
  359.  
  360.    The rationale for this feature is that Emacs must have a buffer when
  361. it starts up, but that buffer is not useful for editing files since a
  362. new buffer is made for every file that you visit.  The Lisp interpreter
  363. typescript is the most useful thing I can think of for the initial
  364. buffer to do.  Type `M-x lisp-interaction-mode' to put the current
  365. buffer in Lisp Interaction mode.
  366.  
  367. 
  368. File: emacs,  Node: External Lisp,  Prev: Lisp Eval,  Up: Building
  369.  
  370. Running an External Lisp
  371. ========================
  372.  
  373.    Emacs has facilities for running programs in other Lisp systems.
  374. You can run a Lisp process as an inferior of Emacs, and pass
  375. expressions to it to be evaluated.  You can also pass changed function
  376. definitions directly from the Emacs buffers in which you edit the Lisp
  377. programs to the inferior Lisp process.
  378.  
  379.    To run an inferior Lisp process, type `M-x run-lisp'.  This runs the
  380. program named `lisp', the same program you would run by typing `lisp'
  381. as a shell command, with both input and output going through an Emacs
  382. buffer named `*lisp*'.  That is to say, any "terminal output" from Lisp
  383. will go into the buffer, advancing point, and any "terminal input" for
  384. Lisp comes from text in the buffer.  (You can change the name of the
  385. Lisp executable file by setting the variable `inferior-lisp-program'.)
  386.  
  387.    To give input to Lisp, go to the end of the buffer and type the
  388. input, terminated by RET.  The `*lisp*' buffer is in Inferior Lisp
  389. mode, which combines the special characteristics of Lisp mode with most
  390. of the features of Shell mode (*note Shell Mode::.).  The definition of
  391. RET to send a line to a subprocess is one of the features of Shell mode.
  392.  
  393.    For the source files of programs to run in external Lisps, use Lisp
  394. mode.  This mode can be selected with `M-x lisp-mode', and is used
  395. automatically for files whose names end in `.l', `.lsp', or `.lisp', as
  396. most Lisp systems usually expect.
  397.  
  398.    When you edit a function in a Lisp program you are running, the
  399. easiest way to send the changed definition to the inferior Lisp process
  400. is the key `C-M-x'.  In Lisp mode, this runs the function
  401. `lisp-eval-defun', which finds the defun around or following point and
  402. sends it as input to the Lisp process.  (Emacs can send input to any
  403. inferior process regardless of what buffer is current.)
  404.  
  405.    Contrast the meanings of `C-M-x' in Lisp mode (for editing programs
  406. to be run in another Lisp system) and Emacs-Lisp mode (for editing Lisp
  407. programs to be run in Emacs): in both modes it has the effect of
  408. installing the function definition that point is in, but the way of
  409. doing so is different according to where the relevant Lisp environment
  410. is found.  *Note Executing Lisp::.
  411.  
  412. 
  413. File: emacs,  Node: Abbrevs,  Next: Picture,  Prev: Building,  Up: Top
  414.  
  415. Abbrevs
  416. *******
  417.  
  418.    A defined "abbrev" is a word which "expands", if you insert it, into
  419. some different text.  Abbrevs are defined by the user to expand in
  420. specific ways.  For example, you might define `foo' as an abbrev
  421. expanding to `find outer otter'.  Then you would be able to insert
  422. `find outer otter ' into the buffer by typing `f o o SPC'.
  423.  
  424.    A second kind of abbreviation facility is called "dynamic abbrev
  425. expansion".  You use dynamic abbrev expansion with an explicit command
  426. to expand the letters in the buffer before point by looking for other
  427. words in the buffer that start with those letters.  *Note Dynamic
  428. Abbrevs::.
  429.  
  430. * Menu:
  431.  
  432. * Abbrev Concepts::   Fundamentals of defined abbrevs.
  433. * Defining Abbrevs::  Defining an abbrev, so it will expand when typed.
  434. * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
  435. * Editing Abbrevs::   Viewing or editing the entire list of defined abbrevs.
  436. * Saving Abbrevs::    Saving the entire list of abbrevs for another session.
  437. * Dynamic Abbrevs::   Abbreviations for words already in the buffer.
  438.  
  439. 
  440. File: emacs,  Node: Abbrev Concepts,  Next: Defining Abbrevs,  Up: Abbrevs
  441.  
  442. Abbrev Concepts
  443. ===============
  444.  
  445.    An "abbrev" is a word which has been defined to "expand" into a
  446. specified "expansion".  When you insert a word-separator character
  447. following the abbrev, that expands the abbrev--replacing the abbrev
  448. with its expansion.  For example, if `foo' is defined as an abbrev
  449. expanding to `find outer otter', then you can insert `find outer
  450. otter.'  into the buffer by typing `f o o .'.
  451.  
  452.    Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
  453. Disabling Abbrev mode does not cause abbrev definitions to be forgotten,
  454. but they do not expand until Abbrev mode is enabled again.  The command
  455. `M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
  456. turns Abbrev mode on if the argument is positive, off otherwise.  *Note
  457. Minor Modes::.  `abbrev-mode' is also a variable; Abbrev mode is on
  458. when the variable is non-`nil'.  The variable `abbrev-mode'
  459. automatically becomes local to the current buffer when it is set.
  460.  
  461.    Abbrev definitions can be "mode-specific"--active only in one major
  462. mode.  Abbrevs can also have "global" definitions that are active in
  463. all major modes.  The same abbrev can have a global definition and
  464. various mode-specific definitions for different major modes.  A mode
  465. specific definition for the current major mode overrides a global
  466. definition.
  467.  
  468.    Abbrevs can be defined interactively during the editing session.
  469. Lists of abbrev definitions can also be saved in files and reloaded in
  470. later sessions.  Some users keep extensive lists of abbrevs that they
  471. load in every session.
  472.  
  473. 
  474. File: emacs,  Node: Defining Abbrevs,  Next: Expanding Abbrevs,  Prev: Abbrev Concepts,  Up: Abbrevs
  475.  
  476. Defining Abbrevs
  477. ================
  478.  
  479. `C-x a g'
  480.      Define an abbrev, using one or more words before point as its
  481.      expansion (`add-global-abbrev').
  482.  
  483. `C-x a l'
  484.      Similar, but define an abbrev specific to the current major mode
  485.      (`add-mode-abbrev').
  486.  
  487. `C-x a i g'
  488.      Define a word in the buffer as an abbrev
  489.      (`inverse-add-global-abbrev').
  490.  
  491. `C-x a i l'
  492.      Define a word in the buffer as a mode-specific abbrev
  493.      (`inverse-add-mode-abbrev').
  494.  
  495. `M-x kill-all-abbrevs'
  496.      This command discards all abbrev definitions currently in effect,
  497.      leaving a blank slate.
  498.  
  499.    The usual way to define an abbrev is to enter the text you want the
  500. abbrev to expand to, position point after it, and type `C-x a g'
  501. (`add-global-abbrev').  This reads the abbrev itself using the
  502. minibuffer, and then defines it as an abbrev for one or more words
  503. before point.  Use a numeric argument to say how many words before
  504. point should be taken as the expansion.  For example, to define the
  505. abbrev `foo' as mentioned above, insert the text `find outer otter' and
  506. then type `C-u 3 C-x a g f o o RET'.
  507.  
  508.    An argument of zero to `C-x a g' means to use the contents of the
  509. region as the expansion of the abbrev being defined.
  510.  
  511.    The command `C-x a l' (`add-mode-abbrev') is similar, but defines a
  512. mode-specific abbrev.  Mode specific abbrevs are active only in a
  513. particular major mode.  `C-x a l' defines an abbrev for the major mode
  514. in effect at the time `C-x a l' is typed.  The arguments work the same
  515. as for `C-x a g'.
  516.  
  517.    If the text already in the buffer is the abbrev, rather than its
  518. expansion, use command `C-x a i g' (`inverse-add-global-abbrev')
  519. instead of `C-x a g', or use `C-x a i l' (`inverse-add-mode-abbrev')
  520. instead of `C-x a l'.  These commands are called "inverse" because they
  521. invert the meaning of the two text strings they use (one from the
  522. buffer and one read with the minibuffer).
  523.  
  524.    To change the definition of an abbrev, just define a new definition.
  525. When the abbrev has a prior definition, the abbrev definition commands
  526. ask for confirmation for replacing it.
  527.  
  528.    To remove an abbrev definition, give a negative argument to the
  529. abbrev definition command: `C-u - C-x a g' or `C-u - C-x a l'.  The
  530. former removes a global definition, while the latter removes a
  531. mode-specific definition.
  532.  
  533.    `M-x kill-all-abbrevs' removes all the abbrev definitions there are,
  534. both global and local.
  535.  
  536. 
  537. File: emacs,  Node: Expanding Abbrevs,  Next: Editing Abbrevs,  Prev: Defining Abbrevs,  Up: Abbrevs
  538.  
  539. Controlling Abbrev Expansion
  540. ============================
  541.  
  542.    An abbrev expands whenever it is present in the buffer just before
  543. point and you type a self-inserting whitespace or punctuation character
  544. (SPC, comma, etc.).  More precisely, any character that is not a word
  545. constituent expands an abbrev, and any word constituent character can
  546. be part of an abbrev.  The most common way to use an abbrev is to
  547. insert it and then insert a punctuation character to expand it.
  548.  
  549.    Abbrev expansion preserves case; thus, `foo' expands into `find
  550. outer otter'; `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
  551. OTTER' or `Find Outer Otter' according to the variable
  552. `abbrev-all-caps' (a non-`nil' value chooses the first of the two
  553. expansions).
  554.  
  555.    These commands are used to control abbrev expansion:
  556.  
  557. `M-''
  558.      Separate a prefix from a following abbrev to be expanded
  559.      (`abbrev-prefix-mark').
  560.  
  561. `C-x a e'
  562.      Expand the abbrev before point (`expand-abbrev').  This is
  563.      effective even when Abbrev mode is not enabled.
  564.  
  565. `M-x expand-region-abbrevs'
  566.      Expand some or all abbrevs found in the region.
  567.  
  568.    You may wish to expand an abbrev with a prefix attached; for example,
  569. if `cnst' expands into `construction', you might want to use it to
  570. enter `reconstruction'.  It does not work to type `recnst', because
  571. that is not necessarily a defined abbrev.  What you can do is use the
  572. command `M-'' (`abbrev-prefix-mark') in between the prefix `re' and the
  573. abbrev `cnst'.  First, insert `re'.  Then type `M-''; this inserts a
  574. hyphen in the buffer to indicate that it has done its work.  Then
  575. insert the abbrev `cnst'; the buffer now contains `re-cnst'.  Now
  576. insert a non-word character to expand the abbrev `cnst' into
  577. `construction'.  This expansion step also deletes the hyphen that
  578. indicated `M-'' had been used.  The result is the desired
  579. `reconstruction'.
  580.  
  581.    If you actually want the text of the abbrev in the buffer, rather
  582. than its expansion, you can accomplish this by inserting the following
  583. punctuation with `C-q'.  Thus, `foo C-q ,' leaves `foo,' in the buffer.
  584.  
  585.    If you expand an abbrev by mistake, you can undo the expansion and
  586. bring back the abbrev itself by typing `C-_' to undo (*note Undo::.).
  587. This also undoes the insertion of the non-word character that expanded
  588. the abbrev.  If the result you want is the terminating non-word
  589. character plus the unexpanded abbrev, you must reinsert the terminating
  590. character, quoting it with `C-q'.
  591.  
  592.    `M-x expand-region-abbrevs' searches through the region for defined
  593. abbrevs, and for each one found offers to replace it with its expansion.
  594. This command is useful if you have typed in text using abbrevs but
  595. forgot to turn on Abbrev mode first.  It may also be useful together
  596. with a special set of abbrev definitions for making several global
  597. replacements at once.  This command is effective even if Abbrev mode is
  598. not enabled.
  599.  
  600.    Expanding an abbrev runs the hook `pre-abbrev-expand-hook' (*note
  601. Hooks::.).
  602.  
  603. 
  604. File: emacs,  Node: Editing Abbrevs,  Next: Saving Abbrevs,  Prev: Expanding Abbrevs,  Up: Abbrevs
  605.  
  606. Examining and Editing Abbrevs
  607. =============================
  608.  
  609. `M-x list-abbrevs'
  610.      Display a list of all abbrev definitions.
  611.  
  612. `M-x edit-abbrevs'
  613.      Edit a list of abbrevs; you can add, alter or remove definitions.
  614.  
  615.    The output from `M-x list-abbrevs' looks like this:
  616.  
  617.      (lisp-mode-abbrev-table)
  618.      "dk"           0    "define-key"
  619.      (global-abbrev-table)
  620.      "dfn"           0    "definition"
  621.  
  622. (Some blank lines of no semantic significance, and some other abbrev
  623. tables, have been omitted.)
  624.  
  625.    A line containing a name in parentheses is the header for abbrevs in
  626. a particular abbrev table; `global-abbrev-table' contains all the global
  627. abbrevs, and the other abbrev tables that are named after major modes
  628. contain the mode-specific abbrevs.
  629.  
  630.    Within each abbrev table, each nonblank line defines one abbrev.  The
  631. word at the beginning of the line is the abbrev.  The number that
  632. follows is the number of times the abbrev has been expanded.  Emacs
  633. keeps track of this to help you see which abbrevs you actually use, so
  634. that you can eliminate those that you don't use often.  The string at
  635. the end of the line is the expansion.
  636.  
  637.    `M-x edit-abbrevs' allows you to add, change or kill abbrev
  638. definitions by editing a list of them in an Emacs buffer.  The list has
  639. the same format described above.  The buffer of abbrevs is called
  640. `*Abbrevs*', and is in Edit-Abbrevs mode.  Type `C-c C-c' in this
  641. buffer to install the abbrev definitions as specified in the
  642. buffer--and delete any abbrev definitions not listed.
  643.  
  644.    The command `edit-abbrevs' is actually the same as `list-abbrevs'
  645. except that it selects the buffer `*Abbrevs*' whereas `list-abbrevs'
  646. merely displays it in another window.
  647.  
  648. 
  649. File: emacs,  Node: Saving Abbrevs,  Next: Dynamic Abbrevs,  Prev: Editing Abbrevs,  Up: Abbrevs
  650.  
  651. Saving Abbrevs
  652. ==============
  653.  
  654.    These commands allow you to keep abbrev definitions between editing
  655. sessions.
  656.  
  657. `M-x write-abbrev-file RET FILE RET'
  658.      Write a file FILE describing all defined abbrevs.
  659.  
  660. `M-x read-abbrev-file RET FILE RET'
  661.      Read the file FILE and define abbrevs as specified therein.
  662.  
  663. `M-x quietly-read-abbrev-file RET FILE RET'
  664.      Similar but do not display a message about what is going on.
  665.  
  666. `M-x define-abbrevs'
  667.      Define abbrevs from definitions in current buffer.
  668.  
  669. `M-x insert-abbrevs'
  670.      Insert all abbrevs and their expansions into current buffer.
  671.  
  672.    `M-x write-abbrev-file' reads a file name using the minibuffer and
  673. then writes a description of all current abbrev definitions into that
  674. file.  This is used to save abbrev definitions for use in a later
  675. session.  The text stored in the file is a series of Lisp expressions
  676. that, when executed, define the same abbrevs that you currently have.
  677.  
  678.    `M-x read-abbrev-file' reads a file name using the minibuffer and
  679. then reads the file, defining abbrevs according to the contents of the
  680. file.  `M-x quietly-read-abbrev-file' is the same except that it does
  681. not display a message in the echo area saying that it is doing its
  682. work; it is actually useful primarily in the `.emacs' file.  If an
  683. empty argument is given to either of these functions, they use the file
  684. name specified in the variable `abbrev-file-name', which is by default
  685. `"~/.abbrev_defs"'.
  686.  
  687.    Emacs will offer to save abbrevs automatically if you have changed
  688. any of them, whenever it offers to save all files (for `C-x s' or `C-x
  689. C-c').  This feature can be inhibited by setting the variable
  690. `save-abbrevs' to `nil'.
  691.  
  692.    The commands `M-x insert-abbrevs' and `M-x define-abbrevs' are
  693. similar to the previous commands but work on text in an Emacs buffer.
  694. `M-x insert-abbrevs' inserts text into the current buffer before point,
  695. describing all current abbrev definitions; `M-x define-abbrevs' parses
  696. the entire current buffer and defines abbrevs accordingly.
  697.  
  698. 
  699. File: emacs,  Node: Dynamic Abbrevs,  Prev: Saving Abbrevs,  Up: Abbrevs
  700.  
  701. Dynamic Abbrev Expansion
  702. ========================
  703.  
  704.    The abbrev facility described above operates automatically as you
  705. insert text, but all abbrevs must be defined explicitly.  By contrast,
  706. "dynamic abbrevs" allow the meanings of abbrevs to be determined
  707. automatically from the contents of the buffer, but dynamic abbrev
  708. expansion happens only when you request it explicitly.
  709.  
  710. `M-/'
  711.      Expand the word in the buffer before point as a "dynamic abbrev",
  712.      by searching in the buffer for words starting with that
  713.      abbreviation (`dabbrev-expand').
  714.  
  715. `C-M-/'
  716.      Complete the word before point as a dynamic abbrev
  717.      (`dabbrev-completion').
  718.  
  719.    For example, if the buffer contains `does this follow ' and you type
  720. `f o M-/', the effect is to insert `follow' because that is the last
  721. word in the buffer that starts with `fo'.  A numeric argument to `M-/'
  722. says to take the second, third, etc. distinct expansion found looking
  723. backward from point.  Repeating `M-/' searches for an alternative
  724. expansion by looking farther back.  After considering the entire buffer
  725. before point, it searches the text after point.  After searching all of
  726. the current buffer, `M-/' searches other buffers.
  727.  
  728.    A negative argument to `M-/', as in `C-u - M-/', says to search
  729. first for expansions after point, and second for expansions before
  730. point.  If you repeat the `M-/' to look for another expansion, do not
  731. specify an argument.  This tries all the expansions after point and
  732. then the expansions before point.
  733.  
  734.    After you have expanded a dynamic abbrev, you can copy additional
  735. words that follow the expansion in its original context.  Simply type
  736. `SPC M-/' for each word you want to copy.  The spacing and punctuation
  737. between words is copied along with the words.
  738.  
  739.    In shell scripts and makefiles, a variable name is sometimes prefixed
  740. with `$' and sometimes not.  Major modes for this kind of text can
  741. customize dynamic abbreviation to handle optional prefixes by setting
  742. the variable `dabbrev-abbrev-skip-leading-regexp'.  Its value should be
  743. a regular expression that matches the optional prefix that dynamic
  744. abbreviation should ignore.
  745.  
  746.    The command `C-M-/' (`dabbrev-completion') performs completion of a
  747. dynamic abbreviation.  Instead of trying the possible expansions one by
  748. one, it finds all of them, then inserts the text that they have in
  749. common.  If they have nothing in common, `C-M-/' displays a list of
  750. completions, from which you can select a choice in the usual manner.
  751. *Note Completion::.
  752.  
  753.    Dynamic abbrev expansion is completely independent of Abbrev mode;
  754. the expansion of a word with `M-/' is completely independent of whether
  755. it has a definition as an ordinary abbrev.
  756.  
  757. 
  758. File: emacs,  Node: Picture,  Next: Sending Mail,  Prev: Abbrevs,  Up: Top
  759.  
  760. Editing Pictures
  761. ****************
  762.  
  763.    To edit a picture made out of text characters (for example, a picture
  764. of the division of a register into fields, as a comment in a program),
  765. use the command `M-x edit-picture' to enter Picture mode.
  766.  
  767.    In Picture mode, editing is based on the "quarter-plane" model of
  768. text, according to which the text characters lie studded on an area that
  769. stretches infinitely far to the right and downward.  The concept of the
  770. end of a line does not exist in this model; the most you can say is
  771. where the last nonblank character on the line is found.
  772.  
  773.    Of course, Emacs really always considers text as a sequence of
  774. characters, and lines really do have ends.  But Picture mode replaces
  775. the most frequently-used commands with variants that simulate the
  776. quarter-plane model of text.  They do this by inserting spaces or by
  777. converting tabs to spaces.
  778.  
  779.    Most of the basic editing commands of Emacs are redefined by Picture
  780. mode to do essentially the same thing but in a quarter-plane way.  In
  781. addition, Picture mode defines various keys starting with the `C-c'
  782. prefix to run special picture editing commands.
  783.  
  784.    One of these keys, `C-c C-c', is pretty important.  Often a picture
  785. is part of a larger file that is usually edited in some other major
  786. mode.  `M-x edit-picture' records the name of the previous major mode
  787. so you can use the `C-c C-c' command (`picture-mode-exit') later to go
  788. back to that mode.  `C-c C-c' also deletes spaces from the ends of
  789. lines, unless given a numeric argument.
  790.  
  791.    The special commands of Picture mode all work in other modes
  792. (provided the `picture' library is loaded), but are not bound to keys
  793. except in Picture mode.  The descriptions below talk of moving "one
  794. column" and so on, but all the picture mode commands handle numeric
  795. arguments as their normal equivalents do.
  796.  
  797.    Turning on Picture mode runs the hook `picture-mode-hook' (*note
  798. Hooks::.).
  799.  
  800. * Menu:
  801.  
  802. * Basic Picture::         Basic concepts and simple commands of Picture Mode.
  803. * Insert in Picture::     Controlling direction of cursor motion
  804.                             after "self-inserting" characters.
  805. * Tabs in Picture::       Various features for tab stops and indentation.
  806. * Rectangles in Picture:: Clearing and superimposing rectangles.
  807.  
  808. 
  809. File: emacs,  Node: Basic Picture,  Next: Insert in Picture,  Prev: Picture,  Up: Picture
  810.  
  811. Basic Editing in Picture Mode
  812. =============================
  813.  
  814.    Most keys do the same thing in Picture mode that they usually do, but
  815. do it in a quarter-plane style.  For example, `C-f' is rebound to run
  816. `picture-forward-column', a command which moves point one column to the
  817. right, inserting a space if necessary so that the actual end of the
  818. line makes no difference.  `C-b' is rebound to run
  819. `picture-backward-column', which always moves point left one column,
  820. converting a tab to multiple spaces if necessary.  `C-n' and `C-p' are
  821. rebound to run `picture-move-down' and `picture-move-up', which can
  822. either insert spaces or convert tabs as necessary to make sure that
  823. point stays in exactly the same column.  `C-e' runs
  824. `picture-end-of-line', which moves to after the last nonblank character
  825. on the line.  There is no need to change `C-a', as the choice of screen
  826. model does not affect beginnings of lines.
  827.  
  828.    Insertion of text is adapted to the quarter-plane screen model
  829. through the use of Overwrite mode (*note Minor Modes::.).
  830. Self-inserting characters replace existing text, column by column,
  831. rather than pushing existing text to the right.  RET runs
  832. `picture-newline', which just moves to the beginning of the following
  833. line so that new text will replace that line.
  834.  
  835.    Picture mode provides erasure instead of deletion and killing of
  836. text.  DEL (`picture-backward-clear-column') replaces the preceding
  837. character with a space rather than removing it; this moves point
  838. backwards.  `C-d' (`picture-clear-column') replaces the next character
  839. or characters with spaces, but does not move point.  (If you want to
  840. clear characters to spaces and move forward over them, use SPC.)  `C-k'
  841. (`picture-clear-line') really kills the contents of lines, but does not
  842. delete the newlines from the buffer.
  843.  
  844.    To do actual insertion, you must use special commands.  `C-o'
  845. (`picture-open-line') creates a blank line after the current line; it
  846. never splits a line.  `C-M-o', `split-line', makes sense in Picture
  847. mode, so it is not changed.  LFD (`picture-duplicate-line') inserts
  848. below the current line another line with the same contents.
  849.  
  850.    To do actual deletion in Picture mode, use `C-w', `C-c C-d' (which
  851. is defined as `delete-char', as `C-d' is in other modes), or one of the
  852. picture rectangle commands (*note Rectangles in Picture::.).
  853.  
  854. 
  855. File: emacs,  Node: Insert in Picture,  Next: Tabs in Picture,  Prev: Basic Picture,  Up: Picture
  856.  
  857. Controlling Motion after Insert
  858. ===============================
  859.  
  860.    Since "self-inserting" characters in Picture mode overwrite and move
  861. point, there is no essential restriction on how point should be moved.
  862. Normally point moves right, but you can specify any of the eight
  863. orthogonal or diagonal directions for motion after a "self-inserting"
  864. character.  This is useful for drawing lines in the buffer.
  865.  
  866. `C-c <'
  867.      Move left after insertion (`picture-movement-left').
  868.  
  869. `C-c >'
  870.      Move right after insertion (`picture-movement-right').
  871.  
  872. `C-c ^'
  873.      Move up after insertion (`picture-movement-up').
  874.  
  875. `C-c .'
  876.      Move down after insertion (`picture-movement-down').
  877.  
  878. `C-c `'
  879.      Move up and left ("northwest") after insertion
  880.      (`picture-movement-nw').
  881.  
  882. `C-c ''
  883.      Move up and right ("northeast") after insertion
  884.      (`picture-movement-ne').
  885.  
  886. `C-c /'
  887.      Move down and left ("southwest") after insertion
  888.      (`picture-movement-sw').
  889.  
  890. `C-c \'
  891.      Move down and right ("southeast") after insertion
  892.      (`picture-movement-se').
  893.  
  894.    Two motion commands move based on the current Picture insertion
  895. direction.  The command `C-c C-f' (`picture-motion') moves in the same
  896. direction as motion after "insertion" currently does, while `C-c C-b'
  897. (`picture-motion-reverse') moves in the opposite direction.
  898.  
  899. 
  900. File: emacs,  Node: Tabs in Picture,  Next: Rectangles in Picture,  Prev: Insert in Picture,  Up: Picture
  901.  
  902. Picture Mode Tabs
  903. =================
  904.  
  905.    Two kinds of tab-like action are provided in Picture mode.  Use
  906. `M-TAB' (`picture-tab-search') for context-based tabbing.  With no
  907. argument, it moves to a point underneath the next "interesting"
  908. character that follows whitespace in the previous nonblank line.
  909. "Next" here means "appearing at a horizontal position greater than the
  910. one point starts out at."  With an argument, as in `C-u M-TAB', this
  911. command moves to the next such interesting character in the current
  912. line.  `M-TAB' does not change the text; it only moves point.
  913. "Interesting" characters are defined by the variable
  914. `picture-tab-chars', which should define a set of characters.  The
  915. syntax for this variable is like the syntax used inside of `[...]' in a
  916. regular expression--but without the `[' and the `]'.  Its default value
  917. is `"!-~"'.
  918.  
  919.    TAB itself runs `picture-tab', which operates based on the current
  920. tab stop settings; it is the Picture mode equivalent of
  921. `tab-to-tab-stop'.  Normally it just moves point, but with a numeric
  922. argument it clears the text that it moves over.
  923.  
  924.    The context-based and tab-stop-based forms of tabbing are brought
  925. together by the command `C-c TAB', `picture-set-tab-stops'.  This
  926. command sets the tab stops to the positions which `M-TAB' would
  927. consider significant in the current line.  The use of this command,
  928. together with TAB, can get the effect of context-based tabbing.  But
  929. `M-TAB' is more convenient in the cases where it is sufficient.
  930.  
  931. 
  932. File: emacs,  Node: Rectangles in Picture,  Prev: Tabs in Picture,  Up: Picture
  933.  
  934. Picture Mode Rectangle Commands
  935. ===============================
  936.  
  937.    Picture mode defines commands for working on rectangular pieces of
  938. the text in ways that fit with the quarter-plane model.  The standard
  939. rectangle commands may also be useful (*note Rectangles::.).
  940.  
  941. `C-c C-k'
  942.      Clear out the region-rectangle with spaces
  943.      (`picture-clear-rectangle').  With argument, delete the text.
  944.  
  945. `C-c C-w R'
  946.      Similar but save rectangle contents in register R first
  947.      (`picture-clear-rectangle-to-register').
  948.  
  949. `C-c C-y'
  950.      Copy last killed rectangle into the buffer by overwriting, with
  951.      upper left corner at point (`picture-yank-rectangle').  With
  952.      argument, insert instead.
  953.  
  954. `C-c C-x R'
  955.      Similar, but use the rectangle in register R
  956.      (`picture-yank-rectangle-from-register').
  957.  
  958.    The picture rectangle commands `C-c C-k' (`picture-clear-rectangle')
  959. and `C-c C-w' (`picture-clear-rectangle-to-register') differ from the
  960. standard rectangle commands in that they normally clear the rectangle
  961. instead of deleting it; this is analogous with the way `C-d' is changed
  962. in Picture mode.
  963.  
  964.    However, deletion of rectangles can be useful in Picture mode, so
  965. these commands delete the rectangle if given a numeric argument.  `C-c
  966. C-k' either with or without a numeric argument saves the rectangle for
  967. `C-c C-y'.
  968.  
  969.    The Picture mode commands for yanking rectangles differ from the
  970. standard ones in overwriting instead of inserting.  This is the same way
  971. that Picture mode insertion of other text differs from other modes.
  972. `C-c C-y' (`picture-yank-rectangle') inserts (by overwriting) the
  973. rectangle that was most recently killed, while `C-c C-x'
  974. (`picture-yank-rectangle-from-register') does likewise for the
  975. rectangle found in a specified register.
  976.  
  977. 
  978. File: emacs,  Node: Sending Mail,  Next: Rmail,  Prev: Picture,  Up: Top
  979.  
  980. Sending Mail
  981. ************
  982.  
  983.    To send a message in Emacs, you start by typing a command (`C-x m')
  984. to select and initialize the `*mail*' buffer.  Then you edit the text
  985. and headers of the message in this buffer, and type another command
  986. (`C-c C-s' or `C-c C-c') to send the message.
  987.  
  988. `C-x m'
  989.      Begin composing a message to send (`mail').
  990.  
  991. `C-x 4 m'
  992.      Likewise, but display the message in another window
  993.      (`mail-other-window').
  994.  
  995. `C-x 5 m'
  996.      Likewise, but make a new frame (`mail-other-frame').
  997.  
  998. `C-c C-s'
  999.      In Mail mode, send the message (`mail-send').
  1000.  
  1001. `C-c C-c'
  1002.      Send the message and bury the mail buffer (`mail-send-and-exit').
  1003.  
  1004.    The command `C-x m' (`mail') selects a buffer named `*mail*' and
  1005. initializes it with the skeleton of an outgoing message.  `C-x 4 m'
  1006. (`mail-other-window') selects the `*mail*' buffer in a different
  1007. window, leaving the previous current buffer visible.  `C-x 5 m'
  1008. (`mail-other-frame') creates a new frame to select the `*mail*' buffer.
  1009.  
  1010.    Because the mail composition buffer is an ordinary Emacs buffer, you
  1011. can switch to other buffers while in the middle of composing mail, and
  1012. switch back later (or never).  If you use the `C-x m' command again
  1013. when you have been composing another message but have not sent it, you
  1014. are asked to confirm before the old message is erased.  If you answer
  1015. `n', the `*mail*' buffer is left selected with its old contents, so you
  1016. can finish the old message and send it.  `C-u C-x m' is another way to
  1017. do this.  Sending the message marks the `*mail*' buffer "unmodified",
  1018. which avoids the need for confirmation when `C-x m' is next used.
  1019.  
  1020.    If you are composing a message in the `*mail*' buffer and want to
  1021. send another message before finishing the first, rename the `*mail*'
  1022. buffer using `M-x rename-uniquely' (*note Misc Buffer::.).  Then you
  1023. can use `C-x m' or its variants described above to make a new `*mail*'
  1024. buffer.  Once you've done that, you can work with each mail buffer
  1025. independently.
  1026.  
  1027. * Menu:
  1028.  
  1029. * Format: Mail Format.         Format of the mail being composed.
  1030. * Headers: Mail Headers.     Details of permitted mail header fields.
  1031. * Aliases: Mail Aliases.     Abbreviating and grouping mail addresses.
  1032. * Mode: Mail Mode.         Special commands for editing mail being composed.
  1033. * Spook: Distracting NSA.    How to distract the NSA's attention.
  1034.  
  1035. 
  1036. File: emacs,  Node: Mail Format,  Next: Mail Headers,  Up: Sending Mail
  1037.  
  1038. The Format of the Mail Buffer
  1039. =============================
  1040.  
  1041.    In addition to the "text" or "body", a message has "header fields"
  1042. which say who sent it, when, to whom, why, and so on.  Some header
  1043. fields such as the date and sender are created automatically after the
  1044. message is sent.  Others, such as the recipient names, must be
  1045. specified by you in order to send the message properly.
  1046.  
  1047.    Mail mode provides a few commands to help you edit some header
  1048. fields, and some are preinitialized in the buffer automatically at
  1049. times.  You can insert and edit header fields using ordinary editing
  1050. commands.
  1051.  
  1052.    The line in the buffer that says
  1053.  
  1054.      --text follows this line--
  1055.  
  1056. is a special delimiter that separates the headers you have specified
  1057. from the text.  Whatever follows this line is the text of the message;
  1058. the headers precede it.  The delimiter line itself does not appear in
  1059. the message actually sent.  The text used for the delimiter line is
  1060. controlled by the variable `mail-header-separator'.
  1061.  
  1062.    Here is an example of what the headers and text in the mail buffer
  1063. might look like.
  1064.  
  1065.      To: gnu@prep.ai.mit.edu
  1066.      CC: lungfish@spam.org, byob@spam.org
  1067.      Subject: The Emacs Manual
  1068.      --Text follows this line--
  1069.      Please ignore this message.
  1070.  
  1071.