home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / lib / emacs / info / emacs-9 (.txt) < prev    next >
GNU Info File  |  1992-10-30  |  50KB  |  872 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.49 from the
  2. input file emacs.texi.
  3.    This file documents the GNU Emacs editor.
  4.    Copyright (C) 1985, 1986, 1988, 1992 Richard M. Stallman.
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided also
  10. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  11. General Public License" are included exactly as in the original, and
  12. provided that the entire resulting derived work is distributed under the
  13. terms of a permission notice identical to this one.
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that the sections entitled "The GNU Manifesto",
  17. "Distribution" and "GNU General Public License" may be included in a
  18. translation approved by the author instead of in the original English.
  19. File: emacs,  Node: Lisp Eval,  Next: Lisp Debug,  Prev: Lisp Libraries,  Up: Compiling/Testing
  20. Evaluating Emacs-Lisp Expressions
  21. =================================
  22.    Lisp programs intended to be run in Emacs should be edited in
  23. Emacs-Lisp mode; this will happen automatically for file names ending
  24. in `.el'. By contrast, Lisp mode itself is used for editing Lisp
  25. programs intended for other Lisp systems.  Emacs-Lisp mode can be
  26. selected with the command `M-x emacs-lisp-mode'.
  27.    For testing of Lisp programs to run in Emacs, it is useful to be
  28. able to evaluate part of the program as it is found in the Emacs
  29. buffer.  For example, after changing the text of a Lisp function
  30. definition, evaluating the definition installs the change for future
  31. calls to the function. Evaluation of Lisp expressions is also useful in
  32. any kind of editing task for invoking noninteractive functions
  33. (functions that are not commands).
  34. `M-ESC'
  35.      Read a Lisp expression in the minibuffer, evaluate it, and print
  36.      the value in the minibuffer (`eval-expression').
  37. `C-x C-e'
  38.      Evaluate the Lisp expression before point, and print the value in
  39.      the minibuffer (`eval-last-sexp').
  40. `C-M-x'
  41.      Evaluate the defun containing or after point, and print the value
  42.      in the minibuffer (`eval-defun').
  43. `M-x eval-region'
  44.      Evaluate all the Lisp expressions in the region.
  45. `M-x eval-current-buffer'
  46.      Evaluate all the Lisp expressions in the buffer.
  47.    `M-ESC' (`eval-expression') is the most basic command for evaluating
  48. a Lisp expression interactively.  It reads the expression using the
  49. minibuffer, so you can execute any expression on a buffer regardless of
  50. what the buffer contains.  When the expression is evaluated, the current
  51. buffer is once again the buffer that was current when `M-ESC' was typed.
  52.    `M-ESC' can easily confuse users who do not understand it,
  53. especially on keyboards with autorepeat where it can result from holding
  54. down the ESC key for too long.  Therefore, `eval-expression' is
  55. normally a disabled command.  Attempting to use this command asks for
  56. confirmation and gives you the option of enabling it; once you enable
  57. the command, confirmation will no longer be required for it. *Note
  58. Disabling::.
  59.    In Emacs-Lisp mode, the key `C-M-x' is bound to the function
  60. `eval-defun', which parses the defun containing or following point as a
  61. Lisp expression and evaluates it.  The value is printed in the echo
  62. area.  This command is convenient for installing in the Lisp
  63. environment changes that you have just made in the text of a function
  64. definition.
  65.    The command `C-x C-e' (`eval-last-sexp') performs a similar job but
  66. is available in all major modes, not just Emacs-Lisp mode.  It finds
  67. the sexp before point, reads it as a Lisp expression, evaluates it, and
  68. prints the value in the echo area.  It is sometimes useful to type in an
  69. expression and then, with point still after it, type `C-x C-e'.
  70.    If `C-M-x' or `C-x C-e' is given a numeric argument, it prints the
  71. value by insertion into the current buffer at point, rather than in the
  72. echo area.  The argument value does not matter.
  73.    The most general command for evaluating Lisp expressions from a
  74. buffer is `eval-region'.  `M-x eval-region' parses the text of the
  75. region as one or more Lisp expressions, evaluating them one by one. 
  76. `M-x eval-current-buffer' is similar but evaluates the entire buffer. 
  77. This is a reasonable way to install the contents of a file of Lisp code
  78. that you are just ready to test.  After finding and fixing a bug, use
  79. `C-M-x' on each function that you change, to keep the Lisp world in
  80. step with the source file.
  81. File: emacs,  Node: Lisp Debug,  Next: Lisp Interaction,  Prev: Lisp Eval,  Up: Compiling/Testing
  82. The Emacs-Lisp Debugger
  83. =======================
  84.    GNU Emacs contains a debugger for Lisp programs executing inside it.
  85. This debugger is normally not used; many commands frequently get Lisp
  86. errors when invoked in inappropriate contexts (such as `C-f' at the end
  87. of the buffer) and it would be very unpleasant for that to enter a
  88. special debugging mode.  When you want to make Lisp errors invoke the
  89. debugger, you must set the variable `debug-on-error' to non-`nil'. 
  90. Quitting with `C-g' is not considered an error, and `debug-on-error'
  91. has no effect on the handling of `C-g'.  However, if you set
  92. `debug-on-quit' non-`nil', `C-g' will invoke the debugger. This can be
  93. useful for debugging an infinite loop; type `C-g' once the loop has had
  94. time to reach its steady state.  `debug-on-quit' has no effect on
  95. errors.
  96.    You can also cause the debugger to be entered when a specified
  97. function is called, or at a particular place in Lisp code.  Use `M-x
  98. debug-on-entry' with argument FUN-NAME to cause function FUN-NAME to
  99. enter the debugger as soon as it is called.  Use `M-x
  100. cancel-debug-on-entry' to make the function stop entering the debugger
  101. when called.  (Redefining the function also does this.)  To enter the
  102. debugger from some other place in Lisp code, you must insert the
  103. expression `(debug)' there and install the changed code with `C-M-x'. 
  104. *Note Lisp Eval::.
  105.    When the debugger is entered, it displays the previously selected
  106. buffer in one window and a buffer named `*Backtrace*' in another
  107. window.  The backtrace buffer contains one line for each level of Lisp
  108. function execution currently going on.  At the beginning of this buffer
  109. is a message describing the reason that the debugger was invoked (such
  110. as, what error message if it was invoked due to an error).
  111.    The backtrace buffer is read-only, and is in a special major mode,
  112. Backtrace mode, in which letters are defined as debugger commands.  The
  113. usual Emacs editing commands are available; you can switch windows to
  114. examine the buffer that was being edited at the time of the error, and
  115. you can also switch buffers, visit files, and do any other sort of
  116. editing. However, the debugger is a recursive editing level (*note
  117. Recursive Edit::.) and it is wise to go back to the backtrace buffer
  118. and exit the debugger officially when you don't want to use it any
  119. more.  Exiting the debugger kills the backtrace buffer.
  120.    The contents of the backtrace buffer show you the functions that are
  121. executing and the arguments that were given to them.  It has the
  122. additional purpose of allowing you to specify a stack frame by moving
  123. point to the line describing that frame.  The frame whose line point is
  124. on is considered the "current frame".  Some of the debugger commands
  125. operate on the current frame.  Debugger commands are mainly used for
  126. stepping through code an expression at a time.  Here is a list of them.
  127.      Exit the debugger and continue execution.  In most cases,
  128.      execution of the program continues as if the debugger had never
  129.      been entered (aside from the effect of any variables or data
  130.      structures you may have changed while inside the debugger).  This
  131.      includes entry to the debugger due to function entry or exit,
  132.      explicit invocation, quitting or certain errors.  Most errors
  133.      cannot be continued; trying to continue one of them causes the
  134.      same error to occur again.
  135.      Continue execution, but enter the debugger the next time a Lisp
  136.      function is called.  This allows you to step through the
  137.      subexpressions of an expression, seeing what values the
  138.      subexpressions compute and what else they do.
  139.      The stack frame made for the function call which enters the
  140.      debugger in this way will be flagged automatically for the
  141.      debugger to be called when the frame is exited.  You can use the
  142.      `u' command to cancel this flag.
  143.      Set up to enter the debugger when the current frame is exited. 
  144.      Frames that will invoke the debugger on exit are flagged with
  145.      stars.
  146.      Don't enter the debugger when the current frame is exited.  This
  147.      cancels a `b' command on that frame.
  148.      Read a Lisp expression in the minibuffer, evaluate it, and print
  149.      the value in the echo area.  This is the same as the command
  150.      `M-ESC', except that `e' is not normally disabled like `M-ESC'.
  151.      Terminate the program being debugged; return to top-level Emacs
  152.      command execution.
  153.      If the debugger was entered due to a `C-g' but you really want to
  154.      quit, not to debug, use the `q' command.
  155.      Return a value from the debugger.  The value is computed by
  156.      reading an expression with the minibuffer and evaluating it.
  157.      The value returned by the debugger makes a difference when the
  158.      debugger was invoked due to exit from a Lisp call frame (as
  159.      requested with `b'); then the value specified in the `r' command
  160.      is used as the value of that frame.
  161.      The debugger's return value also matters with many errors.  For
  162.      example, `wrong-type-argument' errors will use the debugger's
  163.      return value instead of the invalid argument; `no-catch' errors
  164.      will use the debugger value as a throw tag instead of the tag that
  165.      was not found. If an error was signaled by calling the Lisp
  166.      function `signal', the debugger's return value is returned as the
  167.      value of `signal'.
  168. File: emacs,  Node: Lisp Interaction,  Next: External Lisp,  Prev: Lisp Debug,  Up: Compiling/Testing
  169. Lisp Interaction Buffers
  170. ========================
  171.    The buffer `*scratch*' which is selected when Emacs starts up is
  172. provided for evaluating Lisp expressions interactively inside Emacs. 
  173. Both the expressions you evaluate and their output goes in the buffer.
  174.    The `*scratch*' buffer's major mode is Lisp Interaction mode, which
  175. is the same as Emacs-Lisp mode except for one command, LFD.  In
  176. Emacs-Lisp mode, LFD is an indentation command, as usual.  In Lisp
  177. Interaction mode, LFD is bound to `eval-print-last-sexp'.  This
  178. function reads the Lisp expression before point, evaluates it, and
  179. inserts the value in printed representation before point.
  180.    Thus, the way to use the `*scratch*' buffer is to insert Lisp
  181. expressions at the end, ending each one with LFD so that it will be
  182. evaluated. The result is a complete typescript of the expressions you
  183. have evaluated and their values.
  184.    The rationale for this feature is that Emacs must have a buffer when
  185. it starts up, but that buffer is not useful for editing files since a
  186. new buffer is made for every file that you visit.  The Lisp interpreter
  187. typescript is the most useful thing I can think of for the initial
  188. buffer to do.  `M-x lisp-interaction-mode' will put any buffer in Lisp
  189. Interaction mode.
  190. File: emacs,  Node: External Lisp,  Prev: Lisp Interaction,  Up: Compiling/Testing
  191. Running an External Lisp
  192. ========================
  193.    Emacs has facilities for running programs in other Lisp systems. 
  194. You can run a Lisp process as an inferior of Emacs, and pass
  195. expressions to it to be evaluated.  You can also pass changed function
  196. definitions directly from the Emacs buffers in which you edit the Lisp
  197. programs to the inferior Lisp process.
  198.    To run an inferior Lisp process, type `M-x run-lisp'.  This runs the
  199. program named `lisp', the same program you would run by typing `lisp'
  200. as a shell command, with both input and output going through an Emacs
  201. buffer named `*lisp*'.  That is to say, any "terminal output" from Lisp
  202. will go into the buffer, advancing point, and any "terminal input" for
  203. Lisp comes from text in the buffer.  To give input to Lisp, go to the
  204. end of the buffer and type the input, terminated by RET.  The `*lisp*'
  205. buffer is in Inferior Lisp mode, a mode which has all the special
  206. characteristics of Lisp mode and Shell mode (*note Shell Mode::.).
  207.    For the source files of programs to run in external Lisps, use Lisp
  208. mode. This mode can be selected with `M-x lisp-mode', and is used
  209. automatically for files whose names end in `.l' or `.lisp', as most Lisp
  210. systems usually expect.
  211.    When you edit a function in a Lisp program you are running, the
  212. easiest way to send the changed definition to the inferior Lisp process
  213. is the key `C-M-x'.  In Lisp mode, this runs the function
  214. `lisp-send-defun', which finds the defun around or following point and
  215. sends it as input to the Lisp process.  (Emacs can send input to any
  216. inferior process regardless of what buffer is current.)
  217.    Contrast the meanings of `C-M-x' in Lisp mode (for editing programs
  218. to be run in another Lisp system) and Emacs-Lisp mode (for editing Lisp
  219. programs to be run in Emacs): in both modes it has the effect of
  220. installing the function definition that point is in, but the way of
  221. doing so is different according to where the relevant Lisp environment
  222. is found. *Note Lisp Modes::.
  223. File: emacs,  Node: Abbrevs,  Next: Picture,  Prev: Compiling/Testing,  Up: Top
  224. Abbrevs
  225. *******
  226.    An "abbrev" is a word which "expands", if you insert it, into some
  227. different text.  Abbrevs are defined by the user to expand in specific
  228. ways.  For example, you might define `foo' as an abbrev expanding to
  229. `find outer otter'.  With this abbrev defined, you would be able to get
  230. `find outer otter ' into the buffer by typing `f o o SPC'.
  231.    Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
  232. Disabling Abbrev mode does not cause abbrev definitions to be forgotten,
  233. but they do not expand until Abbrev mode is enabled again.  The command
  234. `M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
  235. turns Abbrev mode on if the argument is positive, off otherwise. *Note
  236. Minor Modes::.  `abbrev-mode' is also a variable; Abbrev mode is on
  237. when the variable is non-`nil'.  The variable `abbrev-mode'
  238. automatically becomes local to the current buffer when it is set.
  239.    Abbrev definitions can be "mode-specific"--active only in one major
  240. mode.  Abbrevs can also have "global" definitions that are active in
  241. all major modes.  The same abbrev can have a global definition and
  242. various mode-specific definitions for different major modes.  A mode
  243. specific definition for the current major mode overrides a global
  244. definition.
  245.    Abbrevs can be defined interactively during the editing session. 
  246. Lists of abbrev definitions can also be saved in files and reloaded in
  247. later sessions.  Some users keep extensive lists of abbrevs that they
  248. load in every session.
  249.    A second kind of abbreviation facility is called the "dynamic
  250. expansion".  Dynamic abbrev expansion happens only when you give an
  251. explicit command and the result of the expansion depends only on the
  252. current contents of the buffer.  *Note Dynamic Abbrevs::.
  253. * Menu:
  254. * Defining Abbrevs::  Defining an abbrev, so it will expand when typed.
  255. * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
  256. * Editing Abbrevs::   Viewing or editing the entire list of defined abbrevs.
  257. * Saving Abbrevs::    Saving the entire list of abbrevs for another session.
  258. * Dynamic Abbrevs::   Abbreviations for words already in the buffer.
  259. File: emacs,  Node: Defining Abbrevs,  Next: Expanding Abbrevs,  Prev: Abbrevs,  Up: Abbrevs
  260. Defining Abbrevs
  261. ================
  262. `C-x +'
  263.      Define an abbrev to expand into some text before point
  264.      (`add-global-abbrev').
  265. `C-x C-a'
  266.      Similar, but define an abbrev available only in the current major
  267.      mode (`add-mode-abbrev').
  268. `C-x -'
  269.      Define a word in the buffer as an abbrev
  270.      (`inverse-add-global-abbrev').
  271. `C-x C-h'
  272.      Define a word in the buffer as a mode-specific abbrev
  273.      (`inverse-add-mode-abbrev').
  274. `M-x kill-all-abbrevs'
  275.      After this command, there are no abbrev definitions in effect.
  276.    The usual way to define an abbrev is to enter the text you want the
  277. abbrev to expand to, position point after it, and type `C-x +'
  278. (`add-global-abbrev').  This reads the abbrev itself using the
  279. minibuffer, and then defines it as an abbrev for one or more words
  280. before point.  Use a numeric argument to say how many words before
  281. point should be taken as the expansion.  For example, to define the
  282. abbrev `foo' as mentioned above, insert the text `find outer otter' and
  283. then type `C-u 3 C-x + f o o RET'.
  284.    An argument of zero to `C-x +' means to use the contents of the
  285. region as the expansion of the abbrev being defined.
  286.    The command `C-x C-a' (`add-mode-abbrev') is similar, but defines a
  287. mode-specific abbrev.  Mode specific abbrevs are active only in a
  288. particular major mode.  `C-x C-a' defines an abbrev for the major mode
  289. in effect at the time `C-x C-a' is typed.  The arguments work the same
  290. as for `C-x +'.
  291.    If the text of the abbrev you want is already in the buffer instead
  292. of the expansion, use command `C-x -' (`inverse-add-global-abbrev')
  293. instead of `C-x +', or use `C-x C-h' (`inverse-add-mode-abbrev')
  294. instead of `C-x C-a'.  These commands are called "inverse" because they
  295. invert the meaning of the argument found in the buffer and the argument
  296. read using the minibuffer.
  297.    To change the definition of an abbrev, just add the new definition. 
  298. You will be asked to confirm if the abbrev has a prior definition.  To
  299. remove an abbrev definition, give a negative argument to `C-x +' or `C-x
  300. C-a'.  You must choose the command to specify whether to kill a global
  301. definition or a mode-specific definition for the current mode, since
  302. those two definitions are independent for one abbrev.
  303.    `M-x kill-all-abbrevs' removes all the abbrev definitions there are.
  304. File: emacs,  Node: Expanding Abbrevs,  Next: Editing Abbrevs,  Prev: Defining Abbrevs,  Up: Abbrevs
  305. Controlling Abbrev Expansion
  306. ============================
  307.    An abbrev expands whenever it is present in the buffer just before
  308. point and a self-inserting punctuation character (SPC, comma, etc.) is
  309. typed.  Most often the way an abbrev is used is to insert the abbrev
  310. followed by punctuation.
  311.    Abbrev expansion preserves case; thus, `foo' expands into `find
  312. outer otter'; `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
  313. OTTER' or `Find Outer Otter' according to the variable
  314. `abbrev-all-caps' (a non-`nil' value chooses the first of the two
  315. expansions).
  316.    These two commands are used to control abbrev expansion:
  317. `M-''
  318.      Separate a prefix from a following abbrev to be expanded
  319.      (`abbrev-prefix-mark').
  320. `C-x ''
  321.      Expand the abbrev before point (`expand-abbrev'). This is
  322.      effective even when Abbrev mode is not enabled.
  323. `M-x unexpand-abbrev'
  324.      Undo last abbrev expansion.
  325. `M-x expand-region-abbrevs'
  326.      Expand some or all abbrevs found in the region.
  327.    You may wish to expand an abbrev with a prefix attached; for
  328. example, if `cnst' expands into `construction', you might want to use
  329. it to enter `reconstruction'.  It does not work to type `recnst',
  330. because that is not necessarily a defined abbrev.  What does work is to
  331. use the command `M-'' (`abbrev-prefix-mark') in between the prefix `re'
  332. and the abbrev `cnst'.  First, insert `re'.  Then type `M-''; this
  333. inserts a minus sign in the buffer to indicate that it has done its
  334. work.  Then insert the abbrev `cnst'; the buffer now contains
  335. `re-cnst'.  Now insert a punctuation character to expand the abbrev
  336. `cnst' into `construction'.  The minus sign is deleted at this point,
  337. because `M-'' left word for this to be done.  The resulting text is the
  338. desired `reconstruction'.
  339.    If you actually want the text of the abbrev in the buffer, rather
  340. than its expansion, you can accomplish this by inserting the following
  341. punctuation with `C-q'.  Thus, `foo C-q -' leaves `foo-' in the buffer.
  342.    If you expand an abbrev by mistake, you can undo the expansion
  343. (replace the expansion by the original abbrev text) with `M-x
  344. unexpand-abbrev'. `C-_' (`undo') can also be used to undo the
  345. expansion; but first it will undo the insertion of the following
  346. punctuation character!
  347.    `M-x expand-region-abbrevs' searches through the region for defined
  348. abbrevs, and for each one found offers to replace it with its expansion.
  349. This command is useful if you have typed in text using abbrevs but
  350. forgot to turn on Abbrev mode first.  It may also be useful together
  351. with a special set of abbrev definitions for making several global
  352. replacements at once.  This command is effective even if Abbrev mode is
  353. not enabled.
  354. File: emacs,  Node: Editing Abbrevs,  Next: Saving Abbrevs,  Prev: Expanding Abbrevs,  Up: Abbrevs
  355. Examining and Editing Abbrevs
  356. =============================
  357. `M-x list-abbrevs'
  358.      Print a list of all abbrev definitions.
  359. `M-x edit-abbrevs'
  360.      Edit a list of abbrevs; you can add, alter or remove definitions.
  361.    The output from `M-x list-abbrevs' looks like this:
  362.      (lisp-mode-abbrev-table)
  363.      "dk"           0    "define-key"
  364.      (global-abbrev-table)
  365.      "dfn"           0    "definition"
  366. (Some blank lines of no semantic significance, and some other abbrev
  367. tables, have been omitted.)
  368.    A line containing a name in parentheses is the header for abbrevs in
  369. a particular abbrev table; `global-abbrev-table' contains all the global
  370. abbrevs, and the other abbrev tables that are named after major modes
  371. contain the mode-specific abbrevs.
  372.    Within each abbrev table, each nonblank line defines one abbrev.  The
  373. word at the beginning is the abbrev.  The number that appears is the
  374. number of times the abbrev has been expanded.  Emacs keeps track of
  375. this to help you see which abbrevs you actually use, in case you decide
  376. to eliminate those that you don't use often.  The string at the end of
  377. the line is the expansion.
  378.    `M-x edit-abbrevs' allows you to add, change or kill abbrev
  379. definitions by editing a list of them in an Emacs buffer.  The list has
  380. the same format described above.  The buffer of abbrevs is called
  381. `*Abbrevs*', and is in Edit-Abbrevs mode.  This mode redefines the key
  382. `C-c C-c' to install the abbrev definitions as specified in the buffer.
  383.  The command that does this is `edit-abbrevs-redefine'.  Any abbrevs
  384. not described in the buffer are eliminated when this is done.
  385.    `edit-abbrevs' is actually the same as `list-abbrevs' except that it
  386. selects the buffer `*Abbrevs*' whereas `list-abbrevs' merely displays
  387. it in another window.
  388. File: emacs,  Node: Saving Abbrevs,  Next: Dynamic Abbrevs,  Prev: Editing Abbrevs,  Up: Abbrevs
  389. Saving Abbrevs
  390. ==============
  391.    These commands allow you to keep abbrev definitions between editing
  392. sessions.
  393. `M-x write-abbrev-file'
  394.      Write a file describing all defined abbrevs.
  395. `M-x read-abbrev-file'
  396.      Read such a file and define abbrevs as specified there.
  397. `M-x quietly-read-abbrev-file'
  398.      Similar but do not display a message about what is going on.
  399. `M-x define-abbrevs'
  400.      Define abbrevs from buffer.
  401. `M-x insert-abbrevs'
  402.      Insert all abbrevs and their expansions into the buffer.
  403.    `M-x write-abbrev-file' reads a file name using the minibuffer and
  404. writes a description of all current abbrev definitions into that file. 
  405. The text stored in the file looks like the output of `M-x list-abbrevs'.
  406. This is used to save abbrev definitions for use in a later session.
  407.    `M-x read-abbrev-file' reads a file name using the minibuffer and
  408. reads the file, defining abbrevs according to the contents of the file.
  409. `M-x quietly-read-abbrev-file' is the same except that it does not
  410. display a message in the echo area saying that it is doing its work; it
  411. is actually useful primarily in the `.emacs' file.  If an empty
  412. argument is given to either of these functions, the file name used is
  413. the value of the variable `abbrev-file-name', which is by default
  414. `"~/.abbrev_defs"'.
  415.    Emacs will offer to save abbrevs automatically if you have changed
  416. any of them, whenever it offers to save all files (for `C-x s' or `C-x
  417. C-c').  This feature can be inhibited by setting the variable
  418. `save-abbrevs' to `nil'.
  419.    The commands `M-x insert-abbrevs' and `M-x define-abbrevs' are
  420. similar to the previous commands but work on text in an Emacs buffer.
  421. `M-x insert-abbrevs' inserts text into the current buffer before point,
  422. describing all current abbrev definitions; `M-x define-abbrevs' parses
  423. the entire current buffer and defines abbrevs accordingly.
  424. File: emacs,  Node: Dynamic Abbrevs,  Prev: Saving Abbrevs,  Up: Abbrevs
  425. Dynamic Abbrev Expansion
  426. ========================
  427.    The abbrev facility described above operates automatically as you
  428. insert text, but all abbrevs must be defined explicitly.  By contrast,
  429. "dynamic abbrevs" allow the meanings of abbrevs to be determined
  430. automatically from the contents of the buffer, but dynamic abbrev
  431. expansion happens only when you request it explicitly.
  432. `M-/'
  433.      Expand the word in the buffer before point as a "dynamic abbrev",
  434.      by searching in the buffer for words starting with that
  435.      abbreviation (`dabbrev-expand').
  436.    For example, if the buffer contains `does this follow ' and you type
  437. `f o M-/', the effect is to insert `follow' because that is the last
  438. word in the buffer that starts with `fo'.  A numeric argument to `M-/'
  439. says to take the second, third, etc. distinct expansion found looking
  440. backward from point.  Repeating `M-/' searches for an alternative
  441. expansion by looking farther back.  After the part of the buffer
  442. preceding point has been considered, the part of the buffer after point
  443. is searched.
  444.    Dynamic abbrev expansion is completely independent of Abbrev mode;
  445. the expansion of a word with `M-/' is completely independent of whether
  446. it has a definition as an ordinary abbrev.
  447. File: emacs,  Node: Picture,  Next: Sending Mail,  Prev: Abbrevs,  Up: Top
  448. Editing Pictures
  449. ****************
  450.    If you want to create a picture made out of text characters (for
  451. example, a picture of the division of a register into fields, as a
  452. comment in a program), use the command `edit-picture' to enter Picture
  453. mode.
  454.    In Picture mode, editing is based on the "quarter-plane" model of
  455. text, according to which the text characters lie studded on an area that
  456. stretches infinitely far to the right and downward.  The concept of the
  457. end of a line does not exist in this model; the most you can say is
  458. where the last nonblank character on the line is found.
  459.    Of course, Emacs really always considers text as a sequence of
  460. characters, and lines really do have ends.  But in Picture mode most
  461. frequently-used keys are rebound to commands that simulate the
  462. quarter-plane model of text.  They do this by inserting spaces or by
  463. converting tabs to spaces.
  464.    Most of the basic editing commands of Emacs are redefined by Picture
  465. mode to do essentially the same thing but in a quarter-plane way.  In
  466. addition, Picture mode defines various keys starting with the `C-c'
  467. prefix to run special picture editing commands.
  468.    One of these keys, `C-c C-c', is pretty important.  Often a picture
  469. is part of a larger file that is usually edited in some other major
  470. mode. `M-x edit-picture' records the name of the previous major mode,
  471. and then you can use the `C-c C-c' command (`picture-mode-exit') to
  472. restore that mode.  `C-c C-c' also deletes spaces from the ends of
  473. lines, unless given a numeric argument.
  474.    The commands used in Picture mode all work in other modes (provided
  475. the `picture' library is loaded), but are not bound to keys except in
  476. Picture mode.  Note that the descriptions below talk of moving "one
  477. column" and so on, but all the picture mode commands handle numeric
  478. arguments as their normal equivalents do.
  479.    Turning on Picture mode calls the value of the variable
  480. `picture-mode-hook' as a function, with no arguments, if that value
  481. exists and is non-`nil'.
  482. * Menu:
  483. * Basic Picture::         Basic concepts and simple commands of Picture Mode.
  484. * Insert in Picture::     Controlling direction of cursor motion
  485.                            after "self-inserting" characters.
  486. * Tabs in Picture::       Various features for tab stops and indentation.
  487. * Rectangles in Picture:: Clearing and superimposing rectangles.
  488. File: emacs,  Node: Basic Picture,  Next: Insert in Picture,  Prev: Picture,  Up: Picture
  489. Basic Editing in Picture Mode
  490. =============================
  491.    Most keys do the same thing in Picture mode that they usually do,
  492. but do it in a quarter-plane style.  For example, `C-f' is rebound to
  493. run `picture-forward-column', which is defined to move point one column
  494. to the right, by inserting a space if necessary, so that the actual end
  495. of the line makes no difference.  `C-b' is rebound to run
  496. `picture-backward-column', which always moves point left one column,
  497. converting a tab to multiple spaces if necessary.  `C-n' and `C-p' are
  498. rebound to run `picture-move-down' and `picture-move-up', which can
  499. either insert spaces or convert tabs as necessary to make sure that
  500. point stays in exactly the same column.  `C-e' runs
  501. `picture-end-of-line', which moves to after the last nonblank character
  502. on the line.  There is no need to change `C-a', as the choice of screen
  503. model does not affect beginnings of lines.
  504.    Insertion of text is adapted to the quarter-plane screen model
  505. through the use of Overwrite mode (*note Minor Modes::.). 
  506. Self-inserting characters replace existing text, column by column,
  507. rather than pushing existing text to the right.  RET runs
  508. `picture-newline', which just moves to the beginning of the following
  509. line so that new text will replace that line.
  510.    Deletion and killing of text are replaced with erasure.  DEL
  511. (`picture-backward-clear-column') replaces the preceding character with
  512. a space rather than removing it.  `C-d' (`picture-clear-column') does
  513. the same thing in a forward direction. `C-k' (`picture-clear-line')
  514. really kills the contents of lines, but does not ever remove the
  515. newlines from the buffer.
  516.    To do actual insertion, you must use special commands.  `C-o'
  517. (`picture-open-line') still creates a blank line, but does so after the
  518. current line; it never splits a line.  `C-M-o', `split-line', makes
  519. sense in Picture mode, so it is not changed.  LFD
  520. (`picture-duplicate-line') inserts below the current line another line
  521. with the same contents.
  522.    Real deletion can be done with `C-w', or with `C-c C-d' (which is
  523. defined as `delete-char', as `C-d' is in other modes), or with one of
  524. the picture rectangle commands (*note Rectangles in Picture::.).
  525. File: emacs,  Node: Insert in Picture,  Next: Tabs in Picture,  Prev: Basic Picture,  Up: Picture
  526. Controlling Motion after Insert
  527. ===============================
  528.    Since "self-inserting" characters in Picture mode just overwrite and
  529. move point, there is no essential restriction on how point should be
  530. moved. Normally point moves right, but you can specify any of the eight
  531. orthogonal or diagonal directions for motion after a "self-inserting"
  532. character. This is useful for drawing lines in the buffer.
  533. `C-c <'
  534.      Move left after insertion (`picture-movement-left').
  535. `C-c >'
  536.      Move right after insertion (`picture-movement-right').
  537. `C-c ^'
  538.      Move up after insertion (`picture-movement-up').
  539. `C-c .'
  540.      Move down after insertion (`picture-movement-down').
  541. `C-c `'
  542.      Move up and left ("northwest") after insertion
  543.      (`picture-movement-nw').
  544. `C-c ''
  545.      Move up and right ("northeast") after insertion
  546.      (`picture-movement-ne').
  547. `C-c /'
  548.      Move down and left ("southwest") after insertion
  549.      (`picture-movement-sw').
  550. `C-c \'
  551.      Move down and right ("southeast") after insertion
  552.      (`picture-movement-se').
  553.    Two motion commands move based on the current Picture insertion
  554. direction.  The command `C-c C-f' (`picture-motion') moves in the same
  555. direction as motion after "insertion" currently does, while `C-c C-b'
  556. (`picture-motion-reverse') moves in the opposite direction.
  557. File: emacs,  Node: Tabs in Picture,  Next: Rectangles in Picture,  Prev: Insert in Picture,  Up: Picture
  558. Picture Mode Tabs
  559. =================
  560.    Two kinds of tab-like action are provided in Picture mode.
  561. Context-based tabbing is done with `M-TAB' (`picture-tab-search'). 
  562. With no argument, it moves to a point underneath the next "interesting"
  563. character that follows whitespace in the previous nonblank line. 
  564. "Next" here means "appearing at a horizontal position greater than the
  565. one point starts out at".  With an argument, as in `C-u M-TAB', this
  566. command moves to the next such interesting character in the current
  567. line.  `M-TAB' does not change the text; it only moves point. 
  568. "Interesting" characters are defined by the variable
  569. `picture-tab-chars', which contains a string whose characters are all
  570. considered interesting.  Its default value is `"!-~"'.
  571.    TAB itself runs `picture-tab', which operates based on the current
  572. tab stop settings; it is the Picture mode equivalent of
  573. `tab-to-tab-stop'.  Normally it just moves point, but with a numeric
  574. argument it clears the text that it moves over.
  575.    The context-based and tab-stop-based forms of tabbing are brought
  576. together by the command `C-c TAB', `picture-set-tab-stops'. This
  577. command sets the tab stops to the positions which `M-TAB' would
  578. consider significant in the current line.  The use of this command,
  579. together with TAB, can get the effect of context-based tabbing.  But
  580. `M-TAB' is more convenient in the cases where it is sufficient.
  581. File: emacs,  Node: Rectangles in Picture,  Prev: Tabs in Picture,  Up: Picture
  582. Picture Mode Rectangle Commands
  583. ===============================
  584.    Picture mode defines commands for working on rectangular pieces of
  585. the text in ways that fit with the quarter-plane model.  The standard
  586. rectangle commands may also be useful (*note Rectangles::.).
  587. `C-c C-k'
  588.      Clear out the region-rectangle (`picture-clear-rectangle').  With
  589.      argument, kill it.
  590. `C-c C-w R'
  591.      Similar but save rectangle contents in register R first
  592.      (`picture-clear-rectangle-to-register').
  593. `C-c C-y'
  594.      Copy last killed rectangle into the buffer by overwriting, with
  595.      upper left corner at point (`picture-yank-rectangle').  With
  596.      argument, insert instead.
  597. `C-c C-x R'
  598.      Similar, but use the rectangle in register R
  599.      (`picture-yank-rectangle-from-register').
  600.    The picture rectangle commands `C-c C-k' (`picture-clear-rectangle')
  601. and `C-c C-w' (`picture-clear-rectangle-to-register') differ from the
  602. standard rectangle commands in that they normally clear the rectangle
  603. instead of deleting it; this is analogous with the way `C-d' is changed
  604. in Picture mode.
  605.    However, deletion of rectangles can be useful in Picture mode, so
  606. these commands delete the rectangle if given a numeric argument.
  607.    The Picture mode commands for yanking rectangles differ from the
  608. standard ones in overwriting instead of inserting.  This is the same
  609. way that Picture mode insertion of other text is different from other
  610. modes. `C-c C-y' (`picture-yank-rectangle') inserts (by overwriting) the
  611. rectangle that was most recently killed, while `C-c C-x'
  612. (`picture-yank-rectangle-from-register') does likewise for the
  613. rectangle found in a specified register.
  614. File: emacs,  Node: Sending Mail,  Next: Rmail,  Prev: Picture,  Up: Top
  615. Sending Mail
  616. ************
  617.    To send a message in Emacs, you start by typing a command (`C-x m')
  618. to select and initialize the `*mail*' buffer.  Then you edit the text
  619. and headers of the message in this buffer, and type another command
  620. (`C-c C-c') to send the message.
  621. `C-x m'
  622.      Begin composing a message to send (`mail').
  623. `C-x 4 m'
  624.      Likewise, but display the message in another window
  625.      (`mail-other-window').
  626. `C-c C-c'
  627.      In Mail mode, send the message and switch to another buffer
  628.      (`mail-send-and-exit').
  629.    The command `C-x m' (`mail') selects a buffer named `*mail*' and
  630. initializes it with the skeleton of an outgoing message. `C-x 4 m'
  631. (`mail-other-window') selects the `*mail*' buffer in a different
  632. window, leaving the previous current buffer visible.
  633.    Because the mail composition buffer is an ordinary Emacs buffer, you
  634. can switch to other buffers while in the middle of composing mail, and
  635. switch back later (or never).  If you use the `C-x m' command again
  636. when you have been composing another message but have not sent it, you
  637. are asked to confirm before the old message is erased.  If you answer
  638. `n', the `*mail*' buffer is left selected with its old contents, so you
  639. can finish the old message and send it.  `C-u C-x m' is another way to
  640. do this.  Sending the message marks the `*mail*' buffer "unmodified",
  641. which avoids the need for confirmation when `C-x m' is next used.
  642.    If you are composing a message in the `*mail*' buffer and want to
  643. send another message before finishing the first, rename the `*mail*'
  644. buffer using `M-x rename-buffer' (*note Misc Buffer::.).
  645. * Menu:
  646. * Format: Mail Format.    Format of the mail being composed.
  647. * Headers: Mail Headers.  Details of allowed mail header fields.
  648. * Mode: Mail Mode.        Special commands for editing mail being composed.
  649. File: emacs,  Node: Mail Format,  Next: Mail Headers,  Prev: Sending Mail,  Up: Sending Mail
  650. The Format of the Mail Buffer
  651. =============================
  652.    In addition to the "text" or contents, a message has "header fields"
  653. which say who sent it, when, to whom, why, and so on.  Some header
  654. fields such as the date and sender are created automatically after the
  655. message is sent.  Others, such as the recipient names, must be
  656. specified by you in order to send the message properly.
  657.    Mail mode provides a few commands to help you edit some header
  658. fields, and some are preinitialized in the buffer automatically at
  659. times.  You can insert or edit any header fields using ordinary editing
  660. commands.
  661.    The line in the buffer that says
  662.      --text follows this line--
  663. is a special delimiter that separates the headers you have specified
  664. from the text.  Whatever follows this line is the text of the message;
  665. the headers precede it.  The delimiter line itself does not appear in
  666. the message actually sent.  The text used for the delimiter line is
  667. controlled by the variable `mail-header-separator'.
  668.    Here is an example of what the headers and text in the `*mail*'
  669. buffer might look like.
  670.      To: rms@mc
  671.      CC: mly@mc, rg@oz
  672.      Subject: The Emacs Manual
  673.      --Text follows this line--
  674.      Please ignore this message.
  675. File: emacs,  Node: Mail Headers,  Next: Mail Mode,  Prev: Mail Format,  Up: Sending Mail
  676. Mail Header Fields
  677. ==================
  678.    There are several header fields you can use in the `*mail*' buffer.
  679. Each header field starts with a field name at the beginning of a line,
  680. terminated by a colon.  It does not matter whether you use upper or
  681. lower case in the field name.  After the colon and optional whitespace
  682. comes the contents of the field.
  683.      This field contains the mailing addresses to which the message is
  684.      addressed.
  685. `Subject'
  686.      The contents of the `Subject' field should be a piece of text that
  687.      says what the message is about.  The reason `Subject' fields are
  688.      useful is that most mail-reading programs can provide a summary of
  689.      messages, listing the subject of each message but not its text.
  690.      This field contains additional mailing addresses to send the
  691.      message to, but whose readers should not regard the message as
  692.      addressed to them.
  693. `BCC'
  694.      This field contains additional mailing addresses to send the
  695.      message to, but which should not appear in the header of the
  696.      message actually sent.
  697. `FCC'
  698.      This field contains the name of one file (in Unix mail file
  699.      format) to which a copy of the message should be appended when the
  700.      message is sent.
  701. `From'
  702.      Use the `From' field to say who you are, when the account you are
  703.      using to send the mail is not your own.  The contents of the
  704.      `From' field should be a valid mailing address, since replies will
  705.      normally go there.
  706. `Reply-To'
  707.      Use the `Reply-to' field to direct replies to a different address,
  708.      not your own.  There is no difference between `From' and
  709.      `Reply-to' in their effect on where replies go, but they convey a
  710.      different meaning to the human who reads the message.
  711.      If you set the variable `mail-default-reply-to' to a non-`nil'
  712.      value, then every message you begin to edit will have a `Reply-to'
  713.      field whose contents are the value of the variable.
  714. `In-Reply-To'
  715.      This field contains a piece of text describing a message you are
  716.      replying to.  Some mail systems can use this information to
  717.      correlate related pieces of mail.  Normally this field is filled
  718.      in by Rmail when you are replying to a message in Rmail, and you
  719.      never need to think about it (*note Rmail::.).
  720.    The `To', `CC', `BCC' and `FCC' fields can appear any number of
  721. times, to specify many places to send the message.
  722.    The `To', `CC', and `BCC' fields can have continuation lines.  All
  723. the lines starting with whitespace, following the line on which the
  724. field starts, are considered part of the field.  For example,
  725.      To: foo@here, this@there,
  726.        me@gnu.cambridge.mass.usa.earth.spiral3281
  727.    If you have a `~/.mailrc' file, Emacs will scan it for mail aliases
  728. the first time you try to send mail in an Emacs session.  Aliases found
  729. in the `To', `CC', and `BCC' fields will be expanded where appropriate.
  730.    If the variable `mail-archive-file-name' is non-`nil', it should be a
  731. string naming a file; every time you start to edit a message to send,
  732. an `FCC' field will be put in for that file.  Unless you remove the
  733. `FCC' field, every message will be written into that file when it is
  734. sent.
  735. File: emacs,  Node: Mail Mode,  Prev: Mail Headers,  Up: Sending Mail
  736. Mail Mode
  737. =========
  738.    The major mode used in the `*mail*' buffer is Mail mode, which is
  739. much like Text mode except that various special commands are provided on
  740. the `C-c' prefix.  These commands all have to do specifically with
  741. editing or sending the message.
  742. `C-c C-s'
  743.      Send the message, and leave the `*mail*' buffer selected
  744.      (`mail-send').
  745. `C-c C-c'
  746.      Send the message, and select some other buffer
  747.      (`mail-send-and-exit').
  748. `C-c C-f C-t'
  749.      Move to the `To' header field, creating one if there is none
  750.      (`mail-to').
  751. `C-c C-f C-s'
  752.      Move to the `Subject' header field, creating one if there is none
  753.      (`mail-subject').
  754. `C-c C-f C-c'
  755.      Move to the `CC' header field, creating one if there is none
  756.      (`mail-cc').
  757. `C-c C-w'
  758.      Insert the file `~/.signature' at the end of the message text
  759.      (`mail-signature').
  760. `C-c C-y'
  761.      Yank the selected message from Rmail (`mail-yank-original'). This
  762.      command does nothing unless your command to start sending a
  763.      message was issued with Rmail.
  764. `C-c C-q'
  765.      Fill all paragraphs of yanked old messages, each individually
  766.      (`mail-fill-yanked-message').
  767.    There are two ways to send the message.  `C-c C-s' (`mail-send')
  768. sends the message and marks the `*mail*' buffer unmodified, but leaves
  769. that buffer selected so that you can modify the message (perhaps with
  770. new recipients) and send it again.  `C-c C-c' (`mail-send-and-exit')
  771. sends and then deletes the window (if there is another window) or
  772. switches to another buffer.  It puts the `*mail*' buffer at the lowest
  773. priority for automatic reselection, since you are finished with using
  774. it.  This is the usual way to send the message.
  775.    Mail mode provides some other special commands that are useful for
  776. editing the headers and text of the message before you send it.  There
  777. are three commands defined to move point to particular header fields,
  778. all based on the prefix `C-c C-f' (`C-f' is for "field").  They are
  779. `C-c C-f C-t' (`mail-to') to move to the `To' field, `C-c C-f C-s'
  780. (`mail-subject') for the `Subject' field, and `C-c C-f C-c' (`mail-cc')
  781. for the `CC' field.  These fields have special motion commands because
  782. they are the most common fields for the user to want to edit.
  783.    `C-c C-w' (`mail-signature') adds a standard piece text at the end
  784. of the message to say more about who you are.  The text comes from the
  785. file `.signature' in your home directory.
  786.    When mail sending is invoked from the Rmail mail reader using an
  787. Rmail command, `C-c C-y' can be used inside the `*mail*' buffer to
  788. insert the text of the message you are replying to.  Normally it
  789. indents each line of that message four spaces and eliminates most
  790. header fields.  A numeric argument specifies the number of spaces to
  791. indent.  An argument of just `C-u' says not to indent at all and not to
  792. eliminate anything. `C-c C-y' always uses the current message from the
  793. `RMAIL' buffer, so you can insert several old messages by selecting one
  794. in `RMAIL', switching to `*mail*' and yanking it, then switching back to
  795. `RMAIL' to select another.
  796.    After using `C-c C-y', you can type the command `C-c C-q'
  797. (`mail-fill-yanked-message') to fill the paragraphs of the yanked old
  798. message or messages.  One use of `C-c C-q' fills all such paragraphs,
  799. each one separately.
  800.    Turning on Mail mode (which `C-x m' does automatically) calls the
  801. value of `text-mode-hook', if it is not void or `nil', and then calls
  802. the value of `mail-mode-hook' if that is not void or `nil'.  Aside from
  803. these, the `mail' command runs `mail-setup-hook' whenever it
  804. initializes the `*mail*' buffer for editing a message.
  805. File: emacs,  Node: Rmail,  Next: Recursive Edit,  Prev: Sending Mail,  Up: Top
  806. Reading Mail with Rmail
  807. ***********************
  808.    Rmail is an Emacs subsystem for reading and disposing of mail that
  809. you receive.  Rmail stores mail messages in files called "Rmail files".
  810.  Reading the message in an Rmail file is done in a special major mode,
  811. Rmail mode, which redefines most letters to run commands for managing
  812. mail.  To enter Rmail, type `M-x rmail'.  This reads your primary mail
  813. file, merges new mail in from your inboxes, displays the first new
  814. message, and lets you begin reading.
  815.    Using Rmail in the simplest fashion, you have one Rmail file,
  816. `~/RMAIL', in which all of your mail is saved.  It is called your
  817. "primary mail file".  In more sophisticated usage, you can copy
  818. messages into other Rmail files and then edit those files with Rmail.
  819.    Rmail displays only one message at a time.  It is called the "current
  820. message".  Rmail mode's special commands can do such things as move to
  821. another message, delete the message, copy the message into another
  822. file, or send a reply.
  823.    Within the Rmail file, messages are arranged sequentially in order
  824. of receipt.  They are also assigned consecutive integers as their
  825. "message numbers".  The number of the current message is displayed in
  826. Rmail's mode line, followed by the total number of messages in the
  827. file.  You can move to a message by specifying its message number using
  828. the `j' key (*note Rmail Motion::.).
  829.    Following the usual conventions of Emacs, changes in an Rmail file
  830. become permanent only when the file is saved.  You can do this with `s'
  831. (`rmail-save'), which also expunges deleted messages from the file
  832. first (*note Rmail Deletion::.).  To save the file without expunging,
  833. use `C-x C-s'.  Rmail saves the Rmail file spontaneously when moving new
  834. mail from an inbox file (*note Rmail Inbox::.).
  835.    You can exit Rmail with `q' (`rmail-quit'); this expunges and saves
  836. the Rmail file and then switches to another buffer.  But there is no
  837. need to `exit' formally.  If you switch from Rmail to editing in other
  838. buffers, and never happen to switch back, you have exited.  Just make
  839. sure to save the Rmail file eventually (like any other file you have
  840. changed).  `C-x s' is a good enough way to do this (*note Saving::.).
  841. * Menu:
  842. * Scroll: Rmail Scrolling.   Scrolling through a message.
  843. * Motion: Rmail Motion.      Moving to another message.
  844. * Deletion: Rmail Deletion.  Deleting and expunging messages.
  845. * Inbox: Rmail Inbox.        How mail gets into the Rmail file.
  846. * Files: Rmail Files.        Using multiple Rmail files.
  847. * Output: Rmail Output.         Copying message out to files.
  848. * Labels: Rmail Labels.      Classifying messages by labeling them.
  849. * Summary: Rmail Summary.    Summaries show brief info on many messages.
  850. * Reply: Rmail Reply.        Sending replies to messages you are viewing.
  851. * Editing: Rmail Editing.    Editing message text and headers in Rmail.
  852. * Digest: Rmail Digest.      Extracting the messages from a digest message.
  853. File: emacs,  Node: Rmail Scrolling,  Next: Rmail Motion,  Prev: Rmail,  Up: Rmail
  854. Scrolling Within a Message
  855. ==========================
  856.    When Rmail displays a message that does not fit on the screen, it is
  857. necessary to scroll through it.  This could be done with `C-v', `M-v'
  858. and `M-<', but in Rmail scrolling is so frequent that it deserves to be
  859. easier to type.
  860. `SPC'
  861.      Scroll forward (`scroll-up').
  862. `DEL'
  863.      Scroll backward (`scroll-down').
  864.      Scroll to start of message (`rmail-beginning-of-message').
  865.    Since the most common thing to do while reading a message is to
  866. scroll through it by screenfuls, Rmail makes SPC and DEL synonyms of
  867. `C-v' (`scroll-up') and `M-v' (`scroll-down').
  868.    The command `.' (`rmail-beginning-of-message') scrolls back to the
  869. beginning of the selected message.  This is not quite the same as `M-<':
  870. for one thing, it does not set the mark; for another, it resets the
  871. buffer boundaries to the current message if you have changed them.
  872.