home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / info / elisp.i22 < prev    next >
Encoding:
GNU Info File  |  1993-06-14  |  49.4 KB  |  1,151 lines

  1. This is Info file elisp, produced by Makeinfo-1.47 from the input file
  2. elisp.texi.
  3.  
  4.    This file documents GNU Emacs Lisp.
  5.  
  6.    This is edition 1.03 of the GNU Emacs Lisp Reference Manual, for
  7. Emacs Version 18.
  8.  
  9.    Published by the Free Software Foundation, 675 Massachusetts Avenue,
  10. Cambridge, MA 02139 USA
  11.  
  12.    Copyright (C) 1990 Free Software Foundation, Inc.
  13.  
  14.    Permission is granted to make and distribute verbatim copies of this
  15. manual provided the copyright notice and this permission notice are
  16. preserved on all copies.
  17.  
  18.    Permission is granted to copy and distribute modified versions of
  19. this manual under the conditions for verbatim copying, provided that
  20. the entire resulting derived work is distributed under the terms of a
  21. permission notice identical to this one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that this permission notice may be stated in a
  26. translation approved by the Foundation.
  27.  
  28. 
  29. File: elisp,  Node: Flow Control,  Next: Batch Mode,  Prev: Terminal Output,  Up: System Interface
  30.  
  31. Flow Control
  32. ============
  33.  
  34.    This section attempts to answer the question "Why does Emacs choose
  35. to use flow-control characters in its command character set?"  For a
  36. second view on this issue, read the comments on flow control in the
  37. `emacs/INSTALL' file from the distribution; for help with termcaps and
  38. DEC terminal concentrators, see `emacs/etc/TERMS'.
  39.  
  40.    At one time, most terminals did not need flow control.  This meant
  41. that the choice of `C-s' and `C-q' as command characters was
  42. reasonable.  Emacs, for economy of keystrokes and portability, chose to
  43. use the control characters in the ASCII character set, and tried to
  44. make the assignments mnemonic (thus, `C-s' for search and `C-q' for
  45. quote).
  46.  
  47.    Later, some terminals were introduced which used these characters for
  48. flow control.  They were not very good terminals, so Emacs maintainers
  49. did not pay attention.  In later years, the practice became widespread
  50. among terminals, but by this time it was usually an option.  And the
  51. majority of users, who can turn flow control off, were unwilling to
  52. switch to less mnemonic key bindings for the sake of flow control.
  53.  
  54.    So which usage is "right", Emacs's or that of some terminal and
  55. concentrator manufacturers?  This is a rhetorical (or religious)
  56. question; it has no simple answer.
  57.  
  58.    One reason why we are reluctant to cater to the problems caused by
  59. `C-s' and `C-q' is that they are gratuitous.  There are other
  60. techniques (albeit less common in practice) for flow control that
  61. preserve transparency of the character stream.  Note also that their use
  62. for flow control is not an official standard.  Interestingly, on the
  63. model 33 teletype with a paper tape punch (which is very old), `C-s'
  64. and `C-q' were sent by the computer to turn the punch on and off!
  65.  
  66.    GNU Emacs (version 18.48 and later) provides several options for
  67. coping with terminals or front-ends that insist on using flow control
  68. characters.  Listed in estimated order of preference, these options are
  69. as follows:
  70.  
  71.   1. Have Emacs run in CBREAK mode with the kernel handling flow
  72.      control.  Issue `(set-input-mode nil t)' from `.emacs'.  After
  73.      doing this, it is necessary to find other keys to bind to the
  74.      commands `isearch-forward' and `quoted-insert'.  The usual
  75.      nominees are `C-^' and `C-\'.  There are two ways to get this
  76.      effect:
  77.  
  78.        1. Use the `keyboard-translate-table' to cause `C-^' and `C-\'
  79.           to be received by Emacs as though `C-s' and `C-q' were typed.
  80.            Emacs (except at its very lowest level) never knows that the
  81.           characters typed were anything but `C-s' and `C-q', so the use
  82.           of these keys inside `isearch-forward' still works--typing
  83.           `C-^' while incremental searching will move the cursor to the
  84.           next match, etc.  For example:
  85.  
  86.                (setq keyboard-translate-table (make-string 128 0))
  87.                (let ((i 0))
  88.                  (while (< i 128)
  89.                    (aset keyboard-translate-table i i)
  90.                    (setq i (1+ i))))
  91.                
  92.                  ;; Swap `C-s' and `C-\'.
  93.                  (aset the-table ?\034 ?\^s)
  94.                  (aset the-table ?\^s ?\034)
  95.                  ;; Swap `C-q' and `C-^'.
  96.                  (aset the-table ?\036 ?\^q)
  97.                  (aset the-table ?\^q ?\036)))
  98.  
  99.        2. Simply rebind the keys `C-^' and `C-\' to `isearch-forward'
  100.           and `quoted-insert'.  To use the new keys to repeat searches,
  101.           it is necessary to set `search-repeat-char' to `C-^' as well.
  102.  
  103.   2. Don't use CBREAK mode, but cause `C-s' and `C-q' to be bound to a
  104.      null command.  The problem with this solution is that the flow
  105.      control characters were probably sent because whatever sent them is
  106.      falling behind on the characters being sent to it.  The characters
  107.      that find their way to the terminal screen will not in general be
  108.      those that are intended.  Also, it will be be necessary to find
  109.      other keys to bind to `isearch-forward' and `quoted-insert'; see
  110.      the previous alternative.
  111.  
  112.      Here is a suitable null command:
  113.  
  114.           (defun noop ()
  115.             "Do nothing; return nil."
  116.             (interactive))
  117.  
  118.   3. Don't use CBREAK mode, and unset the `C-s' and `C-q' keys with the
  119.      `global-unset-key' function.  This is similar to the previous
  120.      alternative, except that the flow control characters will probably
  121.      cause beeps or visible bells.
  122.  
  123.      Note that if the terminal is the source of the flow control
  124.      characters and kernel flow control handling is enabled, you
  125.      probably will not have to send padding characters as specified in
  126.      a termcap or terminfo entry. In this case, it may be possible to
  127.      customize a termcap entry to provide better Emacs performance on
  128.      the assumption that flow control is in use. This effect can also
  129.      be simulated by announcing (with `stty' or its equivalent) that
  130.      the terminal is running at a very slow speed, provided you are
  131.      communicating across a network so that `stty' does not actually
  132.      try to change the line speed.
  133.  
  134. 
  135. File: elisp,  Node: Batch Mode,  Prev: Flow Control,  Up: System Interface
  136.  
  137. Batch Mode
  138. ==========
  139.  
  140.    The command line option `-batch' causes Emacs to run
  141. noninteractively.  In this mode, Emacs does not read commands from the
  142. terminal, it does not alter the terminal modes, and it does not expect
  143. to be outputting to an erasable screen.  The idea is that you will
  144. specify Lisp programs to run; when they are finished, Emacs should exit.
  145. The way to specify the programs to run is with `-l FILE', which causes
  146. the library named FILE to be loaded, and `-f FUNCTION', which causes
  147. FUNCTION to be called with no arguments.
  148.  
  149.    Any Lisp program output that would normally go to the echo area,
  150. either using `message' or using `prin1', etc., with `t' as the stream,
  151. will actually go to Emacs's standard output descriptor when in batch
  152. mode.  Thus, Emacs behaves much like a noninteractive application
  153. program.  (The echo area output that Emacs itself normally generates,
  154. such as command echoing, is suppressed entirely.)
  155.  
  156.  -- Variable: noninteractive
  157.      This variable is non-`nil' when Emacs is running in batch mode.
  158.  
  159. 
  160. File: elisp,  Node: Emacs Display,  Next: Tips,  Prev: System Interface,  Up: Top
  161.  
  162. Emacs Display
  163. *************
  164.  
  165.    This chapter describes a number of features related to the display
  166. that Emacs presents to the user.
  167.  
  168. * Menu:
  169.  
  170. * Refresh Screen::      Clearing the screen and redrawing everything on it.
  171. * Screen Attributes::   How big is the Emacs screen.
  172. * Truncation::          Folding or wrapping long text lines.
  173. * The Echo Area::       Where messages are displayed.
  174. * Selective Display::   Hiding part of the buffer text.
  175. * Overlay Arrow::       Display of an arrow to indicate position.
  176. * Temporary Displays::  Displays that go away automatically.
  177. * Waiting::             Forcing display update and waiting for user.
  178. * Blinking::            How Emacs shows the matching open parenthesis.
  179. * Control Char Display::  How control characters are displayed.
  180. * Beeping::             Audible signal to the user.
  181. * Window Systems::      Which window system is being used.
  182.  
  183. 
  184. File: elisp,  Node: Refresh Screen,  Next: Screen Attributes,  Prev: Emacs Display,  Up: Emacs Display
  185.  
  186. Refreshing the Screen
  187. =====================
  188.  
  189.  -- Command: redraw-display
  190.      This function clears the screen and redraws what is supposed to
  191.      appear on it.
  192.  
  193. 
  194. File: elisp,  Node: Screen Attributes,  Next: Truncation,  Prev: Refresh Screen,  Up: Emacs Display
  195.  
  196. Screen Attributes
  197. =================
  198.  
  199.    The screen attribute functions describe and define the
  200. characteristics of the terminal.
  201.  
  202.  -- Function: screen-height
  203.      This function returns the number of lines on the screen that are
  204.      available for display.
  205.  
  206.           (screen-height)
  207.                => 50
  208.  
  209.  -- Function: screen-width
  210.      This function returns the number of columns on the screen that are
  211.      available for display.
  212.  
  213.           (screen-width)
  214.                => 80
  215.  
  216.  -- Function: set-screen-height LINES &optional NOT-ACTUAL-SIZE
  217.      This function declares that the terminal can display LINES lines.
  218.      The sizes of existing windows will be altered proportionally to
  219.      fit.
  220.  
  221.      If NOT-ACTUAL-SIZE is non-`nil', then Emacs will display LINES
  222.      lines of output, but will not change its value for the actual
  223.      height of the screen.  Knowing the correct actual size may be
  224.      necessary for correct cursor positioning.
  225.  
  226.      If LINES is different from what it was previously, then the entire
  227.      screen is cleared and redisplayed using the new size.
  228.  
  229.      This function returns `nil'.
  230.  
  231.  -- Function: set-screen-width COLUMNS &optional NOT-ACTUAL-SIZE
  232.      This function declares that the terminal can display COLUMNS
  233.      columns.  The details are as in `set-screen-height'.
  234.  
  235.  -- Variable: no-redraw-on-reenter
  236.      This variable controls whether Emacs redraws the entire screen
  237.      after it has been suspended and resumed.  Non-`nil' means yes,
  238.      `nil' means no.  On most terminals, it is necessary to redraw. 
  239.      Not redrawing is useful if the terminal can remember and restore
  240.      the Emacs screen contents.
  241.  
  242.  -- Variable: inverse-video
  243.      This variable controls whether Emacs uses inverse video for all
  244.      text on the screen.  Non-`nil' means yes, `nil' means no.  The
  245.      default is `nil'.
  246.  
  247.  -- User Option: mode-line-inverse-video
  248.      This variable controls the use of inverse video for mode lines. 
  249.      If it is non-`nil', then mode lines are displayed in inverse video
  250.      (or another suitable display mode).  Otherwise, mode lines are
  251.      displayed normal, just like the rest of the screen.  The default
  252.      is `t'.
  253.  
  254. 
  255. File: elisp,  Node: Truncation,  Next: The Echo Area,  Prev: Screen Attributes,  Up: Emacs Display
  256.  
  257. Truncation
  258. ==========
  259.  
  260.    When a line of text extends beyond the right edge of a window, the
  261. line can either be truncated or continued on the next line.  When a line
  262. is truncated, this is shown with a `$' in the rightmost column of the
  263. window.  When a line is continued or "wrapped" onto the next line, this
  264. is shown with a `\' on the rightmost column of the window. The
  265. additional screen lines used to display a long text line are called
  266. "continuation" lines.  (Note that wrapped lines are not filled; filling
  267. has nothing to do with truncation and continuation. *Note Filling::.)
  268.  
  269.  -- User Option: truncate-lines
  270.      This buffer-local variable controls how Emacs displays lines that
  271.      extend beyond the right edge of the window.  If it is non-`nil',
  272.      then Emacs does not display continuation lines; but rather each
  273.      line of text will take exactly one screen line, and a dollar sign
  274.      will be shown at the edge of any line that extends to or beyond
  275.      the edge of the window.  The default is `nil'.
  276.  
  277.      If the variable `truncate-partial-width-windows' is non-`nil',
  278.      then truncation is used for windows that are not the full width of
  279.      the screen, regardless of the value of `truncate-lines'.
  280.  
  281.  -- Variable: default-truncate-lines
  282.      This variable is the default value for `truncate-lines' in buffers
  283.      that do not override it.
  284.  
  285.  -- User Option: truncate-partial-width-windows
  286.      This variable determines how lines that are too wide to fit on the
  287.      screen are displayed in side-by-side windows (*note Splitting
  288.      Windows::.).  If it is non-`nil', then wide lines are truncated
  289.      (with a `$' at the end of the line); otherwise they are wrapped
  290.      (with a `\' at the end of the line).
  291.  
  292. 
  293. File: elisp,  Node: The Echo Area,  Next: Selective Display,  Prev: Truncation,  Up: Emacs Display
  294.  
  295. The Echo Area
  296. =============
  297.  
  298.    The "echo area" is used for displaying messages made with the
  299. `message' primitive, and for echoing keystrokes.  It is not the same as
  300. the minibuffer, despite the fact that the minibuffer appears (when
  301. active) in the same place on the screen as the echo area.  The `GNU
  302. Emacs Manual' specifies the rules for resolving conflicts between the
  303. echo area and the minibuffer for use of that screen space (*note The
  304. Minibuffer: (emacs)Minibuffer.).
  305.  
  306.    You can write output in the echo area by using the Lisp printing
  307. funtions with `t' as the stream (*note Output Functions::.), or as
  308. follows:
  309.  
  310.  -- Function: message STRING &rest ARGUMENTS
  311.      This function prints a one-line message in the echo area.  The
  312.      argument STRING is similar to a C language `printf' control
  313.      string.  See `format' in *Note String Conversion::, for the details
  314.      on the conversion specifications.  `message' returns the
  315.      constructed string.
  316.  
  317.           (message "Minibuffer depth is %d." (minibuffer-depth))
  318.           => "Minibuffer depth is 0."
  319.           
  320.           ---------- Echo Area ----------
  321.           Minibuffer depth is 0.
  322.           ---------- Echo Area ----------
  323.  
  324.  -- Variable: cursor-in-echo-area
  325.      This variable controls where the cursor is positioned when a
  326.      message is displayed in the echo area.  If it is non-`nil', then
  327.      the cursor appears at the end of the message.  Otherwise, the
  328.      cursor appears at point--not in the echo area at all.
  329.  
  330.      The value is normally `nil' except when bound to `t' for brief
  331.      periods of time.
  332.  
  333. 
  334. File: elisp,  Node: Selective Display,  Next: Overlay Arrow,  Prev: The Echo Area,  Up: Emacs Display
  335.  
  336. Selective Display
  337. =================
  338.  
  339.    "Selective display" is a class of minor modes in which specially
  340. marked lines do not appear on the screen, or in which highly indented
  341. lines do not appear.
  342.  
  343.    The first variant, explicit selective display, is designed for use in
  344. a Lisp program.  The program controls which lines are hidden by altering
  345. the text.  Outline mode uses this variant.  In the second variant, the
  346. choice of lines to hide is made automatically based on indentation.
  347. This variant is designed as a user-level feature.
  348.  
  349.    The way you control explicit selective display is by replacing a
  350. newline (control-j) with a control-m.  The text which was formerly a
  351. line following that newline is now invisible.  Strictly speaking, it is
  352. no longer a separate line, since only newlines can separate lines; it is
  353. now part of the previous line.
  354.  
  355.    On its own, selective display does not affect editing commands.  For
  356. example, `C-f' (`forward-char') moves point unhesitatingly into
  357. invisible space.  However, the replacement of newline characters with
  358. carriage return characters affects some editing commands.  For example,
  359. `next-line' skips invisible lines, since it searches only for newlines.
  360.  Modes that use selective display can also define commands that take
  361. account of the newlines, or which make parts of the text visible or
  362. invisible.
  363.  
  364.    When you write a selectively displayed buffer into a file, all the
  365. control-m's are replaced by their original newlines.  This means that
  366. when you next read in the file, it looks OK, with nothing invisible.
  367. Selective display is an effect that is seen only in Emacs.
  368.  
  369.  -- Variable: selective-display
  370.      This buffer-local variable enables selective display.  This means
  371.      that lines, or portions of lines, may be made invisible.
  372.  
  373.         * If the value of `selective-display' is `t', then any portion
  374.           of a line that follows a control-m will not be displayed.
  375.  
  376.         * If the value of `selective-display' is a positive integer,
  377.           then lines that start with more than `selective-display'
  378.           columns of indentation will not be displayed.
  379.  
  380.      When some portion of a buffer is invisible, the vertical movement
  381.      commands operate as if that portion did not exist, allowing a
  382.      single `next-line' command to skip any number of invisible lines.
  383.      However, character movement commands (such as `forward-char') will
  384.      not skip the invisible portion, and it is possible (if tricky) to
  385.      insert or delete parts of an invisible portion.
  386.  
  387.      In the examples below, what is shown is the *display* of the buffer
  388.      `foo', which changes with the value of `selective-display'.  The
  389.      *contents* of the buffer do not change.
  390.  
  391.           (setq selective-display nil)
  392.                => nil
  393.           
  394.           ---------- Buffer: foo ----------
  395.           1 on this column
  396.            2on this column
  397.             3n this column
  398.             3n this column
  399.            2on this column
  400.           1 on this column
  401.           ---------- Buffer: foo ----------
  402.           
  403.           (setq selective-display 2)
  404.                => 2
  405.           
  406.           ---------- Buffer: foo ----------
  407.           1 on this column
  408.            2on this column
  409.            2on this column
  410.           1 on this column
  411.           ---------- Buffer: foo ----------
  412.  
  413.  -- Variable: selective-display-ellipses
  414.      If this buffer-local variable is non-`nil', then Emacs displays
  415.      `...' at the end of a line that is followed by invisible text.
  416.      This example is a continuation of the previous one.
  417.  
  418.           (setq selective-display-ellipses t)
  419.                => t
  420.           
  421.           ---------- Buffer: foo ----------
  422.           1 on this column
  423.            2on this column ...
  424.            2on this column
  425.           1 on this column
  426.           ---------- Buffer: foo ----------
  427.  
  428. 
  429. File: elisp,  Node: Overlay Arrow,  Next: Temporary Displays,  Prev: Selective Display,  Up: Emacs Display
  430.  
  431. Overlay Arrow
  432. =============
  433.  
  434.    The "overlay arrow" is useful for directing the user's attention to
  435. a particular line in a buffer.  For example, in the modes used for
  436. interface to debuggers, the overlay arrow indicates the current line of
  437. code about to be executed.
  438.  
  439.  -- Variable: overlay-arrow-string
  440.      This variable holds the string to display as an arrow, or `nil' if
  441.      the arrow feature is not in use.
  442.  
  443.  -- Variable: overlay-arrow-position
  444.      This variable holds a marker which indicates where to display the
  445.      arrow. It should point at the beginning of a line.  The arrow text
  446.      will be displayed at the beginning of that line, overlaying any
  447.      text that would otherwise appear.  Since the arrow is usually
  448.      short, and the line usually begins with indentation, normally
  449.      nothing significant is overwritten.
  450.  
  451.      The overlay string is displayed only in the buffer which this
  452.      marker points into.  Thus, only one buffer can have an overlay
  453.      arrow at any given time.
  454.  
  455. 
  456. File: elisp,  Node: Temporary Displays,  Next: Waiting,  Prev: Overlay Arrow,  Up: Emacs Display
  457.  
  458. Temporary Displays
  459. ==================
  460.  
  461.    Temporary displays are used by commands to put output into a buffer
  462. and then present it to the user for perusal rather than for editing.
  463. Many of the help commands use this feature.
  464.  
  465.  -- Special Form: with-output-to-temp-buffer BUFFER-NAME FORMS...
  466.      This function executes FORMS while arranging to insert any output
  467.      they print into the buffer named BUFFER-NAME.  The buffer is then
  468.      shown in some window for viewing, displayed but not selected.
  469.  
  470.      The buffer is named by the string BUFFER-NAME, and it need not
  471.      already exist.  The argument BUFFER-NAME must be a string, not a
  472.      buffer.  The buffer is erased initially (with no questions asked),
  473.      and it is marked as unmodified after `with-output-to-temp-buffer'
  474.      exits.
  475.  
  476.      `with-output-to-temp-buffer' first binds `standard-output' to the
  477.      buffer, then it evaluates the forms in FORMS.  With
  478.      `standard-output' rebound, any output directed there will naturally
  479.      be inserted into that buffer.  Only Lisp output directed to the
  480.      stream `standard-output' is affected; screen display and messages
  481.      in the echo area, although output in the general sense of the
  482.      word, are not affected.  *Note Output Functions::.
  483.  
  484.      The value of the last form in FORMS is returned.
  485.  
  486.           ---------- Buffer: foo ----------
  487.            This is the contents of foo.
  488.           ---------- Buffer: foo ----------
  489.           
  490.           (with-output-to-temp-buffer "foo"
  491.               (print 20)
  492.               (print standard-output))
  493.           => #<buffer foo>
  494.           
  495.           ---------- Buffer: foo ----------
  496.           20
  497.           
  498.           #<buffer foo>
  499.           
  500.           ---------- Buffer: foo ----------
  501.  
  502.  -- Variable: temp-buffer-show-hook
  503.      The value of the `temp-buffer-show-hook' variable is either `nil'
  504.      or is called as a function to display a help buffer.  This
  505.      variable is used by `with-output-to-temp-buffer'.
  506.  
  507.  -- Function: momentary-string-display STRING POSITION &optional CHAR
  508.           MESSAGE
  509.      This function momentarily displays STRING in the current buffer at
  510.      POSITION (which is a character offset from the beginning of the
  511.      buffer).  The display remains until the next character is typed.
  512.  
  513.      If the next character the user types is CHAR, Emacs ignores it.
  514.      Otherwise, that character remains buffered for subsequent use as
  515.      input. Thus, typing CHAR will simply remove the string from the
  516.      display, while typing (say) `C-f' will remove the string from the
  517.      display and later (presumably) move point forward.  The argument
  518.      CHAR is a space by default.
  519.  
  520.      The result of `momentary-string-display' is not useful.
  521.  
  522.      If MESSAGE is non-`nil', it is displayed in the echo area.  If it
  523.      is `nil', then instructions to type CHAR are displayed there,
  524.      e.g., `Type RET to continue editing'.
  525.  
  526.      In this example, point is initially located at the beginning of the
  527.      second line:
  528.  
  529.           ---------- Buffer: foo ----------
  530.           This is the contents of foo.
  531.           -!-This is the contents of foo.
  532.           ---------- Buffer: foo ----------
  533.           
  534.           (momentary-string-display
  535.              "******* Important Message! *******" (point) ?\r
  536.              "Type RET when done reading")
  537.           => t
  538.           
  539.           ---------- Buffer: foo ----------
  540.           This is the contents of foo.
  541.           ******* Important Message! *******This is the contents of foo.
  542.           ---------- Buffer: foo ----------
  543.           
  544.           ---------- Echo Area ----------
  545.           Type RET when done reading
  546.  
  547.      This function works by actually changing the text in the buffer. 
  548.      As a result, if you later undo in this buffer, you will see the
  549.      message come and go.
  550.  
  551. 
  552. File: elisp,  Node: Waiting,  Next: Blinking,  Prev: Temporary Displays,  Up: Emacs Display
  553.  
  554. Waiting for Elapsed Time or Input
  555. =================================
  556.  
  557.    The waiting commands are designed to make Emacs wait for a certain
  558. amount of time to pass or until there is input.  For example, you may
  559. wish to pause in the middle of a computation to allow the user time to
  560. view the display.  `sit-for' performs a pause with an update of screen,
  561. while `sleep-for' performs a pause without updating the screen.
  562.  
  563.  -- Function: sit-for SECONDS
  564.      This function performs redisplay (provided there is no pending
  565.      input from the user), then waits SECONDS seconds, or until input is
  566.      available.  The result is `t' if `sit-for' waited the full time
  567.      with no input arriving (see `input-pending-p' in *Note Keyboard
  568.      Input::).  Otherwise, `nil' is returned.
  569.  
  570.      Redisplay is always preempted if input arrives, and does not
  571.      happen at all if input is available before it starts.  Thus, there
  572.      is no way to force screen updating if there is pending input;
  573.      however, if there is no input pending, you can force an update
  574.      with no delay by using `(sit-for 0)'.
  575.  
  576.      The purpose of `sit-for' to give the user time to read text that
  577.      you display.
  578.  
  579.  -- Function: sleep-for SECONDS
  580.      This function simply pauses for SECONDS seconds without updating
  581.      the display.  It pays no attention to available input.  It returns
  582.      `nil'.
  583.  
  584.      Use `sleep-for' when you wish to guarantee a delay.
  585.  
  586. 
  587. File: elisp,  Node: Blinking,  Next: Control Char Display,  Prev: Waiting,  Up: Emacs Display
  588.  
  589. Blinking
  590. ========
  591.  
  592.    This section describes the mechanism by which Emacs shows a matching
  593. open parenthesis when the user inserts a close parenthesis.
  594.  
  595.  -- Variable: blink-paren-hook
  596.      The value of this variable should be a function (of no arguments)
  597.      to be called whenever a char with close parenthesis syntax is
  598.      inserted. The value of `blink-paren-hook' may be `nil', in which
  599.      case nothing is done.
  600.  
  601.           *Note:* in version 18, this function is named
  602.           `blink-paren-hook', but since it is not called with the
  603.           standard convention for hooks, it is being renamed to
  604.           `blink-paren-function' in version 19.
  605.  
  606.  -- Variable: blink-matching-paren
  607.      If this variable is `nil', then `blink-matching-open' does nothing.
  608.  
  609.  -- Variable: blink-matching-paren-distance
  610.      This variable specifies the maximum distance to scan for a matching
  611.      parenthesis before giving up.
  612.  
  613.  -- Function: blink-matching-open
  614.      This function is the default value of `blink-paren-hook'.  It
  615.      assumes that point follows a character with close parenthesis
  616.      syntax and moves the cursor momentarily to the matching opening
  617.      character.  If that character is not already on the screen, then
  618.      its context is shown by displaying it in the echo area.  To avoid
  619.      long delays, this function does not search farther than
  620.      `blink-matching-paren-distance' characters.
  621.  
  622.      Here is an example of calling this function explicitly.
  623.  
  624.           (defun interactive-blink-matching-open ()
  625.             "Indicate momentarily the start of sexp before point."
  626.             (interactive)
  627.             (let ((blink-matching-paren-distance (buffer-size))
  628.                   (blink-matching-paren t))
  629.               (blink-matching-open)))
  630.  
  631. 
  632. File: elisp,  Node: Control Char Display,  Next: Beeping,  Prev: Blinking,  Up: Emacs Display
  633.  
  634. Display of Control Characters
  635. =============================
  636.  
  637.    These variables affect the way certain characters are displayed on
  638. the screen.  Since they change the number of columns the characters
  639. occupy, they also affect the indentation functions.
  640.  
  641.  -- User Option: ctl-arrow
  642.      This buffer-local variable controls how control characters are
  643.      displayed.  If it is non-`nil', they are displayed as an uparrow
  644.      followed by the character: `^A'.  If it is `nil', they are
  645.      displayed as a backslash followed by three octal digits: `\001'.
  646.  
  647.  -- Variable: default-ctl-arrow
  648.      The value of this variable is the default value for `ctl-arrow' in
  649.      buffers that do not override it.  This is the same as
  650.      `(default-value 'ctl-arrow)' (*note Default Value::.).
  651.  
  652.  -- User Option: tab-width
  653.      The value of this variable is the spacing between tab stops used
  654.      for displaying tab characters in Emacs buffers.  The default is 8.
  655.       Note that this feature is completely independent from the
  656.      user-settable tab stops used by the command `tab-to-tab-stop'. 
  657.      *Note Indent Tabs::.
  658.  
  659. 
  660. File: elisp,  Node: Beeping,  Next: Window Systems,  Prev: Control Char Display,  Up: Emacs Display
  661.  
  662. Beeping
  663. =======
  664.  
  665.    You can make Emacs ring a bell (or blink the screen) to attract the
  666. user's attention.  Be conservative about how often you do this; frequent
  667. bells can become irritating.  Also be careful not to use beeping alone
  668. when signaling an error is appropriate.  (*Note Errors::.)
  669.  
  670.  -- Function: ding &optional DONT-TERMINATE
  671.      This function beeps, or flashes the screen (see `visible-bell'
  672.      below). It also terminates any keyboard macro currently executing
  673.      unless DONT-TERMINATE is non-`nil'.
  674.  
  675.  -- Function: beep &optional DONT-TERMINATE
  676.      This is a synonym for `ding'.
  677.  
  678.  -- Variable: visible-bell
  679.      This variable determines whether Emacs will try to flash the
  680.      screen to represent a bell.  Non-`nil' means yes, `nil' means no. 
  681.      This is effective only if the termcap entry for the terminal in
  682.      use has the visible bell flag (`vb') set.
  683.  
  684. 
  685. File: elisp,  Node: Window Systems,  Prev: Beeping,  Up: Emacs Display
  686.  
  687. Window Systems
  688. ==============
  689.  
  690.    Emacs works with several window systems, most notably X Windows. 
  691. Note that both Emacs and the X Window System use the term "window", but
  692. use it differently.  The entire Emacs screen is a single window as far
  693. as X Windows is concerned; the individual Emacs windows are not known
  694. to X Windows at all.
  695.  
  696.  -- Variable: window-system
  697.      This variable tells Lisp programs what window system Emacs is
  698.      running under.  Its value should be a symbol such as `x' (if Emacs
  699.      is running under X Windows) or `nil' (if Emacs is running on an
  700.      ordinary terminal).
  701.  
  702.  -- Variable: window-system-version
  703.      This variable distinguishes between different versions of the X
  704.      Window System.  Its value is 10 or 11 when using X Windows; `nil'
  705.      otherwise.
  706.  
  707.  -- Variable: window-setup-hook
  708.      The value of the `window-setup-hook' variable is either `nil' or a
  709.      function for Emacs to call after loading your `.emacs' file and
  710.      the default initialization file (if any), after loading
  711.      terminal-specific Lisp code, and after calling `term-setup-hook'. 
  712.      `window-setup-hook' is called with no arguments.
  713.  
  714.      This hook is used for internal purposes: setting up communication
  715.      with the window system, and creating the initial window.  Users
  716.      should not interfere with it.
  717.  
  718. 
  719. File: elisp,  Node: Tips,  Next: GNU Emacs Internals,  Prev: Emacs Display,  Up: Top
  720.  
  721. Tips and Standards
  722. ******************
  723.  
  724.    This chapter describes no additional features of Emacs Lisp. Instead
  725. it gives advice on making effective use of the features described in
  726. the previous chapters.
  727.  
  728. * Menu:
  729.  
  730. * Style Tips::                Writing clean and robust programs.
  731. * Compilation Tips::          Making compiled code run fast.
  732. * Documentation Tips::        Writing readable documentation strings.
  733.  
  734. 
  735. File: elisp,  Node: Style Tips,  Next: Compilation Tips,  Prev: Tips,  Up: Tips
  736.  
  737. Writing Clean Lisp Programs
  738. ===========================
  739.  
  740.    Here are some tips for avoiding common errors in writing Lisp code
  741. intended for widespread use:
  742.  
  743.    * Since all global variables share the same name space, and all
  744.      functions share another name space, you should choose a short word
  745.      to distinguish your program from other Lisp programs.  Then take
  746.      care to begin the names of all global variables, constants, and
  747.      functions with the chosen prefix.  This helps avoid name conflicts.
  748.  
  749.      This recommendation applies even to names for traditional Lisp
  750.      primitives that are not primitives in Emacs Lisp--even to `cadr'.
  751.      Believe it or not, there is more than one plausible way to define
  752.      `cadr'.  Play it safe; append your name prefix to produce a name
  753.      like `foo-cadr' or `mylib-cadr' instead.
  754.  
  755.      If one prefix is insufficient, your package may use two or three
  756.      alternative common prefixes, so long as they make sense.
  757.  
  758.    * It is often useful to put a call to `provide' in each separate
  759.      library program, at least if there is more than one entry point to
  760.      the program.
  761.  
  762.    * If one file FOO uses a macro defined in another file BAR, FOO
  763.      should contain `(require 'BAR)' before the first use of the macro.
  764.       (And BAR should contain `(provide 'BAR)', to make the `require'
  765.      work.)  This will cause BAR to be loaded when you byte-compile
  766.      FOO.  Otherwise, you risk compiling FOO without the necessary
  767.      macro loaded, and that would produce compiled code that won't work
  768.      right.  *Note Compiling Macros::.
  769.  
  770.    * If you define a major mode, make sure to run a hook variable using
  771.      `run-hooks', just as the existing major modes do.  *Note Hooks::.
  772.  
  773.    * Please do not define `C-c LETTER' as a key.  These sequences are
  774.      reserved for users; they are the *only* sequences reserved for
  775.      users, so we cannot do without them.
  776.  
  777.      Everything in Emacs that used to define such sequences has been
  778.      changed, which was a lot of work.  Abandoning this convention
  779.      would waste that work and inconvenience the users.
  780.  
  781.    * It is a bad idea to define aliases for the Emacs primitives. Use
  782.      the standard names instead.
  783.  
  784.    * Redefining an Emacs primitive is an even worse idea. It may do the
  785.      right thing for a particular program, but there is no telling what
  786.      other programs might break as a result.
  787.  
  788.    * If a file does replace any of the functions or library programs of
  789.      standard Emacs, prominent comments at the beginning of the file
  790.      should say which functions are replaced, and how the behavior of
  791.      the replacements differs from that of the originals.
  792.  
  793.    * If a file requires certain standard library programs to be loaded
  794.      beforehand, then the comments at the beginning of the file should
  795.      say so.
  796.  
  797.    * Don't use `next-line' or `previous-line' in programs; nearly
  798.      always, `forward-line' is more convenient as well as more
  799.      predictable and robust.  *Note Text Lines::.
  800.  
  801.    * Don't use functions that set the mark in your Lisp code (unless
  802.      you are writing a command to set the mark).  The mark is a
  803.      user-level feature, so it is incorrect to change the mark except
  804.      to supply a value for the user's benefit.  *Note The Mark::.
  805.  
  806.      In particular, don't use these functions:
  807.  
  808.         * `beginning-of-buffer', `end-of-buffer'
  809.  
  810.         * `replace-string', `replace-regexp'
  811.  
  812.      If you just want to move point, or replace a certain string,
  813.      without any of the other features intended for interactive users,
  814.      you can replace these functions with one or two lines of simple
  815.      Lisp code.
  816.  
  817.    * The recommended way to print a message in the echo area is with
  818.      the `message' function, not `princ'.  *Note The Echo Area::.
  819.  
  820.    * When you encounter an error condition, call the function `error'
  821.      (or `signal').  The function `error' does not return. *Note
  822.      Signaling Errors::.
  823.  
  824.      Do not use `message', `throw', `sleep-for', or `beep' to report
  825.      errors.
  826.  
  827.    * Avoid using recursive edits.  Instead, do what the Rmail `w'
  828.      command does: use a new local keymap that contains one command
  829.      defined to switch back to the old local keymap.  Or do what the
  830.      `edit-options' command does: switch to another buffer and let the
  831.      user switch back at will.  *Note Recursive Editing::.
  832.  
  833.    * In some other systems there is a convention of choosing variable
  834.      names that begin and end with `*'.  We don't use that convention
  835.      in Emacs Lisp, so please don't use it in your library.  The users
  836.      will find Emacs more coherent if all libraries use the same
  837.      conventions.
  838.  
  839.    * Indent each function with `C-M-q' (`indent-sexp') using the
  840.      default indentation parameters.
  841.  
  842.    * Don't make a habit of putting close-parentheses on lines by
  843.      themselves; Lisp programmers find this disconcerting.  Once in a
  844.      while, when there is a sequence of many consecutive
  845.      close-parentheses, it may make sense to split them in one or two
  846.      significant places.
  847.  
  848.    * Please put a copyright notice on the file if you give copies to
  849.      anyone. Use the same lines that appear at the top of the Lisp
  850.      files in Emacs itself.  If you have not signed papers to assign
  851.      the copyright to the Foundation, then place your name in the
  852.      copyright notice in place of the Foundation's name.
  853.  
  854. 
  855. File: elisp,  Node: Compilation Tips,  Next: Documentation Tips,  Prev: Style Tips,  Up: Tips
  856.  
  857. Tips for Making Compiled Code Fast
  858. ==================================
  859.  
  860.    Here are ways of improving the execution speed of byte-compiled lisp
  861. programs.
  862.  
  863.    * Use iteration rather than recursion whenever possible. Function
  864.      calls are slow in Emacs Lisp even when a compiled function is
  865.      calling another compiled function.
  866.  
  867.    * Using the primitive list-searching functions `memq', `assq' or
  868.      `assoc' is even faster than explicit iteration.  It may be worth
  869.      rearranging a data structure so that one of these primitive search
  870.      functions can be used.
  871.  
  872.      For example, if you want to search a list of strings for a string
  873.      equal to a given one, you can use an explicit loop:
  874.  
  875.           (let ((tail list))
  876.             (while (and tail (not (string= string (car tail))))
  877.               (setq tail (cdr tail))))
  878.  
  879.      However, if you use a list of elements of the form `(STRING)',
  880.      such as `(("foo") ("#&") ("bar"))', then you can search it with
  881.      `assoc':
  882.  
  883.           (assoc string list)
  884.  
  885.      The latter runs entirely in C code, so it is much faster.
  886.  
  887.    * Certain built-in functions are handled specially by the byte
  888.      compiler avoiding the need for an ordinary function call.  It is a
  889.      good idea to use these functions rather than alternatives.  To see
  890.      whether a function is handled specially by the compiler, examine
  891.      its `byte-compile' property.  If the property is non-`nil', then
  892.      the function is handled specially.
  893.  
  894.      For example, the following input will show you that `aref' is
  895.      compiled specially (*note Array Functions::.) while `elt' is not
  896.      (*note Sequence Functions::.):
  897.  
  898.           (get 'aref 'byte-compile)
  899.                => byte-compile-two-args
  900.           
  901.           (get 'elt 'byte-compile)
  902.                => nil
  903.  
  904.    * Often macros result in faster execution than functions.  For
  905.      example, the following macro and the following function have the
  906.      same effect when called, but code using the macro runs faster
  907.      because it avoids an extra call to a user-defined function:
  908.  
  909.           (defmacro fast-cadr (x) (list 'car (list 'cdr x)))
  910.           
  911.           (defun slow-cadr (x) (car (cdr x)))
  912.  
  913. 
  914. File: elisp,  Node: Documentation Tips,  Prev: Compilation Tips,  Up: Tips
  915.  
  916. Tips for Documentation Strings
  917. ==============================
  918.  
  919.    Here are some tips for the writing of documentation strings.
  920.  
  921.    * Every command, function or variable intended for users to know
  922.      about should have a documentation string.
  923.  
  924.    * An internal subroutine of a Lisp program need not have a
  925.      documentation string, and you can save space by using a comment
  926.      instead.
  927.  
  928.    * The first line of the documentation string should consist of one
  929.      or two complete sentences which stand on their own as a summary. 
  930.      In particular, start the line with a capital letter and end with a
  931.      period.
  932.  
  933.      The documentation string can have additional lines which expand on
  934.      the details of how to use the function or variable.  The
  935.      additional lines should be made up of complete sentences also, but
  936.      they may be filled if that looks good.
  937.  
  938.    * Do not start or end a documentation string with whitespace.
  939.  
  940.    * Format the documentation string so that it fits in an Emacs window
  941.      on an 80 column screen.  It is a good idea for most lines to be no
  942.      wider than 60 characters.  The first line can be wider if
  943.      necessary to fit the information that ought to be there.
  944.  
  945.      However, rather than simply filling the entire documentation
  946.      string, you can make it much more readable by choosing line breaks
  947.      with care. Use blank lines between topics if the documentation
  948.      string is long.
  949.  
  950.    * *Do not* indent subsequent lines of a documentation string so that
  951.      the text is lined up in the source code with the text of the first
  952.      line.  This looks nice in the source code, but looks bizarre when
  953.      users view the documentation.  Remember that the indentation
  954.      before the starting double-quote is not part of the string!
  955.  
  956.    * A variable's documentation string should start with `*' if the
  957.      variable is one that users would want to set interactively often. 
  958.      If the value is a long list, or a function, or if the variable
  959.      would only be set in init files, then don't start the
  960.      documentation string with `*'.  *Note Defining Variables::.
  961.  
  962.    * The documentation string for a variable that is a yes-or-no flag
  963.      should start with words such as "Non-nil means...", to make it
  964.      clear both that the variable only has two meaningfully distinct
  965.      values and which value means "yes".
  966.  
  967.    * When a function's documentation string mentions the value of an
  968.      argument of the function, use the argument name in capital letters
  969.      as if it were a name for that value.  Thus, the documentation
  970.      string of the function `/' refers to its second argument as
  971.      `DIVISOR'.
  972.  
  973.      Also use all caps for meta-syntactic variables, such as when you
  974.      show the decomposition of a list or vector into subunits, some of
  975.      which may be variable.
  976.  
  977.    * When a documentation string refers to a Lisp symbol, write it as it
  978.      would be printed (which usually means in lower case), with
  979.      single-quotes around it.  For example: ``lambda''.  There are two
  980.      exceptions: write `t' and `nil' without single-quotes.
  981.  
  982.    * Don't write key sequences directly in documentation strings. 
  983.      Instead, use the `\\[...]' construct to stand for them.  For
  984.      example, instead of writing `C-f', write `\\[forward-char]'.  When
  985.      the documentation string is printed, Emacs will substitute
  986.      whatever key is currently bound to `forward-char'.  This will
  987.      usually be `C-f', but if the user has moved key bindings, it will
  988.      be the correct key for that user.  *Note Keys in Documentation::.
  989.  
  990.    * In documentation strings for a major mode, you will want to refer
  991.      to the key bindings of that mode's local map, rather than global
  992.      ones. Therefore, use the construct `\\<...>' once in the
  993.      documentation string to specify which key map to use.  Do this
  994.      before the first use of `\\[...]'.  The text inside the `\\<...>'
  995.      should be the name of the variable containing the local keymap for
  996.      the major mode.
  997.  
  998. 
  999. File: elisp,  Node: GNU Emacs Internals,  Next: Standard Errors,  Prev: Tips,  Up: Top
  1000.  
  1001. GNU Emacs Internals
  1002. *******************
  1003.  
  1004.    This chapter describes how the runnable Emacs executable is dumped
  1005. with the preloaded Lisp libraries in it, how storage is allocated, and
  1006. some internal aspects of GNU Emacs that may be of interest to C
  1007. programmers.
  1008.  
  1009. * Menu:
  1010.  
  1011. * Building Emacs::      How to preload Lisp libraries into Emacs.
  1012. * Pure Storage::        A kludge to make preloaded Lisp functions sharable.
  1013. * Garbage Collection::  Reclaiming space for Lisp objects no longer used.
  1014. * Object Internals::    Data formats of buffers, windows, processes.
  1015. * Writing Emacs Primitives::   Writing C code for Emacs.
  1016.  
  1017. 
  1018. File: elisp,  Node: Building Emacs,  Next: Pure Storage,  Prev: GNU Emacs Internals,  Up: GNU Emacs Internals
  1019.  
  1020. Building Emacs
  1021. ==============
  1022.  
  1023.    The first step in building Emacs is to compile the C sources.  This
  1024. produces a program called `temacs', also called a "bare impure Emacs". 
  1025. It contains the Emacs Lisp interpreter and I/O routines, but not the
  1026. editing commands.
  1027.  
  1028.    Then, to create a working Emacs editor, issue the command `temacs -l
  1029. loadup'.  This directs `temacs' to evaluate the Lisp files specified in
  1030. the file `loadup.el'.  These files set up the normal Emacs editing
  1031. environment, resulting in an Emacs which is still impure but no longer
  1032. bare.
  1033.  
  1034.    It takes long time to load the standard Lisp files.  Luckily, you
  1035. don't have to do this each time you run Emacs; `temacs' can dump out an
  1036. executable program called `xemacs' which has these files preloaded. 
  1037. `xemacs' starts more quickly because it does not need to load the
  1038. files.  It is `xemacs' that is normally installed under the name
  1039. `emacs' for users to run.
  1040.  
  1041.    To create `xemacs', use the command `temacs -batch -l loadup dump'. 
  1042. The purpose of `-batch' here is to prevent `temacs' from trying to
  1043. initialize any of its data on the terminal; this ensures that the
  1044. tables of terminal information are empty in the dumped Emacs.
  1045.  
  1046.    When the `xemacs' executable is started, it will automatically load
  1047. the user's `.emacs' file, or the default initialization file
  1048. `default.el' if the user has none.  With the `.emacs' file, you can
  1049. produce a version of Emacs that suits you and is not the same as the
  1050. version other people use.  With `default.el', you can customize Emacs
  1051. for all the users at your site who don't choose to customize it for
  1052. themselves.  (For further reflection: why is this different from the
  1053. case of the barber who shaves every man who doesn't shave himself?)
  1054.  
  1055.    On some systems, dumping does not work.  Then, you must start Emacs
  1056. with the `temacs -l loadup' command each time you use it.  This takes a
  1057. long time, but since you need to start Emacs once a day at most--and
  1058. once a week or less frequently if you never log out--the extra time is
  1059. not too severe a problem.
  1060.  
  1061.    Before `xemacs' is dumped, the documentation strings for primitive
  1062. and preloaded functions (and variables) need to be found in the file
  1063. where they are stored.  This is done by calling `Snarf-documentation'
  1064. (*note Accessing Documentation::.).  These strings are omitted from
  1065. `temacs' to save space. *Note Documentation Basics::.
  1066.  
  1067.  -- Function: dump-emacs TO-FILE FROM-FILE
  1068.      This function dumps the current state of Emacs into an executable
  1069.      file TO-FILE.  It takes symbols from FROM-FILE (this is normally
  1070.      the executable file `temacs').
  1071.  
  1072.      If you use this function in an Emacs that was already dumped, you
  1073.      must set `command-line-processed' to `nil' first for good results.
  1074.      *Note Command Line Arguments::.
  1075.  
  1076.  -- Command: emacs-version
  1077.      This function returns a string describing the version of Emacs
  1078.      that is running.  It is useful to include this string in bug
  1079.      reports.
  1080.  
  1081.           (emacs-version)
  1082.             => "GNU Emacs 18.36.1 of Fri Feb 27 1987 on slug (berkeley-unix)"
  1083.  
  1084.      Called interactively, the function prints the same information in
  1085.      the echo area.
  1086.  
  1087.  -- Variable: emacs-build-time
  1088.      The value of this variable is the time at which Emacs was built at
  1089.      the local site.
  1090.  
  1091.           emacs-build-time
  1092.                => "Fri Feb 27 14:55:57 1987"
  1093.  
  1094.  -- Variable: emacs-version
  1095.      The value of this variable is the version of Emacs being run.  It
  1096.      is a string, e.g. `"18.36.1"'.
  1097.  
  1098. 
  1099. File: elisp,  Node: Pure Storage,  Next: Garbage Collection,  Prev: Building Emacs,  Up: GNU Emacs Internals
  1100.  
  1101. Pure Storage
  1102. ============
  1103.  
  1104.    There are two types of storage in GNU Emacs Lisp for user-created
  1105. Lisp objects: "normal storage" and "pure storage".  Normal storage is
  1106. where all the new data which is created during an Emacs session is kept;
  1107. see the following section for information on normal storage.  Pure
  1108. storage is used for certain data in the preloaded standard Lisp files:
  1109. data that should never change during actual use of Emacs.
  1110.  
  1111.    Pure storage is allocated only while `temacs' is loading the
  1112. standard preloaded Lisp libraries.  In the file `xemacs', it is marked
  1113. as read-only (on operating systems which permit this), so that the
  1114. memory space can be shared by all the Emacs jobs running on the machine
  1115. at once.  Pure storage is not expandable; a fixed amount is allocated
  1116. when Emacs is compiled, and if that is not sufficient for the preloaded
  1117. libraries, `temacs' crashes.  If that happens, you will have to
  1118. increase the compilation parameter `PURESIZE' in the file `config.h'. 
  1119. This normally won't happen unless you try to preload additional
  1120. libraries or add features to the standard ones.
  1121.  
  1122.  -- Function: purecopy OBJECT
  1123.      This function makes a copy of OBJECT in pure storage and returns
  1124.      it.  It copies strings by simply making a new string with the same
  1125.      characters in pure storage.  It recursively copies the contents of
  1126.      vectors and cons cells.  It does not make copies of symbols, or any
  1127.      other objects, but just returns them unchanged.  It signals an
  1128.      error if asked to copy markers.
  1129.  
  1130.      This function is used only while Emacs is being built and dumped,
  1131.      and is called only in the file `emacs/lisp/loaddefs.el'.
  1132.  
  1133.  -- Variable: pure-bytes-used
  1134.      The value of this variable is the number of bytes of pure storage
  1135.      allocated so far.  Typically, in a dumped Emacs, this number is
  1136.      very close to the total amount of pure storage available--if it
  1137.      were not, we would preallocate less.
  1138.  
  1139.  -- Variable: purify-flag
  1140.      This variable determines whether `defun' should make a copy of the
  1141.      function definition in pure storage.  If it is non-`nil', then the
  1142.      function definition is copied into pure storage.
  1143.  
  1144.      This flag is `t' while loading all of the basic functions for
  1145.      building Emacs initially (allowing those functions to be sharable
  1146.      and non-collectible).  It is set to `nil' when Emacs is saved out
  1147.      as `xemacs'.  The flag is set and reset in the C sources.
  1148.  
  1149.      You should not change this flag in a running Emacs.
  1150.  
  1151.