home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / emacs / info / emacs-3 (.txt) < prev    next >
GNU Info File  |  1992-10-30  |  51KB  |  925 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: Repetition,  Prev: Completion,  Up: Minibuffer
  20. Repeating Minibuffer Commands
  21. =============================
  22.    Every command that uses the minibuffer at least once is recorded on a
  23. special history list, together with the values of the minibuffer
  24. arguments, so that you can repeat the command easily.  In particular,
  25. every use of `Meta-x' is recorded, since `M-x' uses the minibuffer to
  26. read the command name.
  27. `C-x ESC'
  28.      Re-execute a recent minibuffer command `repeat-complex-command').
  29. `M-p'
  30.      Within `C-x ESC', move to the previous recorded command
  31.      (`previous-complex-command').
  32. `M-n'
  33.      Within `C-x ESC', move to the next (more recent) recorded command
  34.      (`next-complex-command').
  35. `M-x list-command-history'
  36.      Display the entire command history, showing all the commands `C-x
  37.      ESC' can repeat, most recent first.
  38.    `C-x ESC' is used to re-execute a recent minibuffer-using command. 
  39. With no argument, it repeats the last such command.  A numeric argument
  40. specifies which command to repeat; 1 means the last one, and larger
  41. numbers specify earlier ones.
  42.    `C-x ESC' works by turning the previous command into a Lisp
  43. expression and then entering a minibuffer initialized with the text for
  44. that expression.  If you type just RET, the command is repeated as
  45. before.  You can also change the command by editing the Lisp expression.
  46. Whatever expression you finally submit is what will be executed.  The
  47. repeated command is added to the front of the command history unless it
  48. is identical to the most recently executed command already there.
  49.    Even if you don't understand Lisp syntax, it will probably be obvious
  50. which command is displayed for repetition.  If you do not change the
  51. text, you can be sure it will repeat exactly as before.
  52.    Once inside the minibuffer for `C-x ESC', if the command shown to
  53. you is not the one you want to repeat, you can move around the list of
  54. previous commands using `M-n' and `M-p'.  `M-p' replaces the contents
  55. of the minibuffer with the next earlier recorded command, and `M-n'
  56. replaces them with the next later command.  After finding the desired
  57. previous command, you can edit its expression as usual and then
  58. resubmit it by typing RET as usual.  Any editing you have done on the
  59. command to be repeated is lost if you use `M-n' or `M-p'.
  60.    `M-p' is more useful than `M-n', since more often you will initially
  61. request to repeat the most recent command and then decide to repeat an
  62. older one instead.  These keys are specially defined within `C-x ESC'
  63. to run the commands `previous-complex-command' and
  64. `next-complex-command'.
  65.    The list of previous minibuffer-using commands is stored as a Lisp
  66. list in the variable `command-history'.  Each element is a Lisp
  67. expression which describes one command and its arguments.  Lisp
  68. programs can reexecute a command by feeding the corresponding
  69. `command-history' element to `eval'.
  70. File: emacs,  Node: M-x,  Next: Help,  Prev: Minibuffer,  Up: Top
  71. Running Commands by Name
  72. ************************
  73.    The Emacs commands that are used often or that must be quick to type
  74. are bound to keys--short sequences of characters--for convenient use. 
  75. Other Emacs commands that do not need to be brief are not bound to
  76. keys; to run them, you must refer to them by name.
  77.    A command name is, by convention, made up of one or more words,
  78. separated by hyphens; for example, `auto-fill-mode' or `manual-entry'. 
  79. The use of English words makes the command name easier to remember than
  80. a key made up of obscure characters, even though it is more characters
  81. to type. Any command can be run by name, even if it is also runnable by
  82. keys.
  83.    The way to run a command by name is to start with `M-x', type the
  84. command name, and finish it with RET.  `M-x' uses the minibuffer to
  85. read the command name.  RET exits the minibuffer and runs the command.
  86.    Emacs uses the minibuffer for reading input for many different
  87. purposes; on this occasion, the string `M-x' is displayed at the
  88. beginning of the minibuffer as a "prompt" to remind you that your input
  89. should be the name of a command to be run.  *Note Minibuffer::, for
  90. full information on the features of the minibuffer.
  91.    You can use completion to enter the command name.  For example, the
  92. command `forward-char' can be invoked by name by typing
  93.      M-x forward-char RET
  94.      M-x fo TAB c RET
  95. Note that `forward-char' is the same command that you invoke with the
  96. key `C-f'.  Any command (interactively callable function) defined in
  97. Emacs can be called by its name using `M-x' whether or not any keys are
  98. bound to it.
  99.    If you type `C-g' while the command name is being read, you cancel
  100. the `M-x' command and get out of the minibuffer, ending up at top level.
  101.    To pass a numeric argument to the command you are invoking with
  102. `M-x', specify the numeric argument before the `M-x'.  `M-x' passes the
  103. argument along to the function which it calls.  The argument value
  104. appears in the prompt while the command name is being read.
  105.    Normally, when describing a command that is run by name, we omit the
  106. RET that is needed to terminate the name.  Thus we might speak of `M-x
  107. auto-fill-mode' rather than `M-x auto-fill-mode RET'. We mention the
  108. RET only when there is a need to emphasize its presence, such as when
  109. describing a sequence of input that contains a command name and
  110. arguments that follow it.
  111.    `M-x' is defined to run the command `execute-extended-command',
  112. which is responsible for reading the name of another command and
  113. invoking it.
  114. File: emacs,  Node: Help,  Next: Mark,  Prev: M-x,  Up: Top
  115.    Emacs provides extensive help features which revolve around a single
  116. character, `C-h'.  `C-h' is a prefix key that is used only for
  117. documentation-printing commands.  The characters that you can type after
  118. `C-h' are called "help options".  One help option is `C-h'; that is how
  119. you ask for help about using `C-h'.
  120.    `C-h C-h' prints a list of the possible help options, and then asks
  121. you to go ahead and type the option.  It prompts with a string
  122.      A B C F I K L M N S T V W C-c C-d C-n C-w.  Type C-h again for more help:
  123. and you should type one of those characters.
  124.    Typing a third `C-h' displays a description of what the options mean;
  125. it still waits for you to type an option.  To cancel, type `C-g'.
  126.    Here is a summary of the defined help commands.
  127. `C-h a STRING RET'
  128.      Display a list of commands whose names contain STRING
  129.      (`command-apropos').
  130. `C-h b'
  131.      Display a table of all key bindings in effect now; local bindings
  132.      of the current major mode first, followed by all global bindings
  133.      (`describe-bindings').
  134. `C-h c KEY'
  135.      Print the name of the command that KEY runs
  136.      (`describe-key-briefly'). `c' is for `character'.  For more
  137.      extensive information on KEY, use `C-h k'.
  138. `C-h f FUNCTION RET'
  139.      Display documentation on the Lisp function named FUNCTION
  140.      (`describe-function').  Note that commands are Lisp functions, so
  141.      a command name may be used.
  142. `C-h i'
  143.      Run Info, the program for browsing documentation files (`info').
  144.      The complete Emacs manual is available on-line in Info.
  145. `C-h k KEY'
  146.      Display name and documentation of the command KEY runs
  147.      (`describe-key').
  148. `C-h l'
  149.      Display a description of the last 100 characters you typed
  150.      (`view-lossage').
  151. `C-h m'
  152.      Display documentation of the current major mode (`describe-mode').
  153. `C-h n'
  154.      Display documentation of Emacs changes, most recent first
  155.      (`view-emacs-news').
  156. `C-h s'
  157.      Display current contents of the syntax table, plus an explanation
  158.      of what they mean (`describe-syntax').
  159. `C-h t'
  160.      Display the Emacs tutorial (`help-with-tutorial').
  161. `C-h v VAR RET'
  162.      Display the documentation of the Lisp variable VAR
  163.      (`describe-variable').
  164. `C-h w COMMAND RET'
  165.      Print which keys run the command named COMMAND (`where-is').
  166. Documentation for a Key
  167. =======================
  168.    The most basic `C-h' options are `C-h c' (`describe-key-briefly')
  169. and `C-h k' (`describe-key'). `C-h c KEY' prints in the echo area the
  170. name of the command that KEY is bound to.  For example, `C-h c C-f'
  171. prints `forward-char'.  Since command names are chosen to describe what
  172. the command does, this is a good way to get a very brief description of
  173. what KEY does.
  174.    `C-h k KEY' is similar but gives more information.  It displays the
  175. documentation string of the command KEY is bound to as well as its
  176. name.  This is too big for the echo area, so a window is used for the
  177. display.
  178. Help by Command or Variable Name
  179. ================================
  180.    `C-h f' (`describe-function') reads the name of a Lisp function
  181. using the minibuffer, then displays that function's documentation string
  182. in a window.  Since commands are Lisp functions, you can use this to get
  183. the documentation of a command that is known by name.  For example,
  184.      C-h f auto-fill-mode RET
  185. displays the documentation of `auto-fill-mode'.  This is the only way
  186. to see the documentation of a command that is not bound to any key (one
  187. which you would normally call using `M-x').
  188.    `C-h f' is also useful for Lisp functions that you are planning to
  189. use in a Lisp program.  For example, if you have just written the code
  190. `(make-vector len)' and want to be sure that you are using
  191. `make-vector' properly, type `C-h f make-vector RET'.  Because `C-h f'
  192. allows all function names, not just command names, you may find that
  193. some of your favorite abbreviations that work in `M-x' don't work in
  194. `C-h f'.  An abbreviation may be unique among command names yet fail to
  195. be unique when other function names are allowed.
  196.    The function name for `C-h f' to describe has a default which is
  197. used if you type RET leaving the minibuffer empty.  The default is the
  198. function called by the innermost Lisp expression in the buffer around
  199. point, provided that is a valid, defined Lisp function name.  For
  200. example, if point is located following the text `(make-vector (car x)',
  201. the innermost list containing point is the one that starts with
  202. `(make-vector', so the default is to describe the function
  203. `make-vector'.
  204.    `C-h f' is often useful just to verify that you have the right
  205. spelling for the function name.  If `C-h f' mentions a default in the
  206. prompt, you have typed the name of a defined Lisp function.  If that
  207. tells you what you want to know, just type `C-g' to cancel the `C-h f'
  208. command and go on editing.
  209.    `C-h w COMMAND RET' tells you what keys are bound to COMMAND.  It
  210. prints a list of the keys in the echo area. Alternatively, it says that
  211. the command is not on any keys, which implies that you must use `M-x'
  212. to call it.
  213.    `C-h v' (`describe-variable') is like `C-h f' but describes Lisp
  214. variables instead of Lisp functions.  Its default is the Lisp symbol
  215. around or before point, but only if that is the name of a known Lisp
  216. variable.  *Note Variables::.
  217. Apropos
  218. =======
  219.    A more sophisticated sort of question to ask is, "What are the
  220. commands for working with files?"  For this, type `C-h a file RET',
  221. which displays a list of all command names that contain `file', such as
  222. `copy-file', `find-file', and so on.  With each command name appears a
  223. brief description of how to use the command, and what keys you can
  224. currently invoke it with.  For example, it would say that you can
  225. invoke `find-file' by typing `C-x C-f'.  The `a' in `C-h a' stands for
  226. `Apropos'; `C-h a' runs the Lisp function `command-apropos'.
  227.    Because `C-h a' looks only for functions whose names contain the
  228. string which you specify, you must use ingenuity in choosing the string.
  229. If you are looking for commands for killing backwards and `C-h a
  230. kill-backwards RET' doesn't reveal any, don't give up.  Try just
  231. `kill', or just `backwards', or just `back'.  Be persistent. Pretend
  232. you are playing Adventure.  Also note that you can use a regular
  233. expression as the argument (*note Regexps::.).
  234.    Here is a set of arguments to give to `C-h a' that covers many
  235. classes of Emacs commands, since there are strong conventions for naming
  236. the standard Emacs commands.  By giving you a feel for the naming
  237. conventions, this set should also serve to aid you in developing a
  238. technique for picking `apropos' strings.
  239.      char, line, word, sentence, paragraph, region, page, sexp, list,
  240.      defun, buffer, screen, window, file, dir, register, mode,
  241.      beginning, end, forward, backward, next, previous, up, down,
  242.      search, goto, kill, delete, mark, insert, yank, fill, indent, case,
  243.      change, set, what, list, find, view, describe.
  244.    To list all Lisp symbols that contain a match for a regexp, not just
  245. the ones that are defined as commands, use the command `M-x apropos'
  246. instead of `C-h a'.
  247. Other Help Commands
  248. ===================
  249.    `C-h i' (`info') runs the Info program, which is used for browsing
  250. through structured documentation files.  The entire Emacs manual is
  251. available within Info.  Eventually all the documentation of the GNU
  252. system will be available.  Type `h' after entering Info to run a
  253. tutorial on using Info.
  254.    If something surprising happens, and you are not sure what commands
  255. you typed, use `C-h l' (`view-lossage').  `C-h l' prints the last 100
  256. command characters you typed in.  If you see commands that you don't
  257. know, you can use `C-h c' to find out what they do.
  258.    Emacs has several major modes, each of which redefines a few keys and
  259. makes a few other changes in how editing works.  `C-h m'
  260. (`describe-mode') prints documentation on the current major mode, which
  261. normally describes all the commands that are changed in this mode.
  262.    `C-h b' (`describe-bindings') and `C-h s' (`describe-syntax')
  263. present other information about the current Emacs mode.  `C-h b'
  264. displays a list of all the key bindings now in effect; the local
  265. bindings of the current major mode first, followed by the global
  266. bindings (*note Key Bindings::.).  `C-h s' displays the contents of the
  267. syntax table, with explanations of each character's syntax (*note
  268. Syntax::.).
  269.    The other `C-h' options display various files of useful information.
  270.  `C-h C-w' displays the full details on the complete absence of
  271. warranty for GNU Emacs.  `C-h n' (`view-emacs-news') displays the file
  272. `emacs/etc/NEWS', which contains documentation on Emacs changes
  273. arranged chronologically.  `C-h t' (`help-with-tutorial') displays the
  274. learn-by-doing Emacs tutorial. `C-h C-c' (`describe-copying') displays
  275. the file `emacs/etc/COPYING', which tells you the conditions you must
  276. obey in distributing copies of Emacs.  `C-h C-d'
  277. (`describe-distribution') displays another file named
  278. `emacs/etc/DISTRIB', which tells you how you can order a copy of the
  279. latest version of Emacs.
  280. File: emacs,  Node: Mark,  Next: Killing,  Prev: Help,  Up: Top
  281. The Mark and the Region
  282. ***********************
  283.    There are many Emacs commands which operate on an arbitrary
  284. contiguous part of the current buffer.  To specify the text for such a
  285. command to operate on, you set the "mark" at one end of it, and move
  286. point to the other end.  The text between point and the mark is called
  287. the "region". You can move point or the mark to adjust the boundaries
  288. of the region.  It doesn't matter which one is set first
  289. chronologically, or which one comes earlier in the text.
  290.    Once the mark has been set, it remains until it is set again at
  291. another place.  The mark remains fixed with respect to the preceding
  292. character if text is inserted or deleted in the buffer.  Each Emacs
  293. buffer has its own mark, so that when you return to a buffer that had
  294. been selected previously, it has the same mark it had before.
  295.    Many commands that insert text, such as `C-y' (`yank') and `M-x
  296. insert-buffer', position the mark at one end of the inserted text--the
  297. opposite end from where point is positioned, so that the region
  298. contains the text just inserted.
  299.    Aside from delimiting the region, the mark is also useful for
  300. remembering a spot that you may want to go back to.  To make this
  301. feature more useful, Emacs remembers 16 previous locations of the mark,
  302. in the `mark ring'.
  303. * Menu:
  304. * Setting Mark::    Commands to set the mark.
  305. * Using Region::    Summary of ways to operate on contents of the region.
  306. * Marking Objects::    Commands to put region around textual units.
  307. * Mark Ring::   Previous mark positions saved so you can go back there.
  308. File: emacs,  Node: Setting Mark,  Next: Using Region,  Prev: Mark,  Up: Mark
  309. Setting the Mark
  310. ================
  311.    Here are some commands for setting the mark:
  312. `C-SPC'
  313.      Set the mark where point is (`set-mark-command').
  314. `C-@'
  315.      The same.
  316. `C-x C-x'
  317.      Interchange mark and point (`exchange-point-and-mark').
  318.    For example, if you wish to convert part of the buffer to all
  319. upper-case, you can use the `C-x C-u' (`upcase-region') command, which
  320. operates on the text in the region.  You can first go to the beginning
  321. of the text to be capitalized, type `C-SPC' to put the mark there, move
  322. to the end, and then type `C-x C-u'.  Or, you can set the mark at the
  323. end of the text, move to the beginning, and then type `C-x C-u'.  Most
  324. commands that operate on the text in the region have the word `region'
  325. in their names.
  326.    The most common way to set the mark is with the `C-SPC' command
  327. (`set-mark-command').  This sets the mark where point is.  Then you can
  328. move point away, leaving the mark behind.  It is actually incorrect to
  329. speak of the character `C-SPC'; there is no such character.  When you
  330. type SPC while holding down CTRL, what you get on most terminals is the
  331. character `C-@'.  This is the key actually bound to `set-mark-command'.
  332.  But unless you are unlucky enough to have a terminal where typing
  333. `C-SPC' does not produce `C-@', you might as well think of this
  334. character as `C-SPC'.
  335.    Since terminals have only one cursor, there is no way for Emacs to
  336. show you where the mark is located.  You have to remember.  The usual
  337. solution to this problem is to set the mark and then use it soon,
  338. before you forget where it is.  But you can see where the mark is with
  339. the command `C-x C-x' (`exchange-point-and-mark') which puts the mark
  340. where point was and point where the mark was.  The extent of the region
  341. is unchanged, but the cursor and point are now at the previous location
  342. of the mark.
  343.    `C-x C-x' is also useful when you are satisfied with the location of
  344. point but want to move the mark; do `C-x C-x' to put point there and
  345. then you can move it.  A second use of `C-x C-x', if necessary, puts
  346. the mark at the new location with point back at its original location.
  347. File: emacs,  Node: Using Region,  Next: Marking Objects,  Prev: Setting Mark,  Up: Mark
  348. Operating on the Region
  349. =======================
  350.    Once you have created an active region, you can do many things to
  351. the text in it:
  352.    * Kill it with `C-w' (*note Killing::.).
  353.    * Save it in a register with `C-x x' (*note Registers::.).
  354.    * Save it in a buffer or a file (*note Accumulating Text::.).
  355.    * Convert case with `C-x C-l' or `C-x C-u'
  356.      (*note Case::.).
  357.    * Evaluate it as Lisp code with `M-x eval-region' (*note Lisp
  358.      Eval::.).
  359.    * Fill it as text with `M-g' (*note Filling::.).
  360.    * Print hardcopy with `M-x print-region' (*note Hardcopy::.).
  361.    * Indent it with `C-x TAB' or `C-M-\'
  362.      (*note Indentation::.).
  363. File: emacs,  Node: Marking Objects,  Next: Mark Ring,  Prev: Using Region,  Up: Mark
  364. Commands to Mark Textual Objects
  365. ================================
  366.    There are commands for placing point and the mark around a textual
  367. object such as a word, list, paragraph or page.
  368. `M-@'
  369.      Set mark after end of next word (`mark-word').  This command and
  370.      the following one do not move point.
  371. `C-M-@'
  372.      Set mark after end of next Lisp expression (`mark-sexp').
  373. `M-h'
  374.      Put region around current paragraph (`mark-paragraph').
  375. `C-M-h'
  376.      Put region around current Lisp defun (`mark-defun').
  377. `C-x h'
  378.      Put region around entire buffer (`mark-whole-buffer').
  379. `C-x C-p'
  380.      Put region around current page (`mark-page').
  381.    `M-@' (`mark-word') puts the mark at the end of the next word, while
  382. `C-M-@' (`mark-sexp') puts it at the end of the next Lisp expression. 
  383. These characters allow you to save a little typing or redisplay,
  384. sometimes.
  385.    Other commands set both point and mark, to delimit an object in the
  386. buffer.  `M-h' (`mark-paragraph') moves point to the beginning of the
  387. paragraph that surrounds or follows point, and puts the mark at the end
  388. of that paragraph (*note Paragraphs::.).  `M-h' does all that's
  389. necessary if you wish to indent, case-convert, or kill a whole
  390. paragraph. `C-M-h' (`mark-defun') similarly puts point before and the
  391. mark after the current or following defun (*note Defuns::.).  `C-x C-p'
  392. (`mark-page') puts point before the current page (or the next or
  393. previous, according to the argument), and mark at the end (*note
  394. Pages::.). The mark goes after the terminating page delimiter (to
  395. include it), while point goes after the preceding page delimiter (to
  396. exclude it).  Finally, `C-x h' (`mark-whole-buffer') sets up the entire
  397. buffer as the region, by putting point at the beginning and the mark at
  398. the end.
  399. File: emacs,  Node: Mark Ring,  Prev: Marking Objects,  Up: Mark
  400. The Mark Ring
  401. =============
  402.    Aside from delimiting the region, the mark is also useful for
  403. remembering a spot that you may want to go back to.  To make this
  404. feature more useful, Emacs remembers 16 previous locations of the mark,
  405. in the "mark ring". Most commands that set the mark push the old mark
  406. onto this ring.  To return to a marked location, use `C-u C-SPC' (or
  407. `C-u C-@'); this is the command `set-mark-command' given a numeric
  408. argument.  It moves point to where the mark was, and restores the mark
  409. from the ring of former marks.  So repeated use of this command moves
  410. point to all of the old marks on the ring, one by one.  The marks you
  411. see go to the end of the ring, so no marks are lost.
  412.    Each buffer has its own mark ring.  All editing commands use the
  413. current buffer's mark ring.  In particular, `C-u C-SPC' always stays in
  414. the same buffer.
  415.    Many commands that can move long distances, such as `M-<'
  416. (`beginning-of-buffer'), start by setting the mark and saving the old
  417. mark on the mark ring.  This is to make it easier for you to move back
  418. later.  Searches do this except when they do not actually move point. 
  419. You can tell when a command sets the mark because `Mark Set' is printed
  420. in the echo area.
  421.    Another way of remembering positions so you can go back to them is
  422. with registers (*note RegPos::.).
  423.    The variable `mark-ring-max' is the maximum number of entries to
  424. keep in the mark ring.  If that many entries exist and another one is
  425. pushed, the last one in the list is discarded.  Repeating `C-u C-SPC'
  426. circulates through the limited number of entries that are currently in
  427. the ring.
  428.    The variable `mark-ring' holds the mark ring itself, as a list of
  429. marker objects in the order most recent first.  This variable is local
  430. in every buffer.
  431. File: emacs,  Node: Killing,  Next: Yanking,  Prev: Mark,  Up: Top
  432. Deletion and Killing
  433. ====================
  434.    Most commands which erase text from the buffer save it so that you
  435. can get it back if you change your mind, or move or copy it to other
  436. parts of the buffer.  These commands are known as "kill" commands.  The
  437. rest of the commands that erase text do not save it; they are known as
  438. "delete" commands.  (This distinction is made only for erasure of text
  439. in the buffer.)
  440.    The delete commands include `C-d' (`delete-char') and DEL
  441. (`delete-backward-char'), which delete only one character at a time,
  442. and those commands that delete only spaces or newlines.  Commands that
  443. can destroy significant amounts of nontrivial data generally kill. The
  444. commands' names and individual descriptions use the words `kill' and
  445. `delete' to say which they do.  If you do a kill or delete command by
  446. mistake, you can use the `C-x u' (`undo') command to undo it (*note
  447. Undo::.).
  448. Deletion
  449. --------
  450. `C-d'
  451.      Delete next character (`delete-char').
  452. `DEL'
  453.      Delete previous character (`delete-backward-char').
  454. `M-\'
  455.      Delete spaces and tabs around point (`delete-horizontal-space').
  456. `M-SPC'
  457.      Delete spaces and tabs around point, leaving one space
  458.      (`just-one-space').
  459. `C-x C-o'
  460.      Delete blank lines around the current line (`delete-blank-lines').
  461. `M-^'
  462.      Join two lines by deleting the intervening newline, and any
  463.      indentation following it (`delete-indentation').
  464.    The most basic delete commands are `C-d' (`delete-char') and DEL
  465. (`delete-backward-char').  `C-d' deletes the character after point, the
  466. one the cursor is "on top of".  Point doesn't move. DEL deletes the
  467. character before the cursor, and moves point back. Newlines can be
  468. deleted like any other characters in the buffer; deleting a newline
  469. joins two lines.  Actually, `C-d' and DEL aren't always delete
  470. commands; if given an argument, they kill instead, since they can erase
  471. more than one character this way.
  472.    The other delete commands are those which delete only formatting
  473. characters: spaces, tabs and newlines.  `M-\'
  474. (`delete-horizontal-space') deletes all the spaces and tab characters
  475. before and after point. `M-SPC' (`just-one-space') does likewise but
  476. leaves a single space after point, regardless of the number of spaces
  477. that existed previously (even zero).
  478.    `C-x C-o' (`delete-blank-lines') deletes all blank lines after the
  479. current line, and if the current line is blank deletes all blank lines
  480. preceding the current line as well (leaving one blank line, the current
  481. line).  `M-^' (`delete-indentation') joins the current line and the
  482. previous line, or the current line and the next line if given an
  483. argument, by deleting a newline and all surrounding spaces, possibly
  484. leaving a single space.  *Note M-^: Indentation.
  485. Killing by Lines
  486. ----------------
  487. `C-k'
  488.      Kill rest of line or one or more lines (`kill-line').
  489.    The simplest kill command is `C-k'.  If given at the beginning of a
  490. line, it kills all the text on the line, leaving it blank.  If given on
  491. a blank line, the blank line disappears.  As a consequence, if you go
  492. to the front of a non-blank line and type `C-k' twice, the line
  493. disappears completely.
  494.    More generally, `C-k' kills from point up to the end of the line,
  495. unless it is at the end of a line.  In that case it kills the newline
  496. following the line, thus merging the next line into the current one.
  497. Invisible spaces and tabs at the end of the line are ignored when
  498. deciding which case applies, so if point appears to be at the end of
  499. the line, you can be sure the newline will be killed.
  500.    If `C-k' is given a positive argument, it kills that many lines and
  501. the newlines that follow them (however, text on the current line before
  502. point is spared).  With a negative argument, it kills back to a number
  503. of line beginnings.  An argument of -2 means kill back to the second
  504. line beginning.  If point is at the beginning of a line, that line
  505. beginning doesn't count, so `C-u - 2 C-k' with point at the front of a
  506. line kills the two previous lines.
  507.    `C-k' with an argument of zero kills all the text before point on the
  508. current line.
  509. Other Kill Commands
  510. -------------------
  511. `C-w'
  512.      Kill region (from point to the mark) (`kill-region'). *Note
  513.      Words::.
  514. `M-d'
  515.      Kill word (`kill-word').
  516. `M-DEL'
  517.      Kill word backwards (`backward-kill-word').
  518. `C-x DEL'
  519.      Kill back to beginning of sentence (`backward-kill-sentence').
  520.      *Note Sentences::.
  521. `M-k'
  522.      Kill to end of sentence (`kill-sentence').
  523. `C-M-k'
  524.      Kill sexp (`kill-sexp').  *Note Lists::.
  525. `M-z CHAR'
  526.      Kill up to next occurrence of CHAR (`zap-to-char').
  527.    A kill command which is very general is `C-w' (`kill-region'), which
  528. kills everything between point and the mark.  With this command, you
  529. can kill any contiguous sequence of characters, if you first set the
  530. mark at one end of them and go to the other end.
  531.    A convenient way of killing is combined with searching: `M-z'
  532. (`zap-to-char') reads a character and kills from point up to (but not
  533. including) the next occurrence of that character in the buffer.  If
  534. there is no next occurrence, killing goes to the end of the buffer.  A
  535. numeric argument acts as a repeat count.  A negative argument means to
  536. search backward and kill text before point.
  537.    Other syntactic units can be killed: words, with `M-DEL' and `M-d'
  538. (*note Words::.); sexps, with `C-M-k' (*note Lists::.); and sentences,
  539. with `C-x DEL' and `M-k' (*note Sentences::.).
  540. File: emacs,  Node: Yanking,  Next: Accumulating Text,  Prev: Killing,  Up: Top
  541. Yanking
  542. =======
  543.    "Yanking" is getting back text which was killed.  This is what some
  544. systems call "pasting".  The usual way to move or copy text is to kill
  545. it and then yank it one or more times.
  546. `C-y'
  547.      Yank last killed text (`yank').
  548. `M-y'
  549.      Replace re-inserted killed text with the previously killed text
  550.      (`yank-pop').
  551. `M-w'
  552.      Save region as last killed text without actually killing it
  553.      (`copy-region-as-kill').
  554. `C-M-w'
  555.      Append next kill to last batch of killed text (`append-next-kill').
  556. * Menu:
  557. * Kill Ring::       Where killed text is stored.  Basic yanking.
  558. * Appending Kills:: Several kills in a row all yank together.
  559. * Earlier Kills::   Yanking something killed some time ago.
  560. File: emacs,  Node: Kill Ring,  Next: Appending Kills,  Prev: Yanking,  Up: Yanking
  561. The Kill Ring
  562. -------------
  563.    All killed text is recorded in the "kill ring", a list of blocks of
  564. text that have been killed.  There is only one kill ring, used in all
  565. buffers, so you can kill text in one buffer and yank it in another
  566. buffer. This is the usual way to move text from one file to another.
  567. (*Note Accumulating Text::, for some other ways.)
  568.    The command `C-y' (`yank') reinserts the text of the most recent
  569. kill.  It leaves the cursor at the end of the text.  It sets the mark at
  570. the beginning of the text.  *Note Mark::.
  571.    `C-u C-y' leaves the cursor in front of the text, and sets the mark
  572. after it.  This is only if the argument is specified with just a `C-u',
  573. precisely.  Any other sort of argument, including `C-u' and digits, has
  574. an effect described below (under "Yanking Earlier Kills").
  575.    If you wish to copy a block of text, you might want to use `M-w'
  576. (`copy-region-as-kill'), which copies the region into the kill ring
  577. without removing it from the buffer.  This is approximately equivalent
  578. to `C-w' followed by `C-y', except that `M-w' does not mark the buffer
  579. as "modified" and does not temporarily change the screen.
  580. File: emacs,  Node: Appending Kills,  Next: Earlier Kills,  Prev: Kill Ring,  Up: Yanking
  581. Appending Kills
  582. ---------------
  583.    Normally, each kill command pushes a new block onto the kill ring.
  584. However, two or more kill commands in a row combine their text into a
  585. single entry, so that a single `C-y' gets it all back as it was before
  586. it was killed.  This means that you don't have to kill all the text in
  587. one command; you can keep killing line after line, or word after word,
  588. until you have killed it all, and you can still get it all back at
  589. once.  (Thus we join television in leading people to kill
  590. thoughtlessly.)
  591.    Commands that kill forward from point add onto the end of the
  592. previous killed text.  Commands that kill backward from point add onto
  593. the beginning.  This way, any sequence of mixed forward and backward
  594. kill commands puts all the killed text into one entry without
  595. rearrangement. Numeric arguments do not break the sequence of appending
  596. kills.  For example, suppose the buffer contains
  597.      This is the first
  598.      line of sample text
  599.      and here is the third.
  600. with point at the beginning of the second line.  If you type `C-k C-u 2
  601. M-DEL C-k', the first `C-k' kills the text `line of sample text', `C-u
  602. 2 M-DEL' kills `the first' with the newline that followed it, and the
  603. second `C-k' kills the newline after the second line.  The result is
  604. that the buffer contains `This is and here is the third.' and a single
  605. kill entry contains `the firstRETline of sample textRET'--all the
  606. killed text, in its original order.
  607.    If a kill command is separated from the last kill command by other
  608. commands (not just numeric arguments), it starts a new entry on the kill
  609. ring.  But you can force it to append by first typing the command
  610. `C-M-w' (`append-next-kill') in front of it.  The `C-M-w' tells the
  611. following command, if it is a kill command, to append the text it kills
  612. to the last killed text, instead of starting a new entry.  With
  613. `C-M-w', you can kill several separated pieces of text and accumulate
  614. them to be yanked back in one place.
  615. File: emacs,  Node: Earlier Kills,  Prev: Appending Kills,  Up: Yanking
  616. Yanking Earlier Kills
  617. ---------------------
  618.    To recover killed text that is no longer the most recent kill, you
  619. need the `Meta-y' (`yank-pop') command.  `M-y' can be used only after a
  620. `C-y' or another `M-y'.  It takes the text previously yanked and
  621. replaces it with the text from an earlier kill.  So, to recover the
  622. text of the next-to-the-last kill, you first use `C-y' to recover the
  623. last kill, and then use `M-y' to replace it with the previous kill.
  624.    You can think in terms of a "last yank" pointer which points at an
  625. item in the kill ring.  Each time you kill, the "last yank" pointer
  626. moves to the newly made item at the front of the ring.  `C-y' yanks the
  627. item which the "last yank" pointer points to.  `M-y' moves the "last
  628. yank" pointer to a different item, and the text in the buffer changes to
  629. match.  Enough `M-y' commands can move the pointer to any item in the
  630. ring, so you can get any item into the buffer.  Eventually the pointer
  631. reaches the end of the ring; the next `M-y' moves it to the first item
  632. again.
  633.    Yanking moves the "last yank" pointer around the ring, but it does
  634. not change the order of the entries in the ring, which always runs from
  635. the most recent kill at the front to the oldest one still remembered.
  636.    `M-y' can take a numeric argument, which tells it how many items to
  637. advance the "last yank" pointer by.  A negative argument moves the
  638. pointer toward the front of the ring; from the front of the ring, it
  639. moves to the last entry and starts moving forward from there.
  640.    Once the text you are looking for is brought into the buffer, you can
  641. stop doing `M-y' commands and it will stay there.  It's just a copy of
  642. the kill ring item, so editing it in the buffer does not change what's
  643. in the ring.  As long as no new killing is done, the "last yank" pointer
  644. remains at the same place in the kill ring, so repeating `C-y' will
  645. yank another copy of the same old kill.
  646.    If you know how many `M-y' commands it would take to find the text
  647. you want, you can yank that text in one step using `C-y' with a numeric
  648. argument.  `C-y' with an argument greater than one restores the text
  649. the specified number of entries back in the kill ring.  Thus, `C-u 2
  650. C-y' gets the next to the last block of killed text.  It is equivalent
  651. to `C-y M-y'.  `C-y' with a numeric argument starts counting from the
  652. "last yank" pointer, and sets the "last yank" pointer to the entry that
  653. it yanks.
  654.    The length of the kill ring is controlled by the variable
  655. `kill-ring-max'; no more than that many blocks of killed text are saved.
  656. File: emacs,  Node: Accumulating Text,  Next: Rectangles,  Prev: Yanking,  Up: Top
  657. Accumulating Text
  658. =================
  659.    Usually we copy or move text by killing it and yanking it, but there
  660. are other ways that are useful for copying one block of text in many
  661. places, or for copying many scattered blocks of text into one place.
  662.    You can accumulate blocks of text from scattered locations either
  663. into a buffer or into a file if you like.  These commands are described
  664. here.  You can also use Emacs registers for storing and accumulating
  665. text. *Note Registers::.
  666. `C-x a'
  667.      Append region to contents of specified buffer (`append-to-buffer').
  668. `M-x prepend-to-buffer'
  669.      Prepend region to contents of specified buffer.
  670. `M-x copy-to-buffer'
  671.      Copy region into specified buffer, deleting that buffer's old
  672.      contents.
  673. `M-x insert-buffer'
  674.      Insert contents of specified buffer into current buffer at point.
  675. `M-x append-to-file'
  676.      Append region to contents of specified file, at the end.
  677.    To accumulate text into a buffer, use the command `C-x a BUFFERNAME'
  678. (`append-to-buffer'), which inserts a copy of the region into the
  679. buffer BUFFERNAME, at the location of point in that buffer.  If there
  680. is no buffer with that name, one is created.  If you append text into a
  681. buffer which has been used for editing, the copied text goes into the
  682. middle of the text of the buffer, wherever point happens to be in it.
  683.    Point in that buffer is left at the end of the copied text, so
  684. successive uses of `C-x a' accumulate the text in the specified buffer
  685. in the same order as they were copied.  Strictly speaking, `C-x a' does
  686. not always append to the text already in the buffer; but if `C-x a' is
  687. the only command used to alter a buffer, it does always append to the
  688. existing text because point is always at the end.
  689.    `M-x prepend-to-buffer' is just like `C-x a' except that point in
  690. the other buffer is left before the copied text, so successive
  691. prependings add text in reverse order.  `M-x copy-to-buffer' is similar
  692. except that any existing text in the other buffer is deleted, so the
  693. buffer is left containing just the text newly copied into it.
  694.    You can retrieve the accumulated text from that buffer with `M-x
  695. insert-buffer'; this too takes BUFFERNAME as an argument.  It inserts a
  696. copy of the text in buffer BUFFERNAME into the selected buffer. You
  697. could alternatively select the other buffer for editing, perhaps moving
  698. text from it by killing or with `C-x a'.  *Note Buffers::, for
  699. background information on buffers.
  700.    Instead of accumulating text within Emacs, in a buffer, you can
  701. append text directly into a file with `M-x append-to-file', which takes
  702. FILE-NAME as an argument.  It adds the text of the region to the end of
  703. the specified file.  The file is changed immediately on disk. This
  704. command is normally used with files that are not being visited in
  705. Emacs.  Using it on a file that Emacs is visiting can produce confusing
  706. results, because the text inside Emacs for that file will not change
  707. while the file itself changes.
  708. File: emacs,  Node: Rectangles,  Next: Registers,  Prev: Accumulating Text,  Up: Top
  709. Rectangles
  710. ==========
  711.    The rectangle commands affect rectangular areas of the text: all the
  712. characters between a certain pair of columns, in a certain range of
  713. lines. Commands are provided to kill rectangles, yank killed
  714. rectangles, clear them out, or delete them.  Rectangle commands are
  715. useful with text in multicolumnar formats, such as perhaps code with
  716. comments at the right, or for changing text into or out of such formats.
  717.    When you must specify a rectangle for a command to work on, you do
  718. it by putting the mark at one corner and point at the opposite corner.
  719. The rectangle thus specified is called the "region-rectangle" because
  720. it is controlled about the same way the region is controlled. But
  721. remember that a given combination of point and mark values can be
  722. interpreted either as specifying a region or as specifying a rectangle;
  723. it is up to the command that uses them to choose the interpretation.
  724. `M-x delete-rectangle'
  725.      Delete the text of the region-rectangle, moving any following text
  726.      on each line leftward to the left edge of the region-rectangle.
  727. `M-x kill-rectangle'
  728.      Similar, but also save the contents of the region-rectangle as the
  729.      "last killed rectangle".
  730. `M-x yank-rectangle'
  731.      Yank the last killed rectangle with its upper left corner at point.
  732. `M-x open-rectangle'
  733.      Insert blank space to fill the space of the region-rectangle. The
  734.      previous contents of the region-rectangle are pushed rightward.
  735. `M-x clear-rectangle'
  736.      Clear the region-rectangle by replacing its contents with spaces.
  737.    The rectangle operations fall into two classes: commands deleting and
  738. moving rectangles, and commands for blank rectangles.
  739.    There are two ways to get rid of the text in a rectangle: you can
  740. discard the text (delete it) or save it as the "last killed" rectangle.
  741.  The commands for these two ways are `M-x delete-rectangle' and `M-x
  742. kill-rectangle'.  In either case, the portion of each line that falls
  743. inside the rectangle's boundaries is deleted, causing following text
  744. (if any) on the line to move left.
  745.    Note that "killing" a rectangle is not killing in the usual sense;
  746. the rectangle is not stored in the kill ring, but in a special place
  747. that can only record the most recent rectangle killed.  This is because
  748. yanking a rectangle is so different from yanking linear text that
  749. different yank commands have to be used and yank-popping is hard to
  750. make sense of.
  751.    Inserting a rectangle is the opposite of deleting one.  All you need
  752. to specify is where to put the upper left corner; that is done by
  753. putting point there.  The rectangle's first line is inserted there, the
  754. rectangle's second line is inserted at a point one line vertically
  755. down, and so on. The number of lines affected is determined by the
  756. height of the saved rectangle.
  757.    To insert the last killed rectangle, type `M-x yank-rectangle'. This
  758. can be used to convert single-column lists into double-column lists;
  759. kill the second half of the list as a rectangle and then yank it beside
  760. the first line of the list.
  761.    There are two commands for working with blank rectangles: `M-x
  762. clear-rectangle' to blank out existing text, and `M-x open-rectangle'
  763. to insert a blank rectangle.  Clearing a rectangle is equivalent to
  764. deleting it and then inserting as blank rectangle of the same size.
  765.    Rectangles can also be copied into and out of registers. *Note
  766. Rectangle Registers: RegRect.
  767. File: emacs,  Node: Registers,  Next: Display,  Prev: Rectangles,  Up: Top
  768. Registers
  769. *********
  770.    Emacs "registers" are places you can save text or positions for
  771. later use.  Text saved in a register can be copied into the buffer once
  772. or many times; a position saved in a register is used by moving point
  773. to that position.  Rectangles can also be copied into and out of
  774. registers (*note Rectangles::.).
  775.    Each register has a name, which is a single character.  A register
  776. can store either a piece of text or a position or a rectangle, but only
  777. one thing at any given time.  Whatever you store in a register remains
  778. there until you store something else in that register.
  779. * Menu:
  780. * RegPos::    Saving positions in registers.
  781. * RegText::   Saving text in registers.
  782. * RegRect::   Saving rectangles in registers.
  783. `M-x view-register RET R'
  784.      Display a description of what register R contains.
  785.    `M-x view-register' reads a register name as an argument and then
  786. displays the contents of the specified register.
  787. File: emacs,  Node: RegPos,  Next: RegText,  Prev: Registers,  Up: Registers
  788. Saving Positions in Registers
  789. =============================
  790.    Saving a position records a spot in a buffer so that you can move
  791. back there later.  Moving to a saved position reselects the buffer and
  792. moves point to the spot.
  793. `C-x / R'
  794.      Save location of point in register R (`point-to-register').
  795. `C-x j R'
  796.      Jump to the location saved in register R (`register-to-point').
  797.    To save the current location of point in a register, choose a name R
  798. and type `C-x / R'.  The register R retains the location thus saved
  799. until you store something else in that register.
  800.    The command `C-x j R' moves point to the location recorded in
  801. register R.  The register is not affected; it continues to record the
  802. same location.  You can jump to the same position using the same
  803. register any number of times.
  804. File: emacs,  Node: RegText,  Next: RegRect,  Prev: RegPos,  Up: Registers
  805. Saving Text in Registers
  806. ========================
  807.    When you want to insert a copy of the same piece of text frequently,
  808. it may be impractical to use the kill ring, since each subsequent kill
  809. moves the piece of text further down on the ring.  It becomes hard to
  810. keep track of what argument is needed to retrieve the same text with
  811. `C-y'.  An alternative is to store the text in a register with `C-x x'
  812. (`copy-to-register') and then retrieve it with `C-x g'
  813. (`insert-register').
  814. `C-x x R'
  815.      Copy region into register R (`copy-to-register').
  816. `C-x g R'
  817.      Insert text contents of register R (`insert-register').
  818.    `C-x x R' stores a copy of the text of the region into the register
  819. named R.  Given a numeric argument, `C-x x' deletes the text from the
  820. buffer as well.
  821.    `C-x g R' inserts in the buffer the text from register R. Normally
  822. it leaves point before the text and places the mark after, but with a
  823. numeric argument it puts point after the text and the mark before.
  824. File: emacs,  Node: RegRect,  Prev: RegText,  Up: Registers
  825. Saving Rectangles in Registers
  826. ==============================
  827.    A register can contain a rectangle instead of linear text.  The
  828. rectangle is represented as a list of strings.  *Note Rectangles::, for
  829. basic information on rectangles and how rectangles in the buffer are
  830. specified.
  831. `C-x r R'
  832.      Copy the region-rectangle into register R
  833.      (`copy-region-to-rectangle'). With numeric argument, delete it as
  834.      well.
  835. `C-x g R'
  836.      Insert the rectangle stored in register R (if it contains a
  837.      rectangle) (`insert-register').
  838.    The `C-x g' command inserts linear text if the register contains
  839. that, or inserts a rectangle if the register contains one.
  840. File: emacs,  Node: Display,  Next: Search,  Prev: Registers,  Up: Top
  841. Controlling the Display
  842. ***********************
  843.    Since only part of a large buffer fits in the window, Emacs tries to
  844. show the part that is likely to be interesting.  The display control
  845. commands allow you to specify which part of the text you want to see.
  846. `C-l'
  847.      Clear screen and redisplay, scrolling the selected window to center
  848.      point vertically within it (`recenter').
  849. `C-v'
  850.      Scroll forward (a windowful or a specified number of lines)
  851.      (`scroll-up').
  852. `M-v'
  853.      Scroll backward (`scroll-down').
  854. `ARG C-l'
  855.      Scroll so point is on line ARG (`recenter').
  856. `C-x <'
  857.      Scroll text in current window to the left (`scroll-left').
  858. `C-x >'
  859.      Scroll to the right (`scroll-right').
  860. `C-x $'
  861.      Make deeply indented lines invisible (`set-selective-display').
  862. * Menu:
  863. * Scrolling::               Moving text up and down in a window.
  864. * Horizontal Scrolling::   Moving text left and right in a window.
  865. * Selective Display::      Hiding lines with lots of indentation.
  866. * Display Vars::           Information on variables for customizing display.
  867. File: emacs,  Node: Scrolling,  Next: Horizontal Scrolling,  Prev: Display,  Up: Display
  868. Scrolling
  869. =========
  870.    If a buffer contains text that is too large to fit entirely within a
  871. window that is displaying the buffer, Emacs shows a contiguous section
  872. of the text.  The section shown always contains point.
  873.    "Scrolling" means moving text up or down in the window so that
  874. different parts of the text are visible.  Scrolling forward means that
  875. text moves up, and new text appears at the bottom.  Scrolling backward
  876. moves text down and new text appears at the top.
  877.    Scrolling happens automatically if you move point past the bottom or
  878. top of the window.  You can also explicitly request scrolling with the
  879. commands in this section.
  880. `C-l'
  881.      Clear screen and redisplay, scrolling the selected window to center
  882.      point vertically within it (`recenter').
  883. `C-v'
  884.      Scroll forward (a windowful or a specified number of lines)
  885.      (`scroll-up').
  886. `M-v'
  887.      Scroll backward (`scroll-down').
  888. `ARG C-l'
  889.      Scroll so point is on line ARG (`recenter').
  890.    The most basic scrolling command is `C-l' (`recenter') with no
  891. argument.  It clears the entire screen and redisplays all windows.  In
  892. addition, the selected window is scrolled so that point is halfway down
  893. from the top of the window.
  894.    The scrolling commands `C-v' and `M-v' let you move all the text in
  895. the window up or down a few lines.  `C-v' (`scroll-up') with an
  896. argument shows you that many more lines at the bottom of the window,
  897. moving the text and point up together as `C-l' might.  `C-v' with a
  898. negative argument shows you more lines at the top of the window.
  899. `Meta-v' (`scroll-down') is like `C-v', but moves in the opposite
  900. direction.
  901.    To read the buffer a windowful at a time, use `C-v' with no argument.
  902. It takes the last two lines at the bottom of the window and puts them at
  903. the top, followed by nearly a whole windowful of lines not previously
  904. visible.  If point was in the text scrolled off the top, it moves to the
  905. new top of the window.  `M-v' with no argument moves backward with
  906. overlap similarly.  The number of lines of overlap across a `C-v' or
  907. `M-v' is controlled by the variable `next-screen-context-lines'; by
  908. default, it is two.
  909.    Another way to do scrolling is with `C-l' with a numeric argument.
  910. `C-l' does not clear the screen when given an argument; it only scrolls
  911. the selected window.  With a positive argument N, it repositions text
  912. to put point N lines down from the top.  An argument of zero puts point
  913. on the very top line.  Point does not move with respect to the text;
  914. rather, the text and point move rigidly on the screen.  `C-l' with a
  915. negative argument puts point that many lines from the bottom of the
  916. window. For example, `C-u - 1 C-l' puts point on the bottom line, and
  917. `C-u - 5 C-l' puts it five lines from the bottom.  Just `C-u' as
  918. argument, as in `C-u C-l', scrolls point to the center of the screen.
  919.    Scrolling happens automatically if point has moved out of the visible
  920. portion of the text when it is time to display.  Usually the scrolling
  921. is done so as to put point vertically centered within the window. 
  922. However, if the variable `scroll-step' has a nonzero value, an attempt
  923. is made to scroll the buffer by that many lines; if that is enough to
  924. bring point back into visibility, that is what is done.
  925.