home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / elisp / elisp-23 < prev    next >
Encoding:
GNU Info File  |  1993-05-31  |  47.9 KB  |  1,120 lines

  1. This is Info file elisp, produced by Makeinfo-1.55 from the input file
  2. elisp.texi.
  3.  
  4.    This is edition 2.0 of the GNU Emacs Lisp Reference Manual, for
  5. Emacs Version 19.
  6.  
  7.    Published by the Free Software Foundation, 675 Massachusetts Avenue,
  8. Cambridge, MA 02139 USA
  9.  
  10.    Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided that
  18. the entire resulting derived work is distributed under the terms of a
  19. permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that this permission notice may be stated in a
  24. translation approved by the Foundation.
  25.  
  26. 
  27. File: elisp,  Node: The Kill Ring,  Next: Undo,  Prev: User-Level Deletion,  Up: Text
  28.  
  29. The Kill Ring
  30. =============
  31.  
  32.    "Kill" functions delete text like the deletion functions, but save
  33. it so that the user can reinsert it by "yanking".  Most of these
  34. functions have `kill-' in their name.  By contrast, the functions whose
  35. names start with `delete-' normally do not save text for yanking
  36. (though they can still be undone); these are "deletion" functions.
  37.  
  38.    Most of the kill commands are primarily for interactive use, and are
  39. not described here.  What we do describe are the functions provided for
  40. use in writing such commands.  When deleting text for internal purposes
  41. within a Lisp function, you should normally use deletion functions, so
  42. as not to disturb the kill ring contents.  *Note Deletion::.
  43.  
  44.    Emacs saves the last several batches of killed text in a list.  We
  45. call it the "kill ring" because, in yanking, the elements are
  46. considered to be in a cyclic order.  The list is kept in the variable
  47. `kill-ring', and can be operated on with the usual functions for lists;
  48. there are also specialized functions, described in this section, which
  49. treat it as a ring.
  50.  
  51.    Some people think use of the word "kill" in Emacs is unfortunate,
  52. since it refers to processes which specifically *do not* destroy the
  53. entities "killed".  This is in sharp contrast to ordinary life, in
  54. which death is permanent and "killed" entities do not come back to
  55. life.  Therefore, other metaphors have been proposed.  For example, the
  56. term "cut ring" makes sense to people who, in pre-computer days, used
  57. scissors and paste to cut up and rearrange manuscripts.  However, it
  58. would be difficult to change now.
  59.  
  60. * Menu:
  61.  
  62. * Kill Ring Concepts::     What text looks like in the kill ring.
  63. * Kill Functions::         Functions that kill text.
  64. * Yank Commands::          Commands that access the kill ring.
  65. * Low Level Kill Ring::       Functions and variables for kill ring access.
  66. * Internals of Kill Ring:: Variables that hold kill-ring data.
  67.  
  68. 
  69. File: elisp,  Node: Kill Ring Concepts,  Next: Kill Functions,  Up: The Kill Ring
  70.  
  71. Kill Ring Concepts
  72. ------------------
  73.  
  74.    The kill ring records killed text as strings in a list.  A short kill
  75. ring, for example, might look like this:
  76.  
  77.      ("some text" "a different piece of text" "yet more text")
  78.  
  79.    New entries in the kill ring go at the front of the list.  When the
  80. list reaches `kill-ring-max' entries in length, adding a new entry
  81. automatically deletes the last entry.
  82.  
  83.    When kill commands are interwoven with other commands, the killed
  84. portions of text are put into separate entries in the kill ring.  But
  85. when two or more kill commands are executed in succession, the text they
  86. kill forms a single entry, because the second and subsequent consecutive
  87. kill commands append to the entry made by the first one.
  88.  
  89.    The user can reinsert or "yank" text from any element in the kill
  90. ring.  One of the entries in the ring is considered the "front", and
  91. the simplest yank command yanks that entry.  Other yank commands
  92. "rotate" the ring by designating other entries as the "front".
  93.  
  94. 
  95. File: elisp,  Node: Kill Functions,  Next: Yank Commands,  Prev: Kill Ring Concepts,  Up: The Kill Ring
  96.  
  97. Functions for Killing
  98. ---------------------
  99.  
  100.    `kill-region' is the usual subroutine for killing text.  Any command
  101. that calls this function is a "kill command" (and should probably have
  102. `kill' in its name).  `kill-region' puts the newly killed text in a new
  103. element at the beginning of the kill ring or adds it to the most recent
  104. element.  It uses the `last-command' variable to keep track of whether
  105. the previous was a kill command, and in such cases appends the killed
  106. text to the most recent entry.
  107.  
  108.  - Command: kill-region START END
  109.      This function kills the text in the region defined by START and
  110.      END.  The text is deleted but saved in the kill ring.  The value
  111.      is always `nil'.
  112.  
  113.      In an interactive call, START and END are point and the mark.
  114.  
  115.      If the buffer is read-only, `kill-region' modifies the kill ring
  116.      just the same, then signals an error without modifying the buffer.
  117.      This is convenient because it lets the user use all the kill
  118.      commands to copy text into the kill ring from a read-only buffer.
  119.  
  120.  - Command: copy-region-as-kill START END
  121.      This function saves the region defined by START and END on the
  122.      kill ring, but does not delete the text from the buffer.  It
  123.      returns `nil'.  It also indicates the extent of the text copied by
  124.      moving the cursor momentarily, or by displaying a message in the
  125.      echo area.
  126.  
  127.      Don't use this command in Lisp programs; use `kill-new' or
  128.      `kill-append' instead.  *Note Low Level Kill Ring::.
  129.  
  130.      In an interactive call, START and END are point and the mark.
  131.  
  132. 
  133. File: elisp,  Node: Yank Commands,  Next: Low Level Kill Ring,  Prev: Kill Functions,  Up: The Kill Ring
  134.  
  135. Functions for Yanking
  136. ---------------------
  137.  
  138.  - Command: yank &optional ARG
  139.      This function inserts the text in the first entry in the kill ring
  140.      directly before point.  After the yank, the mark is positioned at
  141.      the beginning and point is positioned after the end of the
  142.      inserted text.
  143.  
  144.      If ARG is a list (which occurs interactively when the user types
  145.      `C-u' with no digits), then `yank' inserts the text as described
  146.      above, but puts point before the yanked text and puts the mark
  147.      after it.  If ARG is a number, then `yank' inserts the ARGth most
  148.      recently killed text.
  149.  
  150.      `yank' does not alter the contents of the kill ring or rotate it.
  151.      It returns `nil'.
  152.  
  153.  - Command: yank-pop ARG
  154.      This function replaces the just-yanked text with another batch of
  155.      killed text--another element of the kill ring.
  156.  
  157.      This command is allowed only immediately after a `yank' or a
  158.      `yank-pop'.  At such a time, the region contains text that was just
  159.      inserted by the previous `yank'.  `yank-pop' deletes that text and
  160.      inserts in its place a different stretch of killed text.  The text
  161.      that is deleted is not inserted into the kill ring, since it is
  162.      already in the kill ring somewhere.
  163.  
  164.      If ARG is `nil', then the existing region contents are replaced
  165.      with the previous element of the kill ring.  If ARG is numeric,
  166.      then the ARGth previous kill is the replacement.  If ARG is
  167.      negative, a more recent kill is the replacement.
  168.  
  169.      The sequence of kills in the kill ring wraps around, so that after
  170.      the oldest one comes the newest one, and before the newest one
  171.      goes the oldest.
  172.  
  173.      The value is always `nil'.
  174.  
  175. 
  176. File: elisp,  Node: Low Level Kill Ring,  Next: Internals of Kill Ring,  Prev: Yank Commands,  Up: The Kill Ring
  177.  
  178. Low Level Kill Ring
  179. -------------------
  180.  
  181.    These functions and variables provide access to the kill ring at a
  182. lower level, but still convenient for use in Lisp programs.  They take
  183. care of interaction with X Window selections.  They do not exist in
  184. Emacs version 18.
  185.  
  186.  - Function: current-kill N &optional DO-NOT-MOVE
  187.      The function `current-kill' rotates the yanking pointer in the
  188.      kill ring by N places, and returns the text at that place in the
  189.      ring.
  190.  
  191.      If the optional second argument DO-NOT-MOVE is non-`nil', then
  192.      `current-kill' doesn't alter the yanking pointer; it just returns
  193.      the Nth kill forward from the current yanking pointer.
  194.  
  195.      If N is zero, indicating a request for the latest kill,
  196.      `current-kill' calls the value of `interprogram-paste-function'
  197.      (documented below) before consulting the kill ring.
  198.  
  199.  - Function: kill-new STRING
  200.      This function puts the text STRING into the kill ring as a new
  201.      entry at the front of the ring.  It also discards the oldest entry
  202.      if appropriate.  It also invokes the value of
  203.      `interprogram-cut-function' (see below).
  204.  
  205.  - Function: kill-append STRING BEFORE-P
  206.      This function appends the text STRING to the first entry in the
  207.      kill ring.  Normally STRING goes at the end of the entry, but if
  208.      BEFORE-P is non-`nil', it goes at the beginning.  This function
  209.      also invokes the value of `interprogram-cut-function' (see below).
  210.  
  211.  - Variable: interprogram-paste-function
  212.      This variable provides a way of transferring killed text from other
  213.      programs, when you are using a window system.  Its value should be
  214.      `nil' or a function of no arguments.
  215.  
  216.      If the value is a function, it is called when the "most recent
  217.      kill" value is called for.  If the function returns a non-`nil'
  218.      values, then that value is used as the "most recent kill".  If it
  219.      returns `nil', then the first element of the kill ring is used.
  220.  
  221.  - Variable: interprogram-cut-function
  222.      This variable provides a way of communicating killed text to and
  223.      from other programs, when you are using a window system.  Its
  224.      value should be `nil' or a function of one argument.
  225.  
  226.      If the value is a function, it is called whenever the "most recent
  227.      kill" is changed, with the new string of killed text as an
  228.      argument.
  229.  
  230. 
  231. File: elisp,  Node: Internals of Kill Ring,  Prev: Low Level Kill Ring,  Up: The Kill Ring
  232.  
  233. Internals of the Kill Ring
  234. --------------------------
  235.  
  236.    The variable `kill-ring' holds the kill ring contents, in the form
  237. of a list of strings.  The most recent kill is always at the front of
  238. the list.
  239.  
  240.    The `kill-ring-yank-pointer' variable points to a link in the kill
  241. ring list, whose CAR is the text that "yank" functions should copy.
  242. Moving `kill-ring-yank-pointer' to a different link is called "rotating
  243. the kill ring".  We call the kill ring a "ring" because the functions
  244. that move the yank pointer wrap around from the end of the list to the
  245. beginning, or vice-versa.  Rotating the ring does not change the value
  246. of `kill-ring'.
  247.  
  248.    Both `kill-ring' and `kill-ring-yank-pointer' are Lisp variables
  249. whose values are normally lists.  The word "pointer" in the name of the
  250. `kill-ring-yank-pointer' indicates that the variable's purpose is to
  251. identify one element of the list for use by the next yank command.
  252.  
  253.    The value of `kill-ring-yank-pointer' is always `eq' to one of the
  254. links in the kill ring list.  The element it identifies is the CAR of
  255. that link.  Commands which change the text in the kill ring also set
  256. this variable from `kill-ring'.  The effect is to rotate the ring so
  257. that the newly killed text is at front.
  258.  
  259.    Here is a diagram that shows the variable `kill-ring-yank-pointer'
  260. pointing to the second entry in the kill ring `("some text" "a
  261. different piece of text" "yet more text")'.
  262.  
  263.      kill-ring       kill-ring-yank-pointer
  264.        |               |
  265.        |     ___ ___    --->  ___ ___      ___ ___
  266.         --> |___|___|------> |___|___|--> |___|___|--> nil
  267.               |                |            |
  268.               |                |            |
  269.               |                |             -->"yet more text"
  270.               |                |
  271.               |                 --> "a different piece of text"
  272.               |
  273.                --> "some text"
  274.  
  275. This circumstance might occur after `C-y' (`yank') immediately followed
  276. by `M-y' (`yank-pop').
  277.  
  278.  - Variable: kill-ring
  279.      List of killed text sequences, most recently killed first.
  280.  
  281.  - Variable: kill-ring-yank-pointer
  282.      This variable's value indicates which element of the kill ring is
  283.      at the "front" of the ring for yanking.  More precisely, the value
  284.      is a sublist of the value of `kill-ring', and its CAR is the kill
  285.      string that `C-y' should yank.
  286.  
  287.  - User Option: kill-ring-max
  288.      The value of this variable is the maximum length to which the kill
  289.      ring can grow, before elements are thrown away at the end.  The
  290.      default value for `kill-ring-max' is 30.
  291.  
  292. 
  293. File: elisp,  Node: Undo,  Next: Maintaining Undo,  Prev: The Kill Ring,  Up: Text
  294.  
  295. Undo
  296. ====
  297.  
  298.    Most buffers have an "undo list" which records all changes made to
  299. the buffer's text so that they can be undone.  (The buffers which don't
  300. have one are usually special-purpose buffers for which Emacs assumes
  301. that undoing is not useful.)  All the primitives which modify the text
  302. in the buffer automatically add elements to the front of the undo list,
  303. which you can find in the variable `buffer-undo-list'.
  304.  
  305.  - Variable: buffer-undo-list
  306.      This variable's value is the undo list of the current buffer.  A
  307.      value of `t' disables the recording of undo information.
  308.  
  309.    Here are the kinds of elements an undo list can have:
  310.  
  311. `INTEGER'
  312.      This kind of element records a previous value of point.  Ordinary
  313.      cursor motion does not get any sort of undo record, but these
  314.      entries are used to record where point was before a deletion.
  315.  
  316. `(BEG . END)'
  317.      This kind of element indicates how to delete text that was
  318.      inserted.  Upon insertion, the text occupied the range BEG-END in
  319.      the buffer.
  320.  
  321. `(POS . DELETED)'
  322.      This kind of element indicates how to reinsert text that was
  323.      deleted.  The deleted text itself is the string DELETED.  The
  324.      place to reinsert it is POS.
  325.  
  326. `(t HIGH . LOW)'
  327.      This kind of element indicates that an unmodified buffer became
  328.      modified.  The elements HIGH and LOW are two integers, each
  329.      recording 16 bits of the visited file's modification time as of
  330.      when it was previously visited or saved.  `primitive-undo' uses
  331.      those values to determine whether to mark the buffer as unmodified
  332.      once again; it does so only if the file's modification time
  333.      matches those numbers.
  334.  
  335. `(nil PROPERTY VALUE BEG . END)'
  336.      This kind of element records a change in a text property.  Here's
  337.      how you might undo the change:
  338.  
  339.           (put-text-property BEG END
  340.                              PROPERTY VALUE)
  341.  
  342. `nil'
  343.      This element is a boundary.  The function `undo-boundary' adds
  344.      these elements.  The elements between two boundaries are called a
  345.      "change group"; normally, each change group corresponds to one
  346.      keyboard command, and undo commands normally undo an entire group
  347.      as a unit.
  348.  
  349.  - Function: undo-boundary
  350.      This function places a boundary element in the undo list.  The undo
  351.      command stops at such a boundary, and successive undo commands undo
  352.      to earlier and earlier boundaries.  This function returns `nil'.
  353.  
  354.      The editor command loop automatically creates an undo boundary
  355.      between keystroke commands.  Thus, each undo normally undoes the
  356.      effects of one command.  Calling this function explicitly is
  357.      useful for splitting the effects of a command into more than one
  358.      unit.  For example, `query-replace' calls this function after each
  359.      replacement so that the user can undo individual replacements one
  360.      by one.
  361.  
  362.  - Function: primitive-undo COUNT LIST
  363.      This is the basic function for undoing elements of an undo list.
  364.      It undoes the first COUNT elements of LIST, returning the rest of
  365.      LIST.  You could write this function in Lisp, but it is convenient
  366.      to have it in C.
  367.  
  368.      `primitive-undo' adds elements to the buffer's undo list.  Undo
  369.      commands avoid confusion by saving the undo list value at the
  370.      beginning of a sequence of undo operations.  Then the undo
  371.      operations use and update the saved value.  The new elements added
  372.      by undoing never get into the saved value, so they don't cause any
  373.      trouble.
  374.  
  375. 
  376. File: elisp,  Node: Maintaining Undo,  Next: Auto Filling,  Prev: Undo,  Up: Text
  377.  
  378. Maintaining Undo Lists
  379. ======================
  380.  
  381.    This section describes how to enable and disable undo information for
  382. a given buffer.  It also explains how data from the undo list is
  383. discarded automatically so it doesn't get too big.
  384.  
  385.    Recording of undo information in a newly created buffer is normally
  386. enabled to start with; but if the buffer name starts with a space, the
  387. undo recording is initially disabled.  You can explicitly enable or
  388. disable undo recording with the following two functions, or by setting
  389. `buffer-undo-list' yourself.
  390.  
  391.  - Command: buffer-enable-undo &optional BUFFER-OR-NAME
  392.      This function enables recording undo information for buffer
  393.      BUFFER-OR-NAME, so that subsequent changes can be undone.  If no
  394.      argument is supplied, then the current buffer is used.  This
  395.      function does nothing if undo recording is already enabled in the
  396.      buffer.  It returns `nil'.
  397.  
  398.      In an interactive call, BUFFER-OR-NAME is the current buffer.  You
  399.      cannot specify any other buffer.
  400.  
  401.  - Function: buffer-disable-undo BUFFER
  402.  - Function: buffer-flush-undo BUFFER
  403.      This function discards the undo list of BUFFER, and disables
  404.      further recording of undo information.  As a result, it is no
  405.      longer possible to undo either previous changes or any subsequent
  406.      changes.  If the undo list of BUFFER is already disabled, this
  407.      function has no effect.
  408.  
  409.      This function returns `nil'.  It cannot be called interactively.
  410.  
  411.      The name `buffer-flush-undo' is not considered obsolete, but the
  412.      preferred name `buffer-disable-undo' was not provided in Emacs
  413.      versions 18 and earlier.
  414.  
  415.    As editing continues, undo lists get longer and longer.  To prevent
  416. them from using up all available memory space, garbage collection trims
  417. them back to size limits you can set.  (For this purpose, the "size" of
  418. an undo list measures the cons cells that make up the list, plus the
  419. strings of deleted text.)  Two variables control the range of acceptable
  420. sizes: `undo-limit' and `undo-strong-limit'.
  421.  
  422.  - Variable: undo-limit
  423.      This is the soft limit for the acceptable size of an undo list.
  424.      The change group at which this size is exceeded is the last one
  425.      kept.
  426.  
  427.  - Variable: undo-strong-limit
  428.      The upper limit for the acceptable size of an undo list.  The
  429.      change group at which this size is exceeded is discarded itself
  430.      (along with all subsequent changes).  There is one exception:
  431.      garbage collection always keeps the very last change group no
  432.      matter how big it is.
  433.  
  434. 
  435. File: elisp,  Node: Filling,  Next: Sorting,  Prev: Auto Filling,  Up: Text
  436.  
  437. Filling
  438. =======
  439.  
  440.    "Filling" means adjusting the lengths of lines (by moving words
  441. between them) so that they are nearly (but no greater than) a specified
  442. maximum width.  Additionally, lines can be "justified", which means
  443. that spaces are inserted between words to make the line exactly the
  444. specified width.  The width is controlled by the variable
  445. `fill-column'.  For ease of reading, lines should be no longer than 70
  446. or so columns.
  447.  
  448.    You can use Auto Fill mode (*note Auto Filling::.) to fill text
  449. automatically as you insert it, but changes to existing text may leave
  450. it improperly filled.  Then you must fill the text explicitly.
  451.  
  452.    Most of the functions in this section return values that are not
  453. meaningful.
  454.  
  455.  - Command: fill-paragraph JUSTIFY-FLAG
  456.      This function fills the paragraph at or after point.  If
  457.      JUSTIFY-FLAG is non-`nil', each line is justified as well.  It
  458.      uses the ordinary paragraph motion commands to find paragraph
  459.      boundaries.
  460.  
  461.  - Command: fill-region START END &optional JUSTIFY-FLAG
  462.      This function fills each of the paragraphs in the region from
  463.      START to END.  It justifies as well if JUSTIFY-FLAG is non-`nil'.
  464.      (In an interactive call, this is true if there is a prefix
  465.      argument.)
  466.  
  467.      The variable `paragraph-separate' controls how to distinguish
  468.      paragraphs.
  469.  
  470.  - Command: fill-individual-paragraphs START END &optional JUSTIFY-FLAG
  471.           MAIL-FLAG
  472.      This function fills each paragraph in the region according to its
  473.      individual fill prefix.  Thus, if the lines of a paragraph are
  474.      indented with spaces, the filled paragraph will continue to be
  475.      indented in the same fashion.
  476.  
  477.      The first two arguments, START and END, are the beginning and end
  478.      of the region that will be filled.  The third and fourth
  479.      arguments, JUSTIFY-FLAG and MAIL-FLAG, are optional.  If
  480.      JUSTIFY-FLAG is non-`nil', the paragraphs are justified as well as
  481.      filled.  If MAIL-FLAG is non-`nil', the function is told that it
  482.      is operating on a mail message and therefore should not fill the
  483.      header lines.
  484.  
  485.      Ordinarily, `fill-individual-paragraphs' regards each change in
  486.      indentation as starting a new paragraph.  If
  487.      `fill-individual-varying-indent' is non-`nil', then only separator
  488.      lines separate paragraphs.  That mode can handle paragraphs with
  489.      extra indentation on the first line.
  490.  
  491.  - User Option: fill-individual-varying-indent
  492.      This variable alters the action of `fill-individual-paragraphs' as
  493.      described above.
  494.  
  495.  - Command: fill-region-as-paragraph START END &optional JUSTIFY-FLAG
  496.      This function considers a region of text as a paragraph and fills
  497.      it.  If the region was made up of many paragraphs, the blank lines
  498.      between paragraphs are removed.  This function justifies as well
  499.      as filling when JUSTIFY-FLAG is non-`nil'.  In an interactive
  500.      call, any prefix argument requests justification.
  501.  
  502.      In Adaptive Fill mode, which is enabled by default,
  503.      `fill-region-as-paragraph' on an indented paragraph when there is
  504.      no fill prefix uses the indentation of the second line of the
  505.      paragraph as the fill prefix.
  506.  
  507.  - Command: justify-current-line
  508.      This function inserts spaces between the words of the current line
  509.      so that the line ends exactly at `fill-column'.  It returns `nil'.
  510.  
  511.  - User Option: fill-column
  512.      This buffer-local variable specifies the maximum width of filled
  513.      lines.  Its value should be an integer, which is a number of
  514.      columns.  All the filling, justification and centering commands
  515.      are affected by this variable, including Auto Fill mode (*note
  516.      Auto Filling::.).
  517.  
  518.      As a practical matter, if you are writing text for other people to
  519.      read, you should set `fill-column' to no more than 70.  Otherwise
  520.      the line will be too long for people to read comfortably, and this
  521.      can make the text seem clumsy.
  522.  
  523.  - Variable: default-fill-column
  524.      The value of this variable is the default value for `fill-column'
  525.      in buffers that do not override it.  This is the same as
  526.      `(default-value 'fill-column)'.
  527.  
  528.      The default value for `default-fill-column' is 70.
  529.  
  530. 
  531. File: elisp,  Node: Auto Filling,  Next: Filling,  Prev: Maintaining Undo,  Up: Text
  532.  
  533. Auto Filling
  534. ============
  535.  
  536.    "Filling" breaks text into lines that are no more than a specified
  537. number of columns wide.  Filled lines end between words, and therefore
  538. may have to be shorter than the maximum width.
  539.  
  540.    Auto Fill mode is a minor mode in which Emacs fills lines
  541. automatically as text as inserted.  This section describes the hook and
  542. the two variables used by Auto Fill mode.  For a description of
  543. functions that you can call manually to fill and justify text, see
  544. *Note Filling::.
  545.  
  546.  - Variable: auto-fill-function
  547.      The value of this variable should be a function (of no arguments)
  548.      to be called after self-inserting a space at a column beyond
  549.      `fill-column'.  It may be `nil', in which case nothing special is
  550.      done.
  551.  
  552.      The default value for `auto-fill-function' is `do-auto-fill', a
  553.      function whose sole purpose is to implement the usual strategy for
  554.      breaking a line.
  555.  
  556.           In older Emacs versions, this variable was named
  557.           `auto-fill-hook', but since it is not called with the
  558.           standard convention for hooks, it was renamed to
  559.           `auto-fill-function' in version 19.
  560.  
  561. 
  562. File: elisp,  Node: Sorting,  Next: Indentation,  Prev: Filling,  Up: Text
  563.  
  564. Sorting Text
  565. ============
  566.  
  567.    The sorting commands described in this section all rearrange text in
  568. a buffer.  This is in contrast to the function `sort', which rearranges
  569. the order of the elements of a list (*note Rearrangement::.).  The
  570. values returned by these commands are not meaningful.
  571.  
  572.  - Command: sort-regexp-fields REVERSE RECORD-REGEXP KEY-REGEXP START
  573.           END
  574.      This command sorts the region between START and END alphabetically
  575.      as specified by RECORD-REGEXP and KEY-REGEXP.  If REVERSE is a
  576.      negative integer, then sorting is in reverse order.
  577.  
  578.      Alphabetical sorting means that two sort keys are compared by
  579.      comparing the first characters of each, the second characters of
  580.      each, and so on.  If a mismatch is found, it means that the sort
  581.      keys are unequal; the sort key whose character is less at the
  582.      point of first mismatch is the lesser sort key.  The individual
  583.      characters are compared according to their numerical values.
  584.      Since Emacs uses the ASCII character set, the ordering in that set
  585.      determines alphabetical order.
  586.  
  587.      The value of the RECORD-REGEXP argument specifies the textual
  588.      units or "records" that should be sorted.  At the end of each
  589.      record, a search is done for this regular expression, and the text
  590.      that matches it is the next record.  For example, the regular
  591.      expression `^.+$', which matches lines with at least one character
  592.      besides a newline, would make each such line into a sort record.
  593.      *Note Regular Expressions::, for a description of the syntax and
  594.      meaning of regular expressions.
  595.  
  596.      The value of the KEY-REGEXP argument specifies what part of each
  597.      record is to be compared against the other records.  The
  598.      KEY-REGEXP could match the whole record, or only a part.  In the
  599.      latter case, the rest of the record has no effect on the sorted
  600.      order of records, but it is carried along when the record moves to
  601.      its new position.
  602.  
  603.      The KEY-REGEXP argument can refer to the text matched by a
  604.      subexpression of RECORD-REGEXP, or it can be a regular expression
  605.      on its own.
  606.  
  607.      If KEY-REGEXP is:
  608.  
  609.     `\DIGIT'
  610.           then the text matched by the DIGITth `\(...\)' parenthesis
  611.           grouping in RECORD-REGEXP is used for sorting.
  612.  
  613.     `\&'
  614.           then the whole record is used for sorting.
  615.  
  616.     a regular expression
  617.           then the function searches for a match for the regular
  618.           expression within the record.  If such a match is found, it
  619.           is used for sorting.  If a match for KEY-REGEXP is not found
  620.           within a record then that record is ignored, which means its
  621.           position in the buffer is not changed.  (The other records
  622.           may move around it.)
  623.  
  624.      For example, if you plan to sort all the lines in the region by the
  625.      first word on each line starting with the letter `f', you should
  626.      set RECORD-REGEXP to `^.*$' and set KEY-REGEXP to `\<f\w*\>'.  The
  627.      resulting expression looks like this:
  628.  
  629.           (sort-regexp-fields nil "^.*$" "\\<f\\w*\\>"
  630.                               (region-beginning)
  631.                               (region-end))
  632.  
  633.      If you call `sort-regexp-fields' interactively, you are prompted
  634.      for RECORD-REGEXP and KEY-REGEXP in the minibuffer.
  635.  
  636.  - Command: sort-subr REVERSE NEXTRECFUN ENDRECFUN &optional
  637.           STARTKEYFUN ENDKEYFUN
  638.      This command is the general text sorting routine that divides a
  639.      buffer into records and sorts them.  The functions `sort-lines',
  640.      `sort-paragraphs', `sort-pages', `sort-fields',
  641.      `sort-regexp-fields' and `sort-numeric-fields' all use `sort-subr'.
  642.  
  643.      To understand how `sort-subr' works, consider the whole accessible
  644.      portion of the buffer as being divided into disjoint pieces called
  645.      "sort records".  A portion of each sort record (perhaps all of it)
  646.      is designated as the sort key.  The records are rearranged in the
  647.      buffer in order by their sort keys.  The records may or may not be
  648.      contiguous.
  649.  
  650.      Usually, the records are rearranged in order of ascending sort key.
  651.      If the first argument to the `sort-subr' function, REVERSE, is
  652.      non-`nil', the sort records are rearranged in order of descending
  653.      sort key.
  654.  
  655.      The next four arguments to `sort-subr' are functions that are
  656.      called to move point across a sort record.  They are called many
  657.      times from within `sort-subr'.
  658.  
  659.        1. NEXTRECFUN is called with point at the end of a record.  This
  660.           function moves point to the start of the next record.  The
  661.           first record is assumed to start at the position of point
  662.           when `sort-subr' is called.  (Therefore, you should usually
  663.           move point to the beginning of the buffer before calling
  664.           `sort-subr'.)
  665.  
  666.           This function can indicate there are no more sort records by
  667.           leaving point at the end of the buffer.
  668.  
  669.        2. ENDRECFUN is called with point within a record.  It moves
  670.           point to the end of the record.
  671.  
  672.        3. STARTKEYFUN is called to move point from the start of a
  673.           record to the start of the sort key.  This argument is
  674.           optional.  If supplied, the function should either return a
  675.           non-`nil' value to be used as the sort key, or return `nil'
  676.           to indicate that the sort key is in the buffer starting at
  677.           point.  In the latter case, ENDKEYFUN is called to find the
  678.           end of the sort key.
  679.  
  680.        4. ENDKEYFUN is called to move point from the start of the sort
  681.           key to the end of the sort key.  This argument is optional.
  682.           If STARTKEYFUN returns `nil' and this argument is omitted (or
  683.           `nil'), then the sort key extends to the end of the record.
  684.           There is no need for ENDKEYFUN if STARTKEYFUN returns a
  685.           non-`nil' value.
  686.  
  687.      As an example of `sort-subr', here is the complete function
  688.      definition for `sort-lines':
  689.  
  690.           ;; Note that the first two lines of doc string
  691.           ;; are effectively one line when viewed by a user.
  692.           (defun sort-lines (reverse beg end)
  693.             "Sort lines in region alphabetically;\
  694.            argument means descending order.
  695.           Called from a program, there are three arguments:
  696.           REVERSE (non-nil means reverse order),
  697.           and BEG and END (the region to sort)."
  698.             (interactive "P\nr")
  699.             (save-restriction
  700.               (narrow-to-region beg end)
  701.               (goto-char (point-min))
  702.               (sort-subr reverse
  703.                          'forward-line
  704.                          'end-of-line)))
  705.  
  706.      Here `forward-line' moves point to the start of the next record,
  707.      and `end-of-line' moves point to the end of record.  We do not pass
  708.      the arguments STARTKEYFUN and ENDKEYFUN, because the entire record
  709.      is used as the sort key.
  710.  
  711.      The `sort-paragraphs' function is very much the same, except that
  712.      its `sort-subr' call looks like this:
  713.  
  714.           (sort-subr reverse
  715.                      (function
  716.                       (lambda ()
  717.                         (skip-chars-forward "\n \t\f")))
  718.                      'forward-paragraph)
  719.  
  720.  - Command: sort-lines REVERSE START END
  721.      This command sorts lines in the region between START and END
  722.      alphabetically.  If REVERSE is non-`nil', the sort is in reverse
  723.      order.
  724.  
  725.  - Command: sort-paragraphs REVERSE START END
  726.      This command sorts paragraphs in the region between START and END
  727.      alphabetically.  If REVERSE is non-`nil', the sort is in reverse
  728.      order.
  729.  
  730.  - Command: sort-pages REVERSE START END
  731.      This command sorts pages in the region between START and END
  732.      alphabetically.  If REVERSE is non-`nil', the sort is in reverse
  733.      order.
  734.  
  735.  - Command: sort-fields FIELD START END
  736.      This command sorts lines in the region between START and END,
  737.      comparing them alphabetically by the FIELDth field of each line.
  738.      Fields are separated by whitespace and numbered starting from 1.
  739.      If FIELD is negative, sorting is by the -FIELDth field from the
  740.      end of the line.  This command is useful for sorting tables.
  741.  
  742.  - Command: sort-numeric-fields FIELD START END
  743.      This command sorts lines in the region between START and END,
  744.      comparing them numerically by the FIELDth field of each line.
  745.      Fields are separated by whitespace and numbered starting from 1.
  746.      The specified field must contain a number in each line of the
  747.      region.  If FIELD is negative, sorting is by the -FIELDth field
  748.      from the end of the line.  This command is useful for sorting
  749.      tables.
  750.  
  751.  - Command: sort-columns REVERSE &optional BEG END
  752.      This command sorts the lines in the region between BEG and END,
  753.      comparing them alphabetically by a certain range of columns.  The
  754.      column positions of BEG and END bound the range of columns to sort
  755.      on.
  756.  
  757.      If REVERSE is non-`nil', the sort is in reverse order.
  758.  
  759.      One unusual thing about this command is that the entire line
  760.      containing position BEG, and the entire line containing position
  761.      END, are included in the region sorted.
  762.  
  763.      Note that `sort-columns' uses the `sort' utility program, and so
  764.      cannot work properly on text containing tab characters.  Use `M-x
  765.      `untabify'' to convert tabs to spaces before sorting.
  766.  
  767.      The `sort-columns' function did not work on VMS prior to Emacs 19.
  768.  
  769. 
  770. File: elisp,  Node: Indentation,  Next: Columns,  Prev: Sorting,  Up: Text
  771.  
  772. Indentation
  773. ===========
  774.  
  775.    The indentation functions are used to examine, move to, and change
  776. whitespace that is at the beginning of a line.  Some of the functions
  777. can also change whitespace elsewhere on a line.  Indentation always
  778. counts from zero at the left margin.
  779.  
  780. * Menu:
  781.  
  782. * Primitive Indent::      Functions used to count and insert indentation.
  783. * Mode-Specific Indent::  Customize indentation for different modes.
  784. * Region Indent::         Indent all the lines in a region.
  785. * Relative Indent::       Indent the current line based on previous lines.
  786. * Indent Tabs::           Adjustable, typewriter-like tab stops.
  787. * Motion by Indent::      Move to first non-blank character.
  788.  
  789. 
  790. File: elisp,  Node: Primitive Indent,  Next: Mode-Specific Indent,  Up: Indentation
  791.  
  792. Indentation Primitives
  793. ----------------------
  794.  
  795.    This section describes the primitive functions used to count and
  796. insert indentation.  The functions in the following sections use these
  797. primitives.
  798.  
  799.  - Function: current-indentation
  800.      This function returns the indentation of the current line, which is
  801.      the horizontal position of the first nonblank character.  If the
  802.      contents are entirely blank, then this is the horizontal position
  803.      of the end of the line.
  804.  
  805.  - Command: indent-to COLUMN &optional MINIMUM
  806.      This function indents from point with tabs and spaces until COLUMN
  807.      is reached.  If MINIMUM is specified and non-`nil', then at least
  808.      that many spaces are inserted even if this requires going beyond
  809.      COLUMN.  The value is the column at which the inserted indentation
  810.      ends.
  811.  
  812.  - User Option: indent-tabs-mode
  813.      If this variable is non-`nil', indentation functions can insert
  814.      tabs as well as spaces.  Otherwise, they insert only spaces.
  815.      Setting this variable automatically makes it local to the current
  816.      buffer.
  817.  
  818. 
  819. File: elisp,  Node: Mode-Specific Indent,  Next: Region Indent,  Prev: Primitive Indent,  Up: Indentation
  820.  
  821. Indentation Controlled by Major Mode
  822. ------------------------------------
  823.  
  824.    An important function of each major mode is to customize the TAB key
  825. to indent properly for the language being edited.  This section
  826. describes the mechanism of the TAB key and how to control it.  The
  827. functions in this section return unpredictable values.
  828.  
  829.  - Variable: indent-line-function
  830.      This variable's value is the function to be used by TAB (and
  831.      various commands) to indent the current line.  The command
  832.      `indent-according-to-mode' does no more than call this function.
  833.  
  834.      In Lisp mode, the value is the symbol `lisp-indent-line'; in C
  835.      mode, `c-indent-line'; in Fortran mode, `fortran-indent-line'.  In
  836.      Fundamental mode, Text mode, and many other modes with no standard
  837.      for indentation, the value is `indent-to-left-margin' (which is the
  838.      default value).
  839.  
  840.  - Command: indent-according-to-mode
  841.      This command calls the function in `indent-line-function' to
  842.      indent the current line in a way appropriate for the current major
  843.      mode.
  844.  
  845.  - Command: indent-for-tab-command
  846.      This command calls the function in `indent-line-function' to
  847.      indent the current line, except that if that function is
  848.      `indent-to-left-margin', `insert-tab' is called instead.  (That is
  849.      a trivial command which inserts a tab character.)
  850.  
  851.  - Variable: left-margin
  852.      This variable is the column to which the default
  853.      `indent-line-function' will indent.  (That function is
  854.      `indent-to-left-margin'.)  In Fundamental mode, LFD indents to
  855.      this column.  This variable automatically becomes buffer-local when
  856.      set in any fashion.
  857.  
  858.  - Function: indent-to-left-margin
  859.      This is the default `indent-line-function', used in Fundamental
  860.      mode, Text mode, etc.  Its effect is to adjust the indentation at
  861.      the beginning of the current line to the value specified by the
  862.      variable `left-margin'.  This may involve either inserting or
  863.      deleting whitespace.
  864.  
  865.  - Command: newline-and-indent
  866.      This function inserts a newline, then indents the new line (the one
  867.      following the newline just inserted) according to the major mode.
  868.  
  869.      Indentation is done using the current `indent-line-function'.  In
  870.      programming language modes, this is the same thing TAB does, but
  871.      in some text modes, where TAB inserts a tab, `newline-and-indent'
  872.      indents to the column specified by `left-margin'.
  873.  
  874.  - Command: reindent-then-newline-and-indent
  875.      This command reindents the current line, inserts a newline at
  876.      point, and then reindents the new line (the one following the
  877.      newline just inserted).
  878.  
  879.      Indentation of both lines is done according to the current major
  880.      mode; this means that the current value of `indent-line-function'
  881.      is called.  In programming language modes, this is the same thing
  882.      TAB does, but in some text modes, where TAB inserts a tab,
  883.      `reindent-then-newline-and-indent' indents to the column specified
  884.      by `left-margin'.
  885.  
  886. 
  887. File: elisp,  Node: Region Indent,  Next: Relative Indent,  Prev: Mode-Specific Indent,  Up: Indentation
  888.  
  889. Indenting an Entire Region
  890. --------------------------
  891.  
  892.    This section describes commands which indent all the lines in the
  893. region.  They return unpredictable values.
  894.  
  895.  - Command: indent-region START END TO-COLUMN
  896.      This command indents each nonblank line starting between START
  897.      (inclusive) and END (exclusive).  If TO-COLUMN is `nil',
  898.      `indent-region' indents each nonblank line by calling the current
  899.      mode's indentation function, the value of `indent-line-function'.
  900.  
  901.      If TO-COLUMN is non-`nil', it should be an integer specifying the
  902.      number of columns of indentation; then this function gives each
  903.      line exactly that much indentation, by either adding or deleting
  904.      whitespace.
  905.  
  906.      If there is a fill prefix, `indent-region' indents each line by
  907.      making it start with the fill prefix.
  908.  
  909.  - Variable: indent-region-function
  910.      The value of this variable is a function that can be used by
  911.      `indent-region' as a short cut.  You should design the function so
  912.      that it will produce the same results as indenting the lines of the
  913.      region one by one (but presumably faster).
  914.  
  915.      If the value is `nil', there is no short cut, and `indent-region'
  916.      actually works line by line.
  917.  
  918.      A short cut function is useful in modes such as C mode and Lisp
  919.      mode, where the `indent-line-function' must scan from the
  920.      beginning of the function: applying it to each line would be
  921.      quadratic in time.  The short cut can update the scan information
  922.      as it moves through the lines indenting them; this takes linear
  923.      time.  If indenting a line individually is fast, there is no need
  924.      for a short cut.
  925.  
  926.      `indent-region' with a non-`nil' argument has a different
  927.      definition and does not use this variable.
  928.  
  929.  - Command: indent-rigidly START END COUNT
  930.      This command indents all lines starting between START (inclusive)
  931.      and END (exclusive) sideways by `count' columns.  This "preserves
  932.      the shape" of the affected region, moving it as a rigid unit.
  933.      Consequently, this command is useful not only for indenting
  934.      regions of unindented text, but also for indenting regions of
  935.      formatted code.
  936.  
  937.      For example, if COUNT is 3, this command adds 3 columns of
  938.      indentation to each of the lines beginning in the region specified.
  939.  
  940.      In Mail mode, `C-c C-y' (`mail-yank-original') uses
  941.      `indent-rigidly' to indent the text copied from the message being
  942.      replied to.
  943.  
  944.  - Function: indent-code-rigidly START END COLUMNS &optional
  945.           NOCHANGE-REGEXP
  946.      This is like `indent-rigidly', except that it doesn't alter lines
  947.      that start within strings or comments.
  948.  
  949.      In addition, it doesn't alter a line if NOCHANGE-REGEXP matches at
  950.      the beginning of the line (if NOCHANGE-REGEXP is non-`nil').
  951.  
  952. 
  953. File: elisp,  Node: Relative Indent,  Next: Indent Tabs,  Prev: Region Indent,  Up: Indentation
  954.  
  955. Indentation Relative to Previous Lines
  956. --------------------------------------
  957.  
  958.    This section describes two commands which indent the current line
  959. based on the contents of previous lines.
  960.  
  961.  - Command: indent-relative &optional UNINDENTED-OK
  962.      This function inserts whitespace at point, extending to the same
  963.      column as the next "indent point" of the previous nonblank line.
  964.      An indent point is a non-whitespace character following
  965.      whitespace.  The next indent point is the first one at a column
  966.      greater than the current column of point.  For example, if point
  967.      is underneath and to the left of the first non-blank character of
  968.      a line of text, it moves to that column by inserting whitespace.
  969.  
  970.      If the previous nonblank line has no next indent point (i.e., none
  971.      at a great enough column position), this function either does
  972.      nothing (if UNINDENTED-OK is non-`nil') or calls `tab-to-tab-stop'.
  973.      Thus, if point is underneath and to the right of the last column
  974.      of a short line of text, this function moves point to the next tab
  975.      stop by inserting whitespace.
  976.  
  977.      This command returns an unpredictable value.
  978.  
  979.      In the following example, point is at the beginning of the second
  980.      line:
  981.  
  982.                       This line is indented twelve spaces.
  983.           -!-The quick brown fox jumped.
  984.  
  985.      Evaluation of the expression `(indent-relative nil)' produces the
  986.      following:
  987.  
  988.                       This line is indented twelve spaces.
  989.                       -!-The quick brown fox jumped.
  990.  
  991.      In this example, point is between the `m' and `p' of `jumped':
  992.  
  993.                       This line is indented twelve spaces.
  994.           The quick brown fox jum-!-ped.
  995.  
  996.      Evaluation of the expression `(indent-relative nil)' produces the
  997.      following:
  998.  
  999.                       This line is indented twelve spaces.
  1000.           The quick brown fox jum  -!-ped.
  1001.  
  1002.  - Command: indent-relative-maybe
  1003.      This command indents the current line like the previous nonblank
  1004.      line.  The function consists of a call to `indent-relative' with a
  1005.      non-`nil' value passed to the UNINDENTED-OK optional argument.
  1006.      The value is unpredictable.
  1007.  
  1008.      If the previous line has no indentation, the current line is given
  1009.      no indentation (any existing indentation is deleted); if the
  1010.      previous nonblank line has no indent points beyond the column at
  1011.      which point starts, nothing is changed.
  1012.  
  1013. 
  1014. File: elisp,  Node: Indent Tabs,  Next: Motion by Indent,  Prev: Relative Indent,  Up: Indentation
  1015.  
  1016. Adjustable "Tab Stops"
  1017. ----------------------
  1018.  
  1019.    This section explains the mechanism for user-specified "tab stops"
  1020. and the mechanisms which use and set them.  The name "tab stops" is
  1021. used because the feature is similar to that of the tab stops on a
  1022. typewriter.  The feature works by inserting an appropriate number of
  1023. spaces and tab characters to reach the designated position, like the
  1024. other indentation functions; it does not affect the display of tab
  1025. characters in the buffer (*note Usual Display::.).  Note that the TAB
  1026. character as input uses this tab stop feature only in a few major
  1027. modes, such as Text mode.
  1028.  
  1029.  - Function: tab-to-tab-stop
  1030.      This function inserts spaces or tabs up to the next tab stop column
  1031.      defined by `tab-stop-list'.  It searches the list for an element
  1032.      greater than the current column number, and uses that element as
  1033.      the column to indent to.  If no such element is found, then
  1034.      nothing is done.
  1035.  
  1036.  - User Option: tab-stop-list
  1037.      This variable is the list of tab stop columns used by
  1038.      `tab-to-tab-stops'.  The elements should be integers in increasing
  1039.      order.  The tab stop columns need not be evenly spaced.
  1040.  
  1041.      Use `M-x edit-tab-stops' to edit the location of tab stops
  1042.      interactively.
  1043.  
  1044. 
  1045. File: elisp,  Node: Motion by Indent,  Prev: Indent Tabs,  Up: Indentation
  1046.  
  1047. Indentation-Based Motion Commands
  1048. ---------------------------------
  1049.  
  1050.    These commands, primarily for interactive use, act based on the
  1051. indentation in the text.
  1052.  
  1053.  - Command: back-to-indentation
  1054.      This command moves point to the first non-whitespace character in
  1055.      the current line (which is the line in which point is located).
  1056.      It returns `nil'.
  1057.  
  1058.  - Command: backward-to-indentation ARG
  1059.      This command moves point backward ARG lines and then to the first
  1060.      nonblank character on that line.  It returns `nil'.
  1061.  
  1062.  - Command: forward-to-indentation ARG
  1063.      This command moves point forward ARG lines and then to the first
  1064.      nonblank character on that line.  It returns `nil'.
  1065.  
  1066. 
  1067. File: elisp,  Node: Columns,  Next: Case Changes,  Prev: Indentation,  Up: Text
  1068.  
  1069. Counting Columns
  1070. ================
  1071.  
  1072.    The column functions convert between a character position (counting
  1073. characters from the beginning of the buffer) and a column position
  1074. (counting screen characters from the beginning of a line).
  1075.  
  1076.    Column number computations ignore the width of the window and the
  1077. amount of horizontal scrolling.  Consequently, a column value can be
  1078. arbitrarily high.  The first (or leftmost) column is numbered 0.
  1079.  
  1080.    A character counts according to the number of columns it occupies on
  1081. the screen.  This means control characters count as occupying 2 or 4
  1082. columns, depending upon the value of `ctl-arrow', and tabs count as
  1083. occupying a number of columns that depends on the value of `tab-width'
  1084. and on the column where the tab begins.  *Note Usual Display::.
  1085.  
  1086.  - Function: current-column
  1087.      This function returns the horizontal position of point, measured in
  1088.      columns, counting from 0 at the left margin.  The column count is
  1089.      calculated by adding together the widths of all the displayed
  1090.      representations of the characters between the start of the current
  1091.      line and point.
  1092.  
  1093.      For a more complicated example of the use of `current-column', see
  1094.      the description of `count-lines' in *Note Text Lines::.
  1095.  
  1096.  - Function: move-to-column COLUMN &optional FORCE
  1097.      This function moves point to COLUMN in the current line.  The
  1098.      calculation of COLUMN takes into account the widths of all the
  1099.      displayed representations of the characters between the start of
  1100.      the line and point.
  1101.  
  1102.      If the argument COLUMN is greater than the column position of the
  1103.      end of the line, point moves to the end of the line.  If COLUMN is
  1104.      negative, point moves to the beginning of the line.
  1105.  
  1106.      If it is impossible to move to column COLUMN because that is in
  1107.      the middle of a multicolumn character such as a tab, point moves
  1108.      to the end of that character.  However, if FORCE is non-`nil', and
  1109.      COLUMN is in the middle of a tab, then `move-to-column' converts
  1110.      the tab into spaces so that it can move precisely to column COLUMN.
  1111.  
  1112.      The argument FORCE also has an effect if the line isn't long
  1113.      enough to reach column COLUMN; in that case, it says to indent at
  1114.      the end of the line to reach that column.
  1115.  
  1116.      If COLUMN is not an integer, an error is signaled.
  1117.  
  1118.      The return value is the column number actually moved to.
  1119.  
  1120.