home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / elisp / elisp-20 < prev    next >
Encoding:
GNU Info File  |  1993-05-31  |  49.8 KB  |  1,214 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: Deleting Windows,  Next: Selecting Windows,  Prev: Splitting Windows,  Up: Windows
  28.  
  29. Deleting Windows
  30. ================
  31.  
  32.    A window remains visible on its frame unless you "delete" it by
  33. calling certain functions that delete windows.  A deleted window cannot
  34. appear on the screen, but continues to exist as a Lisp object until
  35. there are no references to it.  There is no way to cancel the deletion
  36. of a window aside from restoring a saved window configuration (*note
  37. Window Configurations::.).  Restoring a window configuration also
  38. deletes any windows that aren't part of that configuration.
  39.  
  40.    When you delete a window, the space it took up is given to one
  41. adjacent sibling.  (In Emacs version 18, the space was divided evenly
  42. among all the siblings.)
  43.  
  44.  - Function: window-live-p WINDOW
  45.      This function returns `nil' if WINDOW is deleted, and `t'
  46.      otherwise.
  47.  
  48.      *Warning:* erroneous information or fatal errors may result from
  49.      using a deleted window as if it were live.
  50.  
  51.  - Command: delete-window &optional WINDOW
  52.      This function removes WINDOW from the display.  If WINDOW is
  53.      omitted, then the selected window is deleted.  An error is signaled
  54.      if there is only one window when `delete-window' is called.
  55.  
  56.      This function returns `nil'.
  57.  
  58.      When `delete-window' is called interactively, WINDOW defaults to
  59.      the selected window.
  60.  
  61.  - Command: delete-other-windows &optional WINDOW
  62.      This function makes WINDOW the only window on its frame, by
  63.      deleting all the other windows.  If WINDOW is omitted or `nil',
  64.      then the selected window is used by default.
  65.  
  66.      The result is `nil'.
  67.  
  68.  - Command: delete-windows-on BUFFER
  69.      This function deletes all windows showing BUFFER.  If there are no
  70.      windows showing BUFFER, then this function does nothing.  If all
  71.      windows in some frame are showing BUFFER (including the case where
  72.      there is only one window), then the frame reverts to having a
  73.      single window showing the buffer chosen by `other-buffer'.  *Note
  74.      The Buffer List::.
  75.  
  76.      If there are several windows showing different buffers, then those
  77.      showing BUFFER are removed, and the others are expanded to fill the
  78.      void.
  79.  
  80.      The result is `nil'.
  81.  
  82. 
  83. File: elisp,  Node: Selecting Windows,  Next: Cyclic Window Ordering,  Prev: Deleting Windows,  Up: Windows
  84.  
  85. Selecting Windows
  86. =================
  87.  
  88.    When a window is selected, the buffer in the window becomes the
  89. current buffer, and the cursor will appear in it.
  90.  
  91.  - Function: selected-window
  92.      This function returns the selected window.  This is the window in
  93.      which the cursor appears and to which many commands apply.
  94.  
  95.  - Function: select-window WINDOW
  96.      This function makes WINDOW the selected window.  The cursor then
  97.      appears in WINDOW (on redisplay).  The buffer being displayed in
  98.      WINDOW is immediately designated the current buffer.
  99.  
  100.      The return value is WINDOW.
  101.  
  102.           (setq w (next-window))
  103.           (select-window w)
  104.                => #<window 65 on windows.texi>
  105.  
  106.    The following functions choose one of the windows on the screen,
  107. offering various criteria for the choice.
  108.  
  109.  - Function: get-lru-window &optional ALL-FRAMES
  110.      This function returns the window least recently "used" (that is,
  111.      selected).  The selected window is always the most recently used
  112.      window.
  113.  
  114.      The selected window can be the least recently used window if it is
  115.      the only window.  A newly created window becomes the least
  116.      recently used window until it is selected.  The minibuffer window
  117.      is not considered a candidate.
  118.  
  119.      The argument ALL-FRAMES controls which set of windows are
  120.      considered.  If it is non-`nil', then all windows on all frames are
  121.      considered.  Otherwise, only windows in the selected frame are
  122.      considered.
  123.  
  124.  - Function: get-largest-window &optional ALL-FRAMES
  125.      This function returns the window with the largest area (height
  126.      times width).  If there are no side-by-side windows, then this is
  127.      the window with the most lines.  The minibuffer window is not
  128.      considered a candidate.
  129.  
  130.      If there are two windows of the same size, then the function
  131.      returns the window which is first in the cyclic ordering of
  132.      windows (see following section), starting from the selected window.
  133.  
  134.      The argument ALL-FRAMES controls which set of windows are
  135.      considered.  If it is non-`nil', then all windows on all frames are
  136.      considered.  Otherwise, only windows in the selected frame are
  137.      considered.
  138.  
  139. 
  140. File: elisp,  Node: Cyclic Window Ordering,  Next: Buffers and Windows,  Prev: Selecting Windows,  Up: Windows
  141.  
  142. Cycling Ordering of Windows
  143. ===========================
  144.  
  145.    When you use the command `C-x o' (`other-window') to select the next
  146. window, it moves through all the windows on the screen in a specific
  147. cyclic order.  For any given configuration of windows, this order never
  148. varies.  It is called the "cyclic ordering of windows".
  149.  
  150.    This ordering generally goes from top to bottom, and from left to
  151. right.  But it may go down first or go right first, depending on the
  152. order in which the windows were split.
  153.  
  154.    If the first split was vertical (into windows one above each other),
  155. and then the subwindows were split horizontally, then the ordering is
  156. left to right in the top, and then left to right in the next lower part
  157. of the frame, and so on.  If the first split was horizontal, the
  158. ordering is top to bottom in the left part, and so on.  In general,
  159. within each set of siblings at any level in the window tree, the order
  160. is left to right, or top to bottom.
  161.  
  162.  - Function: next-window WINDOW &optional MINIBUF ALL-FRAMES
  163.      This function returns the window following WINDOW in the cyclic
  164.      ordering of windows.  This is the window which `C-x o' would select
  165.      if done when WINDOW is selected.  If WINDOW is the only window
  166.      visible, then this function returns WINDOW.
  167.  
  168.      The value of the argument MINIBUF determines whether the
  169.      minibuffer is included in the window order.  Normally, when
  170.      MINIBUF is `nil', the minibuffer is included if it is currently
  171.      active; this is the behavior of `C-x o'.
  172.  
  173.      If MINIBUF is `t', then the cyclic ordering includes the
  174.      minibuffer window even if it is not active.
  175.  
  176.      If MINIBUF is neither `t' nor `nil', then the minibuffer window is
  177.      not included even if it is active.  (The minibuffer window is
  178.      active while the minibuffer is in use.  *Note Minibuffers::.)
  179.  
  180.      When there are multiple frames, this functions normally cycles
  181.      through all the windows in the selected frame, plus the minibuffer
  182.      used by the selected frame even if it lies in some other frame.
  183.  
  184.      If ALL-FRAMES is `t', then it cycles through all the windows in
  185.      all the frames that currently exist.
  186.  
  187.      If ALL-FRAMES is neither `t' nor `nil', then it cycles through
  188.      precisely the windows in the selected frame, excluding the
  189.      minibuffer in use if it lies in some other frame.
  190.  
  191.      This example shows two windows, which both happen to be displaying
  192.      the same buffer:
  193.  
  194.           (selected-window)
  195.                => #<window 56 on windows.texi>
  196.           (next-window (selected-window))
  197.                => #<window 52 on windows.texi>
  198.           (next-window (next-window (selected-window)))
  199.                => #<window 56 on windows.texi>
  200.  
  201.  - Function: previous-window WINDOW &optional MINIBUF ALL-FRAMES
  202.      This function returns the window preceding WINDOW in the cyclic
  203.      ordering of windows.  The other arguments affect which windows are
  204.      included in the cycle, as in `next-window'.
  205.  
  206.  - Command: other-window COUNT
  207.      This function selects the COUNTth next window in the cyclic order.
  208.      If count is negative, then it selects the -COUNTth preceding
  209.      window.  It returns `nil'.
  210.  
  211.      In an interactive call, COUNT is the numeric prefix argument.
  212.  
  213.  - Function: walk-windows PROC &optional MINIBUF ALL-FRAMES
  214.      This function cycles through all visible windows, calling `proc'
  215.      once for each window with the window as its sole argument.
  216.  
  217.      The optional argument MINIBUF says whether to include minibuffer
  218.      windows.  A value of `t' means count the minibuffer window even if
  219.      not active.  A value of `nil' means count it only if active.  Any
  220.      other value means not to count the minibuffer even if it is active.
  221.  
  222.      If the optional third argument ALL-FRAMES is `t', that means
  223.      include all windows in all frames.  If ALL-FRAMES is `nil', it
  224.      means to cycle within the selected frame, but include the
  225.      minibuffer window (if MINIBUF says so) that that frame uses, even
  226.      if it is on another frame.  If ALL-FRAMES is neither `nil' nor `t',
  227.      `walk-windows' sticks strictly to the selected frame.
  228.  
  229. 
  230. File: elisp,  Node: Buffers and Windows,  Next: Displaying Buffers,  Prev: Cyclic Window Ordering,  Up: Windows
  231.  
  232. Buffers and Windows
  233. ===================
  234.  
  235.    This section describes low-level functions to examine windows or to
  236. show buffers in windows in a precisely controlled fashion.  *Note
  237. Displaying Buffers::, for related functions that find a window to use
  238. and specify a buffer for it.  The functions described there are easier
  239. to use than these, but they employ heuristics in choosing or creating a
  240. window; use these functions when you need complete control.
  241.  
  242.  - Function: set-window-buffer WINDOW BUFFER-OR-NAME
  243.      This function makes WINDOW display BUFFER-OR-NAME as its contents.
  244.      It returns `nil'.
  245.  
  246.           (set-window-buffer (selected-window) "foo")
  247.                => nil
  248.  
  249.  - Function: window-buffer &optional WINDOW
  250.      This function returns the buffer that WINDOW is displaying.  If
  251.      WINDOW is omitted, then this function returns the buffer for the
  252.      selected window.
  253.  
  254.           (window-buffer)
  255.                => #<buffer windows.texi>
  256.  
  257.  - Function: get-buffer-window BUFFER-OR-NAME &optional ALL-FRAMES
  258.      This function returns a window currently displaying
  259.      BUFFER-OR-NAME, or `nil' if there is none.  If there are several
  260.      such windows, then the function returns the first one in the
  261.      cyclic ordering of windows, starting from the selected window.
  262.      *Note Cyclic Window Ordering::.
  263.  
  264.      The argument ALL-FRAMES controls which set of windows are
  265.      considered.  If it is non-`nil', then all windows on all frames are
  266.      considered.  Otherwise, only windows in the selected frame are
  267.      considered.
  268.  
  269.  - Command: replace-buffer-in-windows BUFFER
  270.      This function replaces BUFFER with some other buffer in all
  271.      windows displaying it.  The other buffer used is chosen with
  272.      `other-buffer'.  In the usual applications of this function, you
  273.      don't care which other buffer is used; you just want to make sure
  274.      that BUFFER is no longer displayed.
  275.  
  276.      This function returns `nil'.
  277.  
  278. 
  279. File: elisp,  Node: Displaying Buffers,  Next: Choosing Window,  Prev: Buffers and Windows,  Up: Windows
  280.  
  281. Displaying Buffers in Windows
  282. =============================
  283.  
  284.    In this section we describe convenient functions that choose a window
  285. automatically and use it to display a specified buffer.  These functions
  286. can also split an existing window in certain circumstances.  We also
  287. describe variables that parameterize the heuristics used for choosing a
  288. window.  *Note Buffers and Windows::, for low-level functions that give
  289. you more precise control.
  290.  
  291.    Do not use the functions in this section in order to make a buffer
  292. current so that a Lisp program can access or modify it; they are too
  293. drastic for that purpose, since they change the display of buffers in
  294. windows, which is gratuitous and will surprise the user.  Instead, use
  295. `set-buffer' (*note Current Buffer::.) and `save-excursion' (*note
  296. Excursions::.), which designate buffers as current for programmed
  297. access without affecting the display of buffers in windows.
  298.  
  299.  - Command: switch-to-buffer BUFFER-OR-NAME &optional NORECORD
  300.      This function makes BUFFER-OR-NAME the current buffer, and also
  301.      displays the buffer in the selected window.  This means that a
  302.      human can see the buffer and subsequent keyboard commands will
  303.      apply to it.  Contrast this with `set-buffer', which makes
  304.      BUFFER-OR-NAME the current buffer but does not display it in the
  305.      selected window.  *Note Current Buffer::.
  306.  
  307.      If BUFFER-OR-NAME does not identify an existing buffer, then a new
  308.      buffer by that name is created.
  309.  
  310.      Normally the specified buffer is put at the front of the buffer
  311.      list.  This affects the operation of `other-buffer'.  However, if
  312.      NORECORD is non-`nil', this is not done.  *Note The Buffer List::.
  313.  
  314.      The `switch-to-buffer' function is often used interactively, as
  315.      the binding of `C-x b'.  It is also used frequently in programs.
  316.      It always returns `nil'.
  317.  
  318.  - Command: switch-to-buffer-other-window BUFFER-OR-NAME
  319.      This function makes BUFFER-OR-NAME the current buffer and displays
  320.      it in a window not currently selected.  It then selects that
  321.      window.  The handling of the buffer is the same as in
  322.      `switch-to-buffer'.
  323.  
  324.      The previously selected window is absolutely never used to display
  325.      the buffer.  If it is the only window, then it is split to make a
  326.      distinct window for this purpose.  If the selected window is
  327.      already displaying the buffer, then it continues to do so, but
  328.      another window is nonetheless found to display it in as well.
  329.  
  330.  - Function: pop-to-buffer BUFFER-OR-NAME &optional OTHER-WINDOW
  331.      This function makes BUFFER-OR-NAME the current buffer and switches
  332.      to it in some window, preferably not the window previously
  333.      selected.  The "popped-to" window becomes the selected window.
  334.  
  335.      If the variable `pop-up-frames' is non-`nil', `pop-to-buffer'
  336.      creates a new frame to display the buffer in.  Otherwise, if the
  337.      variable `pop-up-windows' is non-`nil', windows may be split to
  338.      create a new window that is different from the original window.
  339.      For details, see *Note Choosing Window::.
  340.  
  341.      If OTHER-WINDOW is non-`nil', `pop-to-buffer' finds or creates
  342.      another window even if BUFFER-OR-NAME is already visible in the
  343.      selected window.  Thus BUFFER-OR-NAME could end up displayed in
  344.      two windows.  On the other hand, if BUFFER-OR-NAME is already
  345.      displayed in the selected window and OTHER-WINDOW is `nil', then
  346.      the selected window is considered sufficient display for
  347.      BUFFER-OR-NAME, so that nothing needs to be done.
  348.  
  349.      If BUFFER-OR-NAME is a string that does not name an existing
  350.      buffer, a buffer by that name is created.
  351.  
  352.      An example use of this function is found at the end of *Note
  353.      Filter Functions::.
  354.  
  355. 
  356. File: elisp,  Node: Choosing Window,  Next: Window Point,  Prev: Displaying Buffers,  Up: Windows
  357.  
  358. Choosing a Window
  359. =================
  360.  
  361.    This section describes the basic facility which chooses a window to
  362. display a buffer in--`display-buffer'.  All the higher-level functions
  363. and commands use this subroutine.  Here we describe how to use
  364. `display-buffer' and how to customize it.
  365.  
  366.  - Function: display-buffer BUFFER-OR-NAME &optional NOT-THIS-WINDOW
  367.      This function makes BUFFER-OR-NAME appear in some window, like
  368.      `pop-to-buffer', but it does not select that window and does not
  369.      make the buffer current.  The identity of the selected window is
  370.      unaltered by this function.
  371.  
  372.      If NOT-THIS-WINDOW is non-`nil', it means that the specified
  373.      buffer should be displayed in a window other than the selected
  374.      one, even if it is already on display in the selected window.
  375.      This can cause the buffer to appear in two windows at once.
  376.      Otherwise, if BUFFER-OR-NAME is already being displayed in any
  377.      window, that is good enough, so this function does nothing.
  378.  
  379.      `display-buffer' returns the window chosen to display
  380.      BUFFER-OR-NAME.
  381.  
  382.      Precisely how `display-buffer' finds or creates a window depends on
  383.      the variables described below.
  384.  
  385.    A window can be marked as "dedicated" to its buffer.  Then
  386. `display-buffer' does not try to use that window.
  387.  
  388.  - Function: window-dedicated-p WINDOW
  389.      This function returns `t' if WINDOW is marked as dedicated;
  390.      otherwise `nil'.
  391.  
  392.  - Function: set-window-dedicated-p WINDOW FLAG
  393.      This function marks WINDOW as dedicated if FLAGS is non-`nil', and
  394.      nondedicated otherwise.
  395.  
  396.  - User Option: pop-up-windows
  397.      This variable controls whether `display-buffer' makes new windows.
  398.      If it is non-`nil' and there is only one window, then that window
  399.      is split.  If it is `nil', then `display-buffer' does not split
  400.      the single window, but rather replaces its buffer.
  401.  
  402.  - User Option: split-height-threshold
  403.      This variable determines when `display-buffer' may split a window,
  404.      if there are multiple windows.  `display-buffer' splits the
  405.      largest window if it has at least this many lines.
  406.  
  407.      If there is only one window, it is split regardless of this value,
  408.      provided `pop-up-windows' is non-`nil'.
  409.  
  410.  - User Option: pop-up-frames
  411.      This variable controls whether `display-buffer' makes new frames.
  412.      If it is non-`nil', `display-buffer' makes a new frame.  If it is
  413.      `nil', then `display-buffer' either splits a window or reuses one.
  414.  
  415.      If this is non-`nil', the variables `pop-up-windows' and
  416.      `split-height-threshold' do not matter.
  417.  
  418.      *Note Frames::, for more information.
  419.  
  420.  - Variable: pop-up-frame-function
  421.      This variable specifies how to make a new frame if `pop-up-frame'
  422.      is non-`nil'.
  423.  
  424.      Its value should be a function of no arguments.  When
  425.      `display-buffer' makes a new frame, it does so by calling that
  426.      function, which should return a frame.  The default value of the
  427.      variable is a function which creates a frame using parameters from
  428.      `pop-up-frame-alist'.
  429.  
  430.  - Variable: pop-up-frame-alist
  431.      This variable holds an alist specifying frame parameters used when
  432.      `display-buffer' makes a new frame.  *Note Frame Parameters::, for
  433.      more information about frame parameters.
  434.  
  435.  - Variable: display-buffer-function
  436.      This variable is the most flexible way to customize the behavior of
  437.      `display-buffer'.  If it is non-`nil', it should be a function
  438.      that `display-buffer' calls to do the work.  The function should
  439.      accept two arguments, the same two arguments that `display-buffer'
  440.      received.  It should choose or create a window, display the
  441.      specified buffer, and then return the window.
  442.  
  443.      This hook takes precedence over all the other options and hooks
  444.      described above.
  445.  
  446. 
  447. File: elisp,  Node: Window Point,  Next: Window Start,  Prev: Choosing Window,  Up: Windows
  448.  
  449. Window Point
  450. ============
  451.  
  452.    Each window has its own value of point, independent of the value of
  453. point in other windows displaying the same buffer.  This makes it useful
  454. to have multiple windows showing one buffer.
  455.  
  456.    * The window point is established when a window is first created; it
  457.      is initialized from the buffer's point, or from the window point
  458.      of another window opened on the buffer if such a window exists.
  459.  
  460.    * Selecting a window sets the value of point in its buffer to the
  461.      window's value of point.  Conversely, deselecting a window sets
  462.      the window's value of point from that of the buffer.  Thus, when
  463.      you switch between windows that display a given buffer, the point
  464.      value for the selected window is in effect in the buffer, while
  465.      the point values for the other windows are stored in those windows.
  466.  
  467.    * As long as the selected window displays the current buffer, the
  468.      window's point and the buffer's point always move together; they
  469.      remain equal.
  470.  
  471.    * *Note Positions::, for more details on positions.
  472.  
  473.    As far as the user is concerned, point is where the cursor is, and
  474. when the user switches to another buffer, the cursor jumps to the
  475. position of point in that buffer.
  476.  
  477.  - Function: window-point WINDOW
  478.      This function returns the current position of point in WINDOW.
  479.      For a nonselected window, this is the value point would have (in
  480.      that window's buffer) if that window were selected.
  481.  
  482.      When WINDOW is the selected window and its buffer is also the
  483.      current buffer, the value returned is the same as point in that
  484.      buffer.
  485.  
  486.      Strictly speaking, it would be more correct to return the
  487.      "top-level" value of point, outside of any `save-excursion' forms.
  488.      But that value is hard to find.
  489.  
  490.  - Function: set-window-point WINDOW POSITION
  491.      This function positions point in WINDOW at position POSITION in
  492.      WINDOW's buffer.
  493.  
  494. 
  495. File: elisp,  Node: Window Start,  Next: Vertical Scrolling,  Prev: Window Point,  Up: Windows
  496.  
  497. The Window Start Position
  498. =========================
  499.  
  500.    Each window contains a marker used to keep track of a buffer position
  501. which specifies where in the buffer display should start.  This position
  502. is called the "display-start" position of the window (or just the
  503. "start").  The character after this position is the one that appears at
  504. the upper left corner of the window.  It is usually, but not
  505. inevitably, at the beginning of a text line.
  506.  
  507.  - Function: window-start &optional WINDOW
  508.      This function returns the display-start position of window WINDOW.
  509.      If WINDOW is `nil', the selected window is used.
  510.  
  511.           (window-start)
  512.                => 7058
  513.  
  514.      For a more complicated example of use, see the description of
  515.      `count-lines' in *Note Text Lines::.
  516.  
  517.  - Function: window-end &optional WINDOW
  518.      This function returns the position of the end of the display in
  519.      window WINDOW.  If WINDOW is `nil', the selected window is used.
  520.  
  521.  - Function: set-window-start WINDOW POSITION &optional NOFORCE
  522.      This function sets the display-start position of WINDOW to
  523.      POSITION in WINDOW's buffer.
  524.  
  525.      The display routines insist that the position of point be visible
  526.      when a buffer is displayed.  Normally, they change the
  527.      display-start position (that is, scroll the window) whenever
  528.      necessary to make point visible.  However, if you specify the
  529.      start position with this function with `nil' for NOFORCE, it means
  530.      you want display to start at POSITION even if that would put the
  531.      location of point off the screen.  What the display routines do in
  532.      this case is move point instead, to the left margin on the middle
  533.      line in the window.
  534.  
  535.      For example, if point is 1 and you attempt to set the start of the
  536.      window to 2, then the position of point would be "above" the top
  537.      of the window.  The display routines would automatically move
  538.      point if it is still 1 when redisplay occurs.  Here is an example:
  539.  
  540.           ;; Here is what `foo' looks like before executing
  541.           ;;   the `set-window-start' expression.
  542.           
  543.           ---------- Buffer: foo ----------
  544.           -!-This is the contents of buffer foo.
  545.           2
  546.           3
  547.           4
  548.           5
  549.           6
  550.           ---------- Buffer: foo ----------
  551.           
  552.           (set-window-start
  553.            (selected-window)
  554.            (1+ (window-start)))
  555.           
  556.           ;; Here is what `foo' looks like after executing
  557.           ;;   the `set-window-start' expression.
  558.           
  559.           ---------- Buffer: foo ----------
  560.           his is the contents of buffer foo.
  561.           2
  562.           3
  563.           -!-4
  564.           5
  565.           6
  566.           ---------- Buffer: foo ----------
  567.           
  568.                => 2
  569.  
  570.      However, when NOFORCE is non-`nil', `set-window-start' does
  571.      nothing if the specified start position would make point invisible.
  572.  
  573.      This function returns POSITION, regardless of whether the NOFORCE
  574.      option caused that position to be overruled.
  575.  
  576.  - Function: pos-visible-in-window-p &optional POSITION WINDOW
  577.      This function returns `t' if POSITION is within the range of text
  578.      currently visible on the screen in WINDOW.  It returns `nil' if
  579.      POSITION is scrolled vertically out of view.  The argument
  580.      POSITION defaults to the current position of point; WINDOW, to the
  581.      selected window.  Here is an example:
  582.  
  583.           (or
  584.           (pos-visible-in-window-p
  585.            (point) (selected-window))
  586.               (recenter 0))
  587.  
  588.      The `pos-visible-in-window-p' function considers only vertical
  589.      scrolling.  It returns `t' if POSITION is out of view only because
  590.      WINDOW has been scrolled horizontally.  *Note Horizontal
  591.      Scrolling::.
  592.  
  593. 
  594. File: elisp,  Node: Vertical Scrolling,  Next: Horizontal Scrolling,  Prev: Window Start,  Up: Windows
  595.  
  596. Vertical Scrolling
  597. ==================
  598.  
  599.    Vertical scrolling means moving the text up or down in a window.  It
  600. works by changing the value of the window's display-start location.  It
  601. may also change the value of `window-point' to keep it on the screen.
  602.  
  603.    In the commands `scroll-up' and `scroll-down', the directions "up"
  604. and "down" refer to the motion of the text in the buffer at which you
  605. are looking through the window.  Imagine that the text is written on a
  606. long roll of paper and that the scrolling commands move the paper up
  607. and down.  Thus, if you are looking at text in the middle of a buffer
  608. and repeatedly call `scroll-down', you will eventually see the
  609. beginning of the buffer.
  610.  
  611.    Some people have urged that the opposite convention be used: they
  612. imagine that the window moves over text that remains in place.  Then
  613. "down" commands would take you to the end of the buffer.  This view is
  614. more consistent with the actual relationship between windows and the
  615. text in the buffer, but it is less like what the user sees.  The
  616. position of a window on the terminal does not move, and short scrolling
  617. commands clearly move the text up or down on the screen.  We have chosen
  618. names that fit the user's point of view.
  619.  
  620.    The scrolling functions (aside from `scroll-other-window') will have
  621. unpredictable results if the current buffer is different from the
  622. buffer that is displayed in the selected window.  *Note Current
  623. Buffer::.
  624.  
  625.  - Command: scroll-up &optional COUNT
  626.      This function scrolls the text in the selected window upward COUNT
  627.      lines.  If COUNT is negative, scrolling is actually downward.
  628.  
  629.      If COUNT is `nil' (or omitted), then the length of scroll is
  630.      `next-screen-context-lines' lines less than the usable height of
  631.      the window (not counting its mode line).
  632.  
  633.      `scroll-up' returns `nil'.
  634.  
  635.  - Command: scroll-down &optional COUNT
  636.      This function scrolls the text in the selected window downward
  637.      COUNT lines.  If COUNT is negative, scrolling is actually upward.
  638.  
  639.      If COUNT is omitted or `nil', then the length of the scroll is
  640.      `next-screen-context-lines' lines less than the usable height of
  641.      the window.
  642.  
  643.      `scroll-down' returns `nil'.
  644.  
  645.  - Command: scroll-other-window &optional COUNT
  646.      This function scrolls the text in another window upward COUNT
  647.      lines.  Negative values of COUNT, or `nil', are handled as in
  648.      `scroll-up'.
  649.  
  650.      The window that is scrolled is normally the one following the
  651.      selected window in the cyclic ordering of windows--the window that
  652.      `next-window' would return.  *Note Cyclic Window Ordering::.
  653.  
  654.      If the selected window is the minibuffer, the next window is
  655.      normally the one at the top left corner.  However, you can specify
  656.      the window to scroll by binding the variable
  657.      `minibuffer-scroll-window'.  This variable has no effect when any
  658.      other window is selected.  *Note Minibuffer Misc::.
  659.  
  660.      When the minibuffer is active, it is the next window if the
  661.      selected window is the one at the bottom right corner.  In this
  662.      case, `scroll-other-window' attempts to scroll the minibuffer.  If
  663.      the minibuffer contains just one line, it has nowhere to scroll
  664.      to, so the line reappears after the echo area momentarily displays
  665.      the message "Beginning of buffer".
  666.  
  667.  - Variable: other-window-scroll-buffer
  668.      If this variable is non-`nil', it tells `scroll-other-window'
  669.      which buffer to scroll.
  670.  
  671.  - User Option: scroll-step
  672.      This variable controls how scrolling is done automatically when
  673.      point moves off the screen.  If the value is zero, then the text
  674.      is scrolled so that point is centered vertically in the window.
  675.      If the value is a positive integer N, then if it is possible to
  676.      bring point back on screen by scrolling N lines in either
  677.      direction, that is done; otherwise, point is centered vertically
  678.      as usual.  The default value is zero.
  679.  
  680.  - User Option: next-screen-context-lines
  681.      The value of this variable is the number of lines of continuity to
  682.      retain when scrolling by full screens.  For example, when
  683.      `scroll-up' executes, this many lines that were visible at the
  684.      bottom of the window move to the top of the window.  The default
  685.      value is `2'.
  686.  
  687.  - Command: recenter &optional COUNT
  688.      This function scrolls the selected window to put the text where
  689.      point is located at a specified vertical position within the
  690.      window.
  691.  
  692.      If COUNT is a nonnegative number, it puts the line containing
  693.      point COUNT lines down from the top of the window.  If COUNT is a
  694.      negative number, then it counts upward from the bottom of the
  695.      window, so that -1 stands for the last usable line in the window.
  696.      If COUNT is a non-`nil' list, then it stands for the line in the
  697.      middle of the window.
  698.  
  699.      If COUNT is `nil', then it puts the line containing point in the
  700.      middle of the window, then clears and redisplays the entire
  701.      selected frame.
  702.  
  703.      When `recenter' is called interactively, Emacs sets COUNT to the
  704.      raw prefix argument.  Thus, typing `C-u' as the prefix sets the
  705.      COUNT to a non-`nil' list, while typing `C-u 4' sets COUNT to 4,
  706.      which positions the current line four lines from the top.
  707.  
  708.      Typing `C-u 0 C-l' positions the current line at the top of the
  709.      window.  This action is so handy that some people bind the command
  710.      to a function key.  For example,
  711.  
  712.           (defun line-to-top-of-window ()
  713.             "Scroll current line to top of window.
  714.           Replaces three keystroke sequence C-u 0 C-l."
  715.             (interactive)
  716.             (recenter 0))
  717.           
  718.           (global-set-key "\C-cl" 'line-to-top-of-window)
  719.  
  720. 
  721. File: elisp,  Node: Horizontal Scrolling,  Next: Size of Window,  Prev: Vertical Scrolling,  Up: Windows
  722.  
  723. Horizontal Scrolling
  724. ====================
  725.  
  726.    Because we read English first from top to bottom and second from left
  727. to right, horizontal scrolling is not like vertical scrolling.  Vertical
  728. scrolling involves selection of a contiguous portion of text to display.
  729. Horizontal scrolling causes part of each line to go off screen.  The
  730. amount of horizontal scrolling is therefore specified as a number of
  731. columns rather than as a position in the buffer.  It has nothing to do
  732. with the display-start position returned by `window-start'.
  733.  
  734.    Usually, no horizontal scrolling is in effect; then the leftmost
  735. column is at the left edge of the window.  In this state, scrolling to
  736. the right is meaningless, since there is no data to the left of the
  737. screen to be revealed by it, so it is not allowed.  Scrolling to the
  738. left is allowed; it causes the first columns of text to go off the edge
  739. of the window and can reveal additional columns on the right that were
  740. truncated before.  Once a window has a nonzero amount of leftward
  741. horizontal scrolling, you can scroll it back to the right, but only so
  742. far as to reduce the net horizontal scroll to zero.  There is no limit
  743. to how far left you can scroll, but eventually all the text will
  744. disappear off the left edge.
  745.  
  746.  - Command: scroll-left COUNT
  747.      This function scrolls the selected window COUNT columns to the
  748.      left (or to the right if COUNT is negative).  The return value is
  749.      the total amount of leftward horizontal scrolling in effect after
  750.      the change--just like the value returned by `window-hscroll'.
  751.  
  752.  - Command: scroll-right COUNT
  753.      This function scrolls the selected window COUNT columns to the
  754.      right  (or to the left if COUNT is negative).  The return value is
  755.      the total amount of leftward horizontal scrolling in effect after
  756.      the change--just like the value returned by `window-hscroll'.
  757.  
  758.      Once you scroll a window as far right as it can go, back to its
  759.      normal position where the total leftward scrolling is zero,
  760.      attempts to scroll any farther have no effect.
  761.  
  762.  - Function: window-hscroll &optional WINDOW
  763.      This function returns the total leftward horizontal scrolling of
  764.      WINDOW--the number of columns by which the text in WINDOW is
  765.      scrolled left past the left margin.
  766.  
  767.      The value is never negative.  It is zero when no horizontal
  768.      scrolling has been done in WINDOW (which is usually the case).
  769.  
  770.      If WINDOW is `nil', the selected window is used.
  771.  
  772.           (window-hscroll)
  773.                => 0
  774.           (scroll-left 5)
  775.                => 5
  776.           (window-hscroll)
  777.                => 5
  778.  
  779.  - Function: set-window-hscroll WINDOW COLUMNS
  780.      This function sets the number of columns from the left margin that
  781.      WINDOW is scrolled to the value of COLUMNS.  The argument COLUMNS
  782.      should be zero or positive; if not, it is taken as zero.
  783.  
  784.      The value returned is COLUMNS.
  785.  
  786.           (set-window-hscroll (selected-window) 10)
  787.                => 10
  788.  
  789.    Here is how you can determine whether a given position POSITION is
  790. off the screen due to horizontal scrolling:
  791.  
  792.      (save-excursion
  793.        (goto-char POSITION)
  794.        (and
  795.         (>= (- (current-column) (window-hscroll WINDOW)) 0)
  796.         (< (- (current-column) (window-hscroll WINDOW))
  797.            (window-width WINDOW))))
  798.  
  799. 
  800. File: elisp,  Node: Size of Window,  Next: Resizing Windows,  Prev: Horizontal Scrolling,  Up: Windows
  801.  
  802. The Size of a Window
  803. ====================
  804.  
  805.    An Emacs window is rectangular, and its size information consists of
  806. the height (the number of lines) and the width (the number of character
  807. positions in each line).  The mode line is included in the height.  For
  808. a window that does not abut the right hand edge of the screen, the
  809. column of `|' characters that separates it from the window on the right
  810. is included in the width.
  811.  
  812.    The following three functions return size information about a window:
  813.  
  814.  - Function: window-height &optional WINDOW
  815.      This function returns the number of lines in WINDOW, including its
  816.      mode line.  If WINDOW fills its entire frame, this is one less
  817.      than the value of `frame-height' on that frame (since the last line
  818.      is always reserved for the minibuffer).
  819.  
  820.      If WINDOW is `nil', the function uses the selected window.
  821.  
  822.           (window-height)
  823.                => 23
  824.           (split-window-vertically)
  825.                => #<window 4 on windows.texi>
  826.           (window-height)
  827.                => 11
  828.  
  829.  - Function: window-width &optional WINDOW
  830.      This function returns the number of columns in WINDOW.  If WINDOW
  831.      fills its entire frame, this is the same as the value of
  832.      `frame-width' on that frame.
  833.  
  834.      If WINDOW is `nil', the function uses the selected window.
  835.  
  836.           (window-width)
  837.                => 80
  838.  
  839.  - Function: window-edges &optional WINDOW
  840.      This function returns a list of the edge coordinates of WINDOW.
  841.      If WINDOW is `nil', the selected window is used.
  842.  
  843.      The order of the list is `(LEFT TOP RIGHT BOTTOM)', all elements
  844.      relative to 0, 0 at the top left corner of the frame.  The element
  845.      RIGHT of the value is one more than the rightmost column used by
  846.      WINDOW, and BOTTOM is one more than the bottommost row used by
  847.      WINDOW and its mode-line.
  848.  
  849.      Here is the result obtained on a typical 24-line terminal with
  850.      just one window:
  851.  
  852.           (window-edges (selected-window))
  853.                => (0 0 80 23)
  854.  
  855.      If WINDOW is at the upper left corner of its frame, RIGHT and
  856.      BOTTOM are the same as the values returned by `(window-width)' and
  857.      `(window-height)' respectively, and TOP and BOTTOM are zero.  For
  858.      example, the edges of the following window are `0 0 5 8'.
  859.      Assuming that the frame has more than 8 columns, the last column
  860.      of the window (column 7) holds a border rather than text.  The
  861.      last row (row 4) holds the mode line, shown here with `xxxxxxxxx'.
  862.  
  863.                      0
  864.                      _______
  865.                   0 |       |
  866.                     |       |
  867.                     |       |
  868.                     |       |
  869.                     xxxxxxxxx  4
  870.           
  871.                             7
  872.  
  873.      When there are side-by-side windows, any window not at the right
  874.      edge of its frame has a border in its last column.  This border
  875.      counts as one column in the width of the window.  A window never
  876.      includes a border on its left, since the border there belongs to
  877.      the window to the left.
  878.  
  879.      In the following example, let's imagine that the frame is 7
  880.      columns wide.  Then the edges of the left window are `0 0 4 3' and
  881.      the edges of the right window are `4 0 7 3'.
  882.  
  883.                      ___ ___
  884.                     |   |   |
  885.                     |   |   |
  886.                     xxxxxxxxx
  887.           
  888.                      0  34  7
  889.  
  890. 
  891. File: elisp,  Node: Resizing Windows,  Next: Coordinates and Windows,  Prev: Size of Window,  Up: Windows
  892.  
  893. Changing the Size of a Window
  894. =============================
  895.  
  896.    The window size functions fall into two classes: high-level commands
  897. that change the size of windows and low-level functions that access
  898. window size.  Emacs does not permit overlapping windows or gaps between
  899. windows, so resizing one window affects other windows.
  900.  
  901.  - Command: enlarge-window SIZE &optional HORIZONTAL
  902.      This function makes the selected window SIZE lines bigger,
  903.      stealing lines from neighboring windows.  It takes the lines from
  904.      one window at a time until that window is used up, then takes from
  905.      another.  If a window from which lines are stolen shrinks below
  906.      `window-min-height' lines, then that window disappears.
  907.  
  908.      If HORIZONTAL is non-`nil', then this function makes WINDOW wider
  909.      by SIZE columns, stealing columns instead of lines.  If a window
  910.      from which columns are stolen shrinks below `window-min-width'
  911.      columns, then that window disappears.
  912.  
  913.      If the window's frame is smaller than SIZE lines (or columns),
  914.      then the function makes the window occupy the entire height (or
  915.      width) of the frame.
  916.  
  917.      If SIZE is negative, this function shrinks the window by -SIZE
  918.      lines.  If it becomes shorter than `window-min-height', it
  919.      disappears.
  920.  
  921.      `enlarge-window' returns `nil'.
  922.  
  923.  - Command: enlarge-window-horizontally COLUMNS
  924.      This function makes the selected window COLUMNS wider.  It could
  925.      be defined as follows:
  926.  
  927.           (defun enlarge-window-horizontally (columns)
  928.             (enlarge-window columns t))
  929.  
  930.  - Command: shrink-window SIZE &optional HORIZONTAL
  931.      This function is like `enlarge-window' but negates the argument
  932.      SIZE, making the selected window smaller by giving lines (or
  933.      columns) to the other windows.  If the window shrinks below
  934.      `window-min-height' or `window-min-width', then it disappears.
  935.  
  936.      If SIZE is negative, the window is enlarged by -SIZE lines.
  937.  
  938.  - Command: shrink-window-horizontally COLUMNS
  939.      This function makes the selected window COLUMNS narrower.  It
  940.      could be defined as follows:
  941.  
  942.           (defun shrink-window-horizontally (columns)
  943.             (shrink-window columns t))
  944.  
  945.    The following two variables constrain the window size changing
  946. functions to a minimum height and width.
  947.  
  948.  - User Option: window-min-height
  949.      The value of this variable determines how short a window may become
  950.      before it disappears.  A window disappears when it becomes smaller
  951.      than `window-min-height', and no window may be created that is
  952.      smaller.  The absolute minimum height is two (allowing one line
  953.      for the mode line, and one line for the buffer display).  Actions
  954.      which change window sizes reset this variable to two if it is less
  955.      than two.  The default value is 4.
  956.  
  957.  - User Option: window-min-width
  958.      The value of this variable determines how narrow a window may
  959.      become before it disappears.  A window disappears when it becomes
  960.      narrower than `window-min-width', and no window may be created
  961.      that is narrower.  The absolute minimum width is one; any value
  962.      below that is ignored.  The default value is 10.
  963.  
  964. 
  965. File: elisp,  Node: Coordinates and Windows,  Next: Window Configurations,  Prev: Resizing Windows,  Up: Windows
  966.  
  967. Coordinates and Windows
  968. =======================
  969.  
  970.    This section describes how to compare screen coordinates with
  971. windows.
  972.  
  973.  - Function: window-at X Y &optional FRAME
  974.      This function returns the window containing the specified cursor
  975.      position in the frame FRAME.  The coordinates X and Y are measured
  976.      in characters and count from the top left corner of the screen or
  977.      frame.
  978.  
  979.      If you omit FRAME, the selected frame is used.
  980.  
  981.  - Function: coordinates-in-window-p COORDINATES WINDOW
  982.      This function checks whether a particular frame position falls
  983.      within the window WINDOW.
  984.  
  985.      The argument COORDINATES is a cons cell of this form:
  986.  
  987.           (X . Y)
  988.  
  989.      The coordinates X and Y are measured in characters, and count from
  990.      the top left corner of the screen or frame.
  991.  
  992.      The value of `coordinates-in-window-p' is non-`nil' if the
  993.      coordinates are inside WINDOW.  The value also indicates what part
  994.      of the window the position is in, as follows:
  995.  
  996.     `(RELX . RELY)'
  997.           The coordinates are inside WINDOW.  The numbers RELX and RELY
  998.           are the equivalent window-relative coordinates for the
  999.           specified position, counting from 0 at the top left corner of
  1000.           the window.
  1001.  
  1002.     `mode-line'
  1003.           The coordinates are in the mode line of WINDOW.
  1004.  
  1005.     `vertical-split'
  1006.           The coordinates are in the vertical line between WINDOW and
  1007.           its neighbor to the right.
  1008.  
  1009.     `nil'
  1010.           The coordinates are not in any sense within WINDOW.
  1011.  
  1012.      The function `coordinates-in-window-p' does not require a frame as
  1013.      argument because it always uses the frame that window WINDOW is on.
  1014.  
  1015. 
  1016. File: elisp,  Node: Window Configurations,  Prev: Coordinates and Windows,  Up: Windows
  1017.  
  1018. Window Configurations
  1019. =====================
  1020.  
  1021.    A "window configuration" records the entire layout of a frame--all
  1022. windows, their sizes, which buffers they contain, what part of each
  1023. buffer is displayed, and the values of point and the mark.  You can
  1024. bring back an entire previous layout by restoring a window
  1025. configuration previously saved.
  1026.  
  1027.    If you want to record all frames instead of just one, use a frame
  1028. configuration instead of a window configuration.  *Note Frame
  1029. Configurations::.
  1030.  
  1031.  - Function: current-window-configuration
  1032.      This function returns a new object representing Emacs's current
  1033.      window configuration, namely the number of windows, their sizes
  1034.      and current buffers, which window is the selected window, and for
  1035.      each window the displayed buffer, the display-start position, and
  1036.      the positions of point and the mark.  An exception is made for
  1037.      point in the current buffer, whose value is not saved.
  1038.  
  1039.  - Function: set-window-configuration CONFIGURATION
  1040.      This function restores the configuration of Emacs's windows and
  1041.      buffers to the state specified by CONFIGURATION.  The argument
  1042.      CONFIGURATION must be a value that was previously returned by
  1043.      `current-window-configuration'.
  1044.  
  1045.      Here is a way of using this function to get the same effect as
  1046.      `save-window-excursion':
  1047.  
  1048.           (let ((config (current-window-configuration)))
  1049.             (unwind-protect
  1050.                 (progn (split-window-vertically nil)
  1051.                        ...)
  1052.               (set-window-configuration config)))
  1053.  
  1054.  - Special Form: save-window-excursion FORMS...
  1055.      This special form executes FORMS in sequence, preserving window
  1056.      sizes and contents, including the value of point and the portion
  1057.      of the buffer which is visible.  It also preserves the choice of
  1058.      selected window.  However, it does not restore the value of point
  1059.      in the current buffer; use `save-excursion' for that.
  1060.  
  1061.      The return value is the value of the final form in FORMS.  For
  1062.      example:
  1063.  
  1064.           (split-window)
  1065.                => #<window 25 on control.texi>
  1066.           (setq w (selected-window))
  1067.                => #<window 19 on control.texi>
  1068.           (save-window-excursion
  1069.             (delete-other-windows w)
  1070.             (switch-to-buffer "foo")
  1071.             'do-something)
  1072.                => do-something
  1073.                ;; The screen is now split again.
  1074.  
  1075.  - Function: window-configuration-p OBJECT
  1076.      This function returns `t' if OBJECT is a window configuration.
  1077.  
  1078.    Primitives to look inside of window configurations would make sense,
  1079. but none are implemented.  It is not clear they are useful enough to be
  1080. worth implementing.
  1081.  
  1082. 
  1083. File: elisp,  Node: Frames,  Next: Positions,  Prev: Windows,  Up: Top
  1084.  
  1085. Frames
  1086. ******
  1087.  
  1088.    A FRAME is a rectangle on the screen that contains one or more Emacs
  1089. windows.  A frame initially contains a single main window (plus perhaps
  1090. a minibuffer window) which you can subdivide vertically or horizontally
  1091. into smaller windows.
  1092.  
  1093.    When Emacs runs on a text-only terminal, it has just one frame, a
  1094. "terminal frame".  There is no way to create another terminal frame
  1095. after startup.  If Emacs has an X display, it does not make a terminal
  1096. frame; instead, it initially creates a single "X window frame".  You
  1097. can create more; see *Note Creating Frames::.
  1098.  
  1099.  - Function: framep OBJECT
  1100.      This predicate returns `t' if OBJECT is a frame, and `nil'
  1101.      otherwise.
  1102.  
  1103. * Menu:
  1104.  
  1105. * Creating Frames::        Creating additional X Window frames.
  1106. * Frame Parameters::        Controlling frame size, position, font, etc.
  1107. * Deleting Frames::        Frames last until explicitly deleted.
  1108. * Finding All Frames::        How to examine all existing frames.
  1109. * Frames and Windows::        A frame contains windows;
  1110.                   display of text always works through windows.
  1111. * Minibuffers and Frames::    How a frame finds the minibuffer to use.
  1112. * Input Focus::            What is this??
  1113. * Visibility of Frames::    Frames may be visible or invisible, or icons.
  1114. * Raising and Lowering::    Raising a frame makes it hide other X windows;
  1115.                   lowering it makes the others hide them.
  1116. * Frame Configurations::    Saving the state of all frames.
  1117. * Mouse Tracking::        Getting events that say when the mouse moves.
  1118. * Mouse Position::        Asking where the mouse is, or moving it.
  1119. * Pop-Up Menus::        Displaying a menu for the user to select from.
  1120. * X Selections::        Transferring text to and from other X clients.
  1121. * X Server::
  1122.  
  1123.    *Note Emacs Display::, for related information.
  1124.  
  1125. 
  1126. File: elisp,  Node: Creating Frames,  Next: Frame Parameters,  Up: Frames
  1127.  
  1128. Creating Frames
  1129. ===============
  1130.  
  1131.    To create a new frame, call the function `make-frame'.
  1132.  
  1133.  - Function: make-frame ALIST
  1134.      This function creates a new frame, if the display mechanism permits
  1135.      creation of frames.  (An X server does; an ordinary terminal does
  1136.      not.)
  1137.  
  1138.      The argument is an alist specifying frame parameters.  Any
  1139.      parameters not mentioned in ALIST default according to the value
  1140.      of the variable `default-frame-alist'; parameters not specified
  1141.      there either default from the standard X defaults file and X
  1142.      resources.
  1143.  
  1144.      The set of possible parameters depends in principle on what kind of
  1145.      window system Emacs uses to display its the frames.  *Note X Frame
  1146.      Parameters::, for documentation of individual parameters you can
  1147.      specify when creating an X window frame.
  1148.  
  1149.  - Variable: default-frame-alist
  1150.      An alist specifying default values of frame parameters.  Each
  1151.      element has the form:
  1152.  
  1153.           (PARAMETER . VALUE)
  1154.  
  1155.      If you use options that specify window appearance when you invoke
  1156.      Emacs, they take effect by adding elements to
  1157.      `default-frame-alist'.
  1158.  
  1159. 
  1160. File: elisp,  Node: Frame Parameters,  Next: Deleting Frames,  Prev: Creating Frames,  Up: Frames
  1161.  
  1162. Frame Parameters
  1163. ================
  1164.  
  1165.    A frame has many parameters that control how it displays.
  1166.  
  1167. * Menu:
  1168.  
  1169. * Parameter Access::       How to change a frame's parameters.
  1170. * Initial Parameters::       Specifying frame parameters when you make a frame.
  1171. * X Frame Parameters::     Individual parameters documented.
  1172. * Size And Position::      Changing the size and position of a frame.
  1173.  
  1174. 
  1175. File: elisp,  Node: Parameter Access,  Next: Initial Parameters,  Up: Frame Parameters
  1176.  
  1177. Access to Frame Parameters
  1178. --------------------------
  1179.  
  1180.    These functions let you read and change the parameter values of a
  1181. frame.
  1182.  
  1183.  - Function: frame-parameters FRAME
  1184.      The function `frame-parameters' returns an alist of all the
  1185.      parameters of FRAME.
  1186.  
  1187.  - Function: modify-frame-parameters FRAME ALIST
  1188.      This function alters the parameters of frame FRAME based on the
  1189.      elements of ALIST.  Each element of ALIST has the form `(PARM .
  1190.      VALUE)', where PARM is a symbol naming a parameter.  If you don't
  1191.      mention a parameter in ALIST, its value doesn't change.
  1192.  
  1193. 
  1194. File: elisp,  Node: Initial Parameters,  Next: X Frame Parameters,  Prev: Parameter Access,  Up: Frame Parameters
  1195.  
  1196. Initial Frame Parameters
  1197. ------------------------
  1198.  
  1199.    You can specify the parameters for the initial startup frame by
  1200. setting `initial-frame-alist' in your `.emacs' file.
  1201.  
  1202.  - Variable: initial-frame-alist
  1203.      This variable's value is an alist of parameter values to when
  1204.      creating the initial X window frame.
  1205.  
  1206.    If these parameters specify a separate minibuffer-only frame, and
  1207. you have not created one, Emacs creates one for you.
  1208.  
  1209.  - Variable: minibuffer-frame-alist
  1210.      This variable's value is an alist of parameter values to when
  1211.      creating an initial minibuffer-only frame--if such a frame is
  1212.      needed, according to the parameters for the main initial frame.
  1213.  
  1214.