home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / elisp / elisp-21 < prev    next >
Encoding:
GNU Info File  |  1993-05-31  |  47.7 KB  |  1,237 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: X Frame Parameters,  Next: Size And Position,  Prev: Initial Parameters,  Up: Frame Parameters
  28.  
  29. X Window Frame Parameters
  30. -------------------------
  31.  
  32.    Just what parameters a frame has depends on what display mechanism it
  33. uses.  Here is a table of the parameters of an X window frame:
  34.  
  35. `name'
  36.      The name of the frame.
  37.  
  38. `left'
  39.      The screen position of the left edge, in pixels.
  40.  
  41. `top'
  42.      The screen position of the top edge, in pixels.
  43.  
  44. `height'
  45.      The height of the frame contents, in pixels.
  46.  
  47. `width'
  48.      The width of the frame contents, in pixels.
  49.  
  50. `window-id'
  51.      The number of the X window for the frame.
  52.  
  53. `minibuffer'
  54.      Whether this frame has its own minibuffer.  The value `t' means
  55.      yes, `nil' means no, `only' means this frame is just a minibuffer,
  56.      a minibuffer window (in some other frame) means the new frame uses
  57.      that minibuffer.
  58.  
  59. `font'
  60.      The name of the font for text in the frame.  This is a string.
  61.  
  62. `auto-raise'
  63.      Whether selecting the frame raises it (non-`nil' means yes).
  64.  
  65. `auto-lower'
  66.      Whether deselecting the frame lowers it (non-`nil' means yes).
  67.  
  68. `vertical-scroll-bars'
  69.      Whether the frame has a scroll bar for vertical scrolling
  70.      (non-`nil' means yes).
  71.  
  72. `horizontal-scroll-bars'
  73.      Whether the frame has a scroll bar for horizontal scrolling
  74.      (non-`nil' means yes).  (Horizontal scroll bars are not currently
  75.      implemented.)
  76.  
  77. `icon-type'
  78.      The type of icon to use for this frame when it is iconified.
  79.      Non-`nil' specifies a bitmap icon, `nil' a text icon.
  80.  
  81. `foreground-color'
  82.      The color to use for the inside of a character.  We use strings to
  83.      designate colors; the X server defines the meaningful color names.
  84.  
  85. `background-color'
  86.      The color to use for the background of text.
  87.  
  88. `mouse-color'
  89.      The color for the mouse cursor.
  90.  
  91. `cursor-color'
  92.      The color for the cursor that shows point.
  93.  
  94. `border-color'
  95.      The color for the border of the frame.
  96.  
  97. `cursor-type'
  98.      The way to display the cursor.  There are two legitimate values:
  99.      `bar' and `box'.  The value `bar' specifies a vertical bar between
  100.      characters as the cursor.  The value `box' specifies an ordinary
  101.      black box overlaying the character after point; that is the
  102.      default.
  103.  
  104. `border-width'
  105.      The width in pixels of the window border.
  106.  
  107. `internal-border-width'
  108.      The distance in pixels between text and border.
  109.  
  110. `unsplittable'
  111.      If non-`nil', this frame's window is never split automatically.
  112.  
  113. `visibility'
  114.      The state of visibility of the frame.  There are three
  115.      possibilities: `nil' for invisible, `t' for visible, and `icon' for
  116.      iconified.  *Note Visibility of Frames::.
  117.  
  118. `menu-bar-lines'
  119.      The number of lines to allocate at the top of the frame for a menu
  120.      bar.  The default is zero.  *Note Menu Bar::.
  121.  
  122. `parent-id'
  123.      The X Window number of the window that should be the parent of
  124.      this one.  Specifying this lets you create an Emacs window inside
  125.      some other application's window.  (It is not certain this will be
  126.      implemented; try it and see if it works.)
  127.  
  128. 
  129. File: elisp,  Node: Size And Position,  Prev: X Frame Parameters,  Up: Frame Parameters
  130.  
  131. Frame Size And Position
  132. -----------------------
  133.  
  134.    You can read or change the size and position of a frame using the
  135. frame parameters `left', `top', `height' and `width'.  When you create
  136. a frame, you must specify either both size parameters or neither.
  137. Likewise, you must specify either both position parameters or neither.
  138. Whatever geometry parameters you don't specify are chosen by the window
  139. manager in its usual fashion.
  140.  
  141.    Here are some special features for working with sizes and positions:
  142.  
  143.  - Function: set-frame-position FRAME LEFT TOP
  144.      This function sets the position of the top left corner of
  145.      FRAME--to LEFT and TOP.  These arguments are measured in pixels,
  146.      counting from the top left corner of the screen.
  147.  
  148.  - Function: frame-height &optional FRAME
  149.  - Function: frame-width &optional FRAME
  150.      These functions return the height and width of FRAME, measured in
  151.      characters.  If you don't supply FRAME, they use the selected
  152.      frame.
  153.  
  154.  - Function: frame-pixel-height &optional FRAME
  155.  - Function: frame-pixel-width &optional FRAME
  156.      These functions return the height and width of FRAME, measured in
  157.      pixels.  If you don't supply FRAME, they use the selected frame.
  158.  
  159.  - Function: frame-char-height &optional FRAME
  160.  - Function: frame-char-width &optional FRAME
  161.      These functions return the height and width, respectively, of a
  162.      character in FRAME, measured in pixels.  The values depend on the
  163.      choice of font.  If you don't supply FRAME, these functions use
  164.      the selected frame.
  165.  
  166.  - Function: set-frame-size FRAME COLS ROWS
  167.      This function sets the size of FRAME, measured in characters; COLS
  168.      and ROWS specify the new width and height.
  169.  
  170.      To set the size with values measured in pixels, use
  171.      `modify-frame-parameters' to set the `width' and `height'
  172.      parameters.  *Note X Frame Parameters::.
  173.  
  174.    The old-fashioned functions `set-screen-height' and
  175. `set-screen-width', which were used to specify the height and width of
  176. the screen in Emacs versions that did not support multiple frames, are
  177. still usable.  They apply to the selected frame.  *Note Screen Size::.
  178.  
  179.  - Function: x-parse-geometry GEOM
  180.      The function `x-parse-geometry' converts a standard X windows
  181.      geometry string to an alist which you can use as part of the
  182.      argument to `x-create-frame'.
  183.  
  184.      The alist describes which parameters were specified in GEOM, and
  185.      gives the values specified for them.  Each element looks like
  186.      `(PARAMETER . VALUE)'.  The possible PARAMETER values are `left',
  187.      `top', `width', and `height'.
  188.  
  189.           (x-geometry "35x70+0-0")
  190.                => ((width . 35) (height . 70) (left . 0) (top . -1))
  191.  
  192. 
  193. File: elisp,  Node: Deleting Frames,  Next: Finding All Frames,  Prev: Frame Parameters,  Up: Frames
  194.  
  195. Deleting Frames
  196. ===============
  197.  
  198.    Frames remain potentially visible until you explicitly "delete"
  199. them.  A deleted frame cannot appear on the screen, but continues to
  200. exist as a Lisp object until there are no references to it.  There is no
  201. way to cancel the deletion of a frame aside from restoring a saved frame
  202. configuration (*note Frame Configurations::.); this is similar to the
  203. way windows behave.
  204.  
  205.  - Command: delete-frame &optional FRAME
  206.      This function deletes the frame FRAME.  By default, FRAME is the
  207.      selected frame.
  208.  
  209.  - Function: frame-live-p FRAME
  210.      The function `frame-live-p' returns non-`nil' if the frame FRAME
  211.      has not been deleted.
  212.  
  213. 
  214. File: elisp,  Node: Finding All Frames,  Next: Frames and Windows,  Prev: Deleting Frames,  Up: Frames
  215.  
  216. Finding All Frames
  217. ==================
  218.  
  219.  - Function: frame-list
  220.      The function `frame-list' returns a list of all the frames that
  221.      have not been deleted.  It is analogous to `buffer-list' for
  222.      buffers.  The list that you get is newly created, so modifying the
  223.      list doesn't have any effect on the internals of Emacs.
  224.  
  225.  - Function: visible-frame-list
  226.      This function returns a list of just the currently visible frames.
  227.  
  228.  - Function: next-frame &optional FRAME MINIBUF
  229.      The function `next-frame' lets you cycle conveniently through all
  230.      the frames from an arbitrary starting point.  It returns the "next"
  231.      frame after FRAME in the cycle.  If FRAME is omitted or `nil', it
  232.      defaults to the selected frame.
  233.  
  234.      The second argument, MINIBUF, says which frames to consider:
  235.  
  236.     `nil'
  237.           Exclude minibuffer-only frames.
  238.  
  239.     a window
  240.           Consider only the frames using that particular window as their
  241.           minibuffer.
  242.  
  243.     anything else
  244.           Consider all frames.
  245.  
  246. 
  247. File: elisp,  Node: Frames and Windows,  Next: Minibuffers and Frames,  Prev: Finding All Frames,  Up: Frames
  248.  
  249. Frames and Windows
  250. ==================
  251.  
  252.    All the non-minibuffer windows in a frame are arranged in a tree of
  253. subdivisions; the root of this tree is available via the function
  254. `frame-root-window'.  Each window is part of one and only one frame;
  255. you can get the frame with `window-frame'.
  256.  
  257.  - Function: frame-root-window FRAME
  258.      This returns the root window of frame FRAME.
  259.  
  260.  - Function: window-frame WINDOW
  261.      This function returns the frame that WINDOW is on.
  262.  
  263.    At any time, exactly one window on any frame is "selected within the
  264. frame".  The significance of this designation is that selecting the
  265. frame also selects this window.  You can get the frame's current
  266. selected window with `frame-selected-window'.
  267.  
  268.  - Function: frame-selected-window FRAME
  269.      This function returns the window on FRAME which is selected within
  270.      FRAME.
  271.  
  272.    Conversely, selecting a window for Emacs with `select-window' also
  273. makes that window selected within its frame.  *Note Selecting Windows::.
  274.  
  275. 
  276. File: elisp,  Node: Minibuffers and Frames,  Next: Input Focus,  Prev: Frames and Windows,  Up: Frames
  277.  
  278. Minibuffers and Frames
  279. ======================
  280.  
  281.    Normally, each frame has its own minibuffer window at the bottom,
  282. which is used whenever that frame is selected.  If the frame has a
  283. minibuffer, you can get it with `minibuffer-window' (*note Minibuffer
  284. Misc::.).
  285.  
  286.    However, you can also create a frame with no minibuffer.  Such a
  287. frame must use the minibuffer window of some other frame.  When you
  288. create the frame, you can specify explicitly the frame on which to find
  289. the minibuffer to use.  If you don't, then the minibuffer is found in
  290. the frame which is the value of the variable
  291. `default-minibuffer-frame'.  Its value should be a frame which does
  292. have a minibuffer.
  293.  
  294. 
  295. File: elisp,  Node: Input Focus,  Next: Visibility of Frames,  Prev: Minibuffers and Frames,  Up: Frames
  296.  
  297. Input Focus
  298. ===========
  299.  
  300.    At any time, one frame in Emacs is the "selected frame".  The
  301. selected window always resides on the selected frame.
  302.  
  303.  - Function: selected-frame
  304.      This function returns the selected frame.
  305.  
  306.    The X server normally directs keyboard input to the X window that the
  307. mouse is in.  Some window managers use mouse clicks or keyboard events
  308. to "shift the focus" to various X windows, overriding the normal
  309. behavior of the server.
  310.  
  311.    Lisp programs can switch frames "temporarily" by calling the
  312. function `select-frame'.  This does not override the window manager;
  313. rather, it escapes from the window manager's control until that control
  314. is somehow reasserted.
  315.  
  316.  - Function: select-frame FRAME
  317.      This function selects frame FRAME, temporarily disregarding the X
  318.      Windows focus.  The selection of FRAME lasts until the next time
  319.      the user does something to select a different frame, or until the
  320.      next time this function is called.
  321.  
  322.    Emacs cooperates with the X server and the window managers by
  323. arranging to select frames according to what the server and window
  324. manager ask for.  It does so by generating a special kind of input
  325. event, called a "focus" event.  The command loop handles a focus event
  326. by calling `internal-select-frame'.  *Note Focus Events::.
  327.  
  328.  - Function: internal-select-frame FRAME
  329.      This function selects frame FRAME, assuming that the X server
  330.      focus already points to FRAME.
  331.  
  332.      Focus events normally do their job by invoking this command.
  333.      Don't call it for any other reason.
  334.  
  335. 
  336. File: elisp,  Node: Visibility of Frames,  Next: Raising and Lowering,  Prev: Input Focus,  Up: Frames
  337.  
  338. Visibility of Frames
  339. ====================
  340.  
  341.    A frame may be "visible", "invisible", or "iconified".  If it is
  342. visible, you can see its contents.  If it is iconified, the frame's
  343. contents do not appear on the screen, but an icon does.  If the frame
  344. is invisible, it doesn't show in the screen, not even as an icon.
  345.  
  346.  - Command: make-frame-visible &optional FRAME
  347.      This function makes frame FRAME visible.  If you omit FRAME, it
  348.      makes the selected frame visible.
  349.  
  350.  - Command: make-frame-invisible &optional FRAME
  351.      This function makes frame FRAME invisible.  If you omit FRAME, it
  352.      makes the selected frame invisible.
  353.  
  354.  - Command: iconify-frame &optional FRAME
  355.      This function iconifies frame FRAME.  If you omit FRAME, it
  356.      iconifies the selected frame.
  357.  
  358.  - Function: frame-visible-p FRAME
  359.      This returns the visibility status of frame FRAME.  The value is
  360.      `t' if FRAME is visible, `nil' if it is invisible, and `icon' if
  361.      it is iconified.
  362.  
  363.    The visibility status of a frame is also available as a frame
  364. parameter.  You can read or change it as such.  *Note X Frame
  365. Parameters::.
  366.  
  367. 
  368. File: elisp,  Node: Raising and Lowering,  Next: Frame Configurations,  Prev: Visibility of Frames,  Up: Frames
  369.  
  370. Raising and Lowering Frames
  371. ===========================
  372.  
  373.    The X window system uses a desktop metaphor.  Part of this metaphor
  374. is the idea that windows are stacked in a notional third dimension
  375. perpendicular to the screen surface, and thus ordered from "highest" to
  376. "lowest".  Where two windows overlap, the one higher up covers the one
  377. underneath.  Even a window at the bottom of the stack can be seen if no
  378. other window overlaps it.
  379.  
  380.    A window's place in this ordering is not fixed; in fact, users tend
  381. to change the order frequently.  "Raising" a window means moving it
  382. "up", to the top of the stack.  "Lowering" a window means moving it to
  383. the bottom of the stack.  This motion is in the notional third
  384. dimension only, and does not change the position of the window on the
  385. screen.
  386.  
  387.    You can raise and lower Emacs's X windows with these functions:
  388.  
  389.  - Function: raise-frame FRAME
  390.      This function raises frame FRAME.
  391.  
  392.  - Function: lower-frame FRAME
  393.      This function lowers frame FRAME.
  394.  
  395.    You can also specify auto-raise (raising automatically when a frame
  396. is selected) or auto-lower (lowering automatically when it is
  397. deselected) for any frame using frame parameters.  *Note X Frame
  398. Parameters::.
  399.  
  400. 
  401. File: elisp,  Node: Frame Configurations,  Next: Mouse Tracking,  Prev: Raising and Lowering,  Up: Frames
  402.  
  403. Frame Configurations
  404. ====================
  405.  
  406.  - Function: current-frame-configuration
  407.      This function returns a "frame configuration" list which describes
  408.      the current arrangement of frames, all their properties, and the
  409.      window configuration of each one.
  410.  
  411.  - Function: set-frame-configuration CONFIGURATION
  412.      This function restores the state of frames described in
  413.      CONFIGURATION.
  414.  
  415. 
  416. File: elisp,  Node: Mouse Tracking,  Next: Mouse Position,  Prev: Frame Configurations,  Up: Frames
  417.  
  418. Mouse Tracking
  419. ==============
  420.  
  421.    Sometimes it is useful to "track" the mouse, which means, to display
  422. something to indicate where the mouse is and move the indicator as the
  423. mouse moves.  For efficient mouse tracking, you need a way to wait until
  424. the mouse actually moves.
  425.  
  426.    The convenient way to track the mouse is to ask for events to
  427. represent mouse motion.  Then you can wait for motion by waiting for an
  428. event.  In addition, you can easily handle any other sorts of events
  429. that may occur.  That is useful, because normally you don't want to
  430. track the mouse forever--only until some other event, such as the
  431. release of a button.
  432.  
  433.  - Special Form: track-mouse BODY...
  434.      Execute BODY, meanwhile generating input events for mouse motion.
  435.      The code in BODY can read these events with `read-event' or
  436.      `read-key-sequence'.  *Note Motion Events::, for the format of
  437.      mouse motion events.
  438.  
  439.      The value of `track-mouse' is that of the last form in BODY.
  440.  
  441.    The usual purpose of tracking mouse motion is to indicate on the
  442. screen the consequences of pushing or releasing a button at the current
  443. position.
  444.  
  445. 
  446. File: elisp,  Node: Mouse Position,  Next: Pop-Up Menus,  Prev: Mouse Tracking,  Up: Frames
  447.  
  448. Mouse Position
  449. ==============
  450.  
  451.    The new functions `mouse-position' and `set-mouse-position' give
  452. access to the current position of the mouse.
  453.  
  454.  - Function: mouse-position
  455.      This function returns a description of the position of the mouse.
  456.      The value looks like `(FRAME X . Y)', where X and Y are integers
  457.      giving the position in pixels relative to the top left corner of
  458.      the inside of FRAME.
  459.  
  460.  - Function: set-mouse-position FRAME X Y
  461.      Thus function "warps the mouse" to position X, Y in frame FRAME.
  462.      The arguments X and Y are integers, giving the position in pixels
  463.      relative to the top left corner of the inside of FRAME.
  464.  
  465.      Warping the mouse means changing the screen position of the mouse
  466.      as if the user had moved the physical mouse--thus simulating the
  467.      effect of actual mouse motion.
  468.  
  469. 
  470. File: elisp,  Node: Pop-Up Menus,  Next: X Selections,  Prev: Mouse Position,  Up: Frames
  471.  
  472. Pop-Up Menus
  473. ============
  474.  
  475.  - Function: x-popup-menu POSITION MENU
  476.      This function displays a pop-up menu and returns an indication of
  477.      what selection the user makes.
  478.  
  479.      The argument POSITION specifies where on the screen to put the
  480.      menu.  It can be either a mouse button event (which says to put
  481.      the menu where the user actuated the button) or a list of this
  482.      form:
  483.  
  484.           ((XOFFSET YOFFSET) WINDOW)
  485.  
  486.      where XOFFSET and YOFFSET are positions measured in characters,
  487.      counting from the top left corner of WINDOW's frame.
  488.  
  489.      The argument MENU says what to display in the menu.  It can be a
  490.      keymap or a list of keymaps (*note Menu Keymaps::.).
  491.      Alternatively, it can have the following form:
  492.  
  493.           (TITLE PANE1 PANE2...)
  494.  
  495.      where each pane is a list of form
  496.  
  497.           (TITLE (LINE ITEM)...)
  498.  
  499.      Each LINE should be a string, and each ITEM should be the value to
  500.      return if that LINE is chosen.
  501.  
  502. 
  503. File: elisp,  Node: X Selections,  Next: X Server,  Prev: Pop-Up Menus,  Up: Frames
  504.  
  505. X Selections
  506. ============
  507.  
  508.    The X server records a set of "selections" which permit transfer of
  509. data between application programs.  The various selections are
  510. distinguished by "selection types", represented in Emacs by symbols.  X
  511. clients including Emacs can read or set the selection for any given
  512. type.
  513.  
  514.  - Function: x-set-selection TYPE DATA
  515.      This function sets a "selection" in the X server.  It takes two
  516.      arguments: a selection type TYPE, and the value to assign to it,
  517.      DATA.  If DATA is `nil', it means to clear out the selection.
  518.      Otherwise, DATA may be a string, a symbol, an integer (or a cons
  519.      of two integers or list of two integers), or a cons of two markers
  520.      pointing to the same buffer.  In the last case, the selection is
  521.      considered to be the text between the markers.  The data may also
  522.      be a vector of valid non-vector selection values.
  523.  
  524.      Each possible TYPE has its own selection value, which changes
  525.      independently.  The usual values of TYPE are `PRIMARY' and
  526.      `SECONDARY'; these are symbols with upper-case names, in accord
  527.      with X Windows conventions.  The default is `PRIMARY'.
  528.  
  529.  - Function: x-get-selection TYPE DATA-TYPE
  530.      This function accesses selections set up by Emacs or by other X
  531.      clients.  It takes two optional arguments, TYPE and DATA-TYPE.
  532.      The default for TYPE, the selection type, is `PRIMARY'.
  533.  
  534.      The DATA-TYPE argument specifies the form of data conversion to
  535.      use, to convert the raw data obtained from another X client into
  536.      Lisp data.  Meaningful values include `TEXT', `STRING', `TARGETS',
  537.      `LENGTH', `DELETE', `FILE_NAME', `CHARACTER_POSITION',
  538.      `LINE_NUMBER', `COLUMN_NUMBER', `OWNER_OS', `HOST_NAME', `USER',
  539.      `CLASS', `NAME', `ATOM', and `INTEGER'.  (These are symbols with
  540.      upper-case names in accord with X conventions.)  The default for
  541.      DATA-TYPE is `STRING'.
  542.  
  543.    The X server also has a set of numbered "cut buffers" which can
  544. store text or other data being moved between applications.  Cut buffers
  545. are considered obsolete, but Emacs supports them for the sake of X
  546. clients that still use them.
  547.  
  548.  - Function: x-get-cut-buffer N
  549.      This function returns the contents of cut buffer number N.
  550.  
  551.  - Function: x-set-cut-buffer STRING
  552.      This function stores STRING into the first cut buffer (cut buffer
  553.      0), moving the other values down through the series of cut buffers,
  554.      kill-ring-style.
  555.  
  556. 
  557. File: elisp,  Node: X Server,  Prev: X Selections,  Up: Frames
  558.  
  559. X Server
  560. ========
  561.  
  562.    This section describes how to access and change the overall status of
  563. the X server Emacs is using.
  564.  
  565. * Menu:
  566.  
  567. * X Connections::    Opening and closing the X server connection.
  568. * Resources::        Getting resource values from the server.
  569. * Rebinding X Keys::    Telling the server what input to send
  570.               for each keyboard key.
  571. * Server Data::        Getting info about the X server.
  572.  
  573. 
  574. File: elisp,  Node: X Connections,  Next: Resources,  Up: X Server
  575.  
  576. X Connections
  577. -------------
  578.  
  579.    You can close the connection with the X server with the function
  580. `x-close-current-connection', and open a new one with
  581. `x-open-connection' (perhaps with a different server and display).
  582.  
  583.  - Function: x-close-current-connection
  584.      This function closes the connection to the X server.  It deletes
  585.      all frames, making Emacs effectively inaccessible to the user;
  586.      therefore, a Lisp program that closes the connection should open
  587.      another one.
  588.  
  589.  - Function: x-open-connection DISPLAY &optional RESOURCE-STRING
  590.      This function opens a connection to an X server, for use of display
  591.      DISPLAY.
  592.  
  593.      The optional argument RESOURCE-STRING is a string of resource
  594.      names and values, in the same format used in the `.Xresources'
  595.      file.  The values you specify override the resource values
  596.      recorded in the X server itself.  Here's an example of what this
  597.      string might look like:
  598.  
  599.           "*BorderWidth: 3\n*InternalBorder: 2\n"
  600.  
  601.  - Function: x-color-display-p
  602.      This returns `t' if the connected X display has color, and `nil'
  603.      otherwise.
  604.  
  605.  - Function: x-color-defined-p COLOR
  606.      This function reports whether a color name is meaningful and
  607.      supported on the X display Emacs is using.  It returns `t' if the
  608.      display supports that color; otherwise, `nil'.
  609.  
  610.      Black-and-white displays support just two colors, `"black"' or
  611.      `"white"'.  Color displays support many other colors.
  612.  
  613.  - Function: x-synchronize FLAG
  614.      The function `x-synchronize' enables or disables synchronous
  615.      communication with the X server.  It enables synchronous
  616.      communication if FLAG is non-`nil', and disables it if FLAG is
  617.      `nil'.
  618.  
  619.      In synchronous mode, Emacs waits for a response to each X protocol
  620.      command before doing anything else.  This is useful for debugging
  621.      Emacs, because protocol errors are reported right away, which
  622.      helps you find the erroneous command.  Synchronous mode is not the
  623.      default because it is much slower.
  624.  
  625. 
  626. File: elisp,  Node: Resources,  Next: Rebinding X Keys,  Prev: X Connections,  Up: X Server
  627.  
  628. Resources
  629. ---------
  630.  
  631.  - Function: x-get-resource ATTRIBUTE &optional NAME CLASS
  632.      The function `x-get-resource' retrieves a resource value from the X
  633.      Windows defaults database.
  634.  
  635.      Resources are indexed by a combination of a "key" and a "class".
  636.      This function searches using a key of the form
  637.      `INSTANCE.ATTRIBUTE', where INSTANCE is the name under which Emacs
  638.      was invoked, and uses `Emacs' as the class.
  639.  
  640.      The optional arguments COMPONENT and SUBCLASS add to the key and
  641.      the class, respectively.  You must specify both of them or neither.
  642.      If you specify them, the key is `INSTANCE.COMPONENT.ATTRIBUTE',
  643.      and the class is `Emacs.SUBCLASS'.
  644.  
  645. 
  646. File: elisp,  Node: Rebinding X Keys,  Next: Server Data,  Prev: Resources,  Up: X Server
  647.  
  648. Rebinding X Server Keys
  649. -----------------------
  650.  
  651.    The X server allows each client to specify what sequence of
  652. characters each keyboard key should generate, depending on the set of
  653. shift keys held down.  Emacs has functions to redefine these sequences
  654. in the X server.  Redefinitions via `x-rebind-key' apply only to Emacs.
  655. Other clients using the same X server are not affected.
  656.  
  657.  - Function: x-rebind-key KEYSYM MODIFIERS NEWSTRING
  658.      This function redefines a keyboard key in the X server.  KEYSYM is
  659.      a string which conforms to the X keysym definitions found in
  660.      `X11/keysymdef.h', but without the prefix `XK_'.  MODIFIERS is
  661.      either `nil', meaning no modifier keys, or a list of names of
  662.      modifier keys, again using the names from `X11/keysymdef.h' but
  663.      without the `XK_' prefix.
  664.  
  665.      The third argument, NEWSTRING, is the new definition of the key.
  666.      It is the sequence of characters that the key should produce as
  667.      input.
  668.  
  669.      For example,
  670.  
  671.           (x-rebind-key "F1" nil "abc")
  672.  
  673.      causes the F1 function key to generate the string `"abc"'.
  674.      Similarly,
  675.  
  676.           (x-rebind-key "BackSpace"
  677.                         (list "Shift" "Control_L" "c-s-BackSpace")
  678.  
  679.      makes the BS key send the string `"c-s-BackSpace"' if either the
  680.      shift key or the left-hand control key is held down.
  681.  
  682.  - Function: x-rebind-keys KEYSYM STRINGS
  683.      This function redefines the complete meaning of a single keyboard
  684.      key, specifying the behavior for each of the 16 shift masks
  685.      independently.
  686.  
  687.      The argument KEYSYM specifies the key to rebind, as in
  688.      `x-rebind-key'.
  689.  
  690.      The argument STRINGS is a list of 16 elements, one for each
  691.      possible shift mask value; the Nth element says how to redefine
  692.      the key KEYCODE with shift mask value N.  If element N is a
  693.      string, it is the new definition for shift mask N.  If element N
  694.      is `nil', the definition for shift mask N is unchanged.
  695.  
  696. 
  697. File: elisp,  Node: Server Data,  Prev: Rebinding X Keys,  Up: X Server
  698.  
  699. Data about the X Server
  700. -----------------------
  701.  
  702.    This section describes functions and a variable that you can use to
  703. get information about the capabilities and origin of the X server that
  704. Emacs is displaying its frames on.
  705.  
  706.  - Function: x-display-screens
  707.      This function returns the number of screens associated with the
  708.      current display.
  709.  
  710.  - Function: x-server-version
  711.      This function returns the list of version numbers of the X server
  712.      in use.
  713.  
  714.  - Function: x-server-vendor
  715.      This function returns the vendor supporting the X server in use.
  716.  
  717.  - Function: x-display-pixel-height
  718.      This function returns the height of this X screen in pixels.
  719.  
  720.  - Function: x-display-mm-height
  721.      This function returns the height of this X screen in millimeters.
  722.  
  723.  - Function: x-display-pixel-width
  724.      This function returns the width of this X screen in pixels.
  725.  
  726.  - Function: x-display-mm-width
  727.      This function returns the width of this X screen in millimeters.
  728.  
  729.  - Function: x-display-backing-store
  730.      This function returns the backing store capability of this screen.
  731.      Values can be the symbols `always', `when-mapped', or `not-useful'.
  732.  
  733.  - Function: x-display-save-under
  734.      This function returns non-`nil' if this X screen supports the
  735.      SaveUnder feature.
  736.  
  737.  - Function: x-display-planes
  738.      This function returns the number of planes this display supports.
  739.  
  740.  - Function: x-display-visual-class
  741.      This function returns the visual class for this X screen.  The
  742.      value is one of the symbols `static-gray', `gray-scale',
  743.      `static-color', `pseudo-color', `true-color', and `direct-color'.
  744.  
  745.  - Function: x-display-color-p
  746.      This function returns `t' if the X screen in use is a color screen.
  747.  
  748.  - Function: x-display-color-cells
  749.      This function returns the number of color cells this X screen
  750.      supports.
  751.  
  752.  - Variable: x-no-window-manager
  753.      This variable's value is is `t' if no X window manager is in use.
  754.  
  755. 
  756. File: elisp,  Node: Positions,  Next: Markers,  Prev: Frames,  Up: Top
  757.  
  758. Positions
  759. *********
  760.  
  761.    A "position" is the index of a character in the text of buffer.
  762. More precisely, a position identifies the place between two characters
  763. (or before the first character, or after the last character), so we can
  764. speak of the character before or after a given position.  However, the
  765. character after a position is often said to be "at" that position.
  766.  
  767.    Positions are usually represented as integers starting from 1, but
  768. can also be represented as "markers"--special objects which relocate
  769. automatically when text is inserted or deleted so they stay with the
  770. surrounding characters.  *Note Markers::.
  771.  
  772. * Menu:
  773.  
  774. * Point::         The special position where editing takes place.
  775. * Motion::        Changing point.
  776. * Excursions::    Temporary motion and buffer changes.
  777. * Narrowing::     Restricting editing to a portion of the buffer.
  778.  
  779. 
  780. File: elisp,  Node: Point,  Next: Motion,  Prev: Positions,  Up: Positions
  781.  
  782. Point
  783. =====
  784.  
  785.    "Point" is a special buffer position used by many editing commands,
  786. including the self-inserting typed characters and text insertion
  787. functions.  Other commands move point through the text to allow editing
  788. and insertion at different places.
  789.  
  790.    Like other positions, point designates a place between two characters
  791. (or before the first character, or after the last character), rather
  792. than a particular character.  Many terminals display the cursor over the
  793. character that immediately follows point; on such terminals, point is
  794. actually before the character on which the cursor sits.
  795.  
  796.    The value of point is a number between 1 and the buffer size plus 1.
  797. If narrowing is in effect (*note Narrowing::.), then point is
  798. constrained to fall within the accessible portion of the buffer
  799. (possibly at one end of it).
  800.  
  801.    Each buffer has its own value of point, which is independent of the
  802. value of point in other buffers.  Each window also has a value of point,
  803. which is independent of the value of point in other windows on the same
  804. buffer.  This is why point can have different values in various windows
  805. that display the same buffer.  When a buffer appears in only one window,
  806. the buffer's point and the window's point normally have the same value,
  807. so the distinction is rarely important.  *Note Window Point::, for more
  808. details.
  809.  
  810.  - Function: point
  811.      This function returns the position of point in the current buffer,
  812.      as an integer.
  813.  
  814.           (point)
  815.                => 175
  816.  
  817.  - Function: point-min
  818.      This function returns the minimum accessible value of point in the
  819.      current buffer.  This is 1, unless narrowing is in effect, in
  820.      which case it is the position of the start of the region that you
  821.      narrowed to.  (*Note Narrowing::.)
  822.  
  823.  - Function: point-max
  824.      This function returns the maximum accessible value of point in the
  825.      current buffer.  This is `(1+ (buffer-size))', unless narrowing is
  826.      in effect, in which case it is the position of the end of the
  827.      region that you narrowed to.  (*Note Narrowing::).
  828.  
  829.  - Function: buffer-end FLAG
  830.      This function returns `(point-min)' if FLAG is less than 1,
  831.      `(point-max)' otherwise.  The argument FLAG must be a number.
  832.  
  833.  - Function: buffer-size
  834.      This function returns the total number of characters in the current
  835.      buffer.  In the absence of any narrowing (*note Narrowing::.),
  836.      `point-max' returns a value one larger than this.
  837.  
  838.           (buffer-size)
  839.                => 35
  840.           (point-max)
  841.                => 36
  842.  
  843.  - Variable: buffer-saved-size
  844.      The value of this buffer-local variable is the former length of the
  845.      current buffer, as of the last time it was read in, saved or
  846.      auto-saved.
  847.  
  848. 
  849. File: elisp,  Node: Motion,  Next: Excursions,  Prev: Point,  Up: Positions
  850.  
  851. Motion
  852. ======
  853.  
  854.    Motion functions change the value of point, either relative to the
  855. current value of point, relative to the beginning or end of the buffer,
  856. or relative to the edges of the selected window.  *Note Point::.
  857.  
  858. * Menu:
  859.  
  860. * Character Motion::       Moving in terms of characters.
  861. * Word Motion::            Moving in terms of words.
  862. * Buffer End Motion::      Moving to the beginning or end of the buffer.
  863. * Text Lines::             Moving in terms of lines of text.
  864. * Screen Lines::           Moving in terms of lines as displayed.
  865. * Vertical Motion::        Implementation of `next-line' and
  866.                              `previous-line'.
  867. * List Motion::            Moving by parsing lists and sexps.
  868. * Skipping Characters::    Skipping characters belonging to a certain set.
  869.  
  870. 
  871. File: elisp,  Node: Character Motion,  Next: Word Motion,  Prev: Motion,  Up: Motion
  872.  
  873. Motion by Characters
  874. --------------------
  875.  
  876.    These functions move point based on a count of characters.
  877. `goto-char' is a fundamental primitive because it is the way to move
  878. point to a specified position.
  879.  
  880.  - Command: goto-char POSITION
  881.      This function sets point in the current buffer to the value
  882.      POSITION.  If POSITION is less than 1, then point is set to the
  883.      beginning of the buffer.  If it is greater than the length of the
  884.      buffer, then point is set to the end of the buffer.
  885.  
  886.      If narrowing is in effect, then the position is still measured
  887.      from the beginning of the buffer, but point cannot be moved
  888.      outside of the accessible portion.  Therefore, if POSITION is too
  889.      small, point is set to the beginning of the accessible portion of
  890.      the text; if POSITION is too large, point is set to the end.
  891.  
  892.      When this function is called interactively, POSITION is the
  893.      numeric prefix argument, if provided; otherwise it is read from the
  894.      minibuffer.
  895.  
  896.      `goto-char' returns POSITION.
  897.  
  898.  - Command: forward-char &optional COUNT
  899.      This function moves point forward, towards the end of the buffer,
  900.      COUNT characters (or backward, towards the beginning of the
  901.      buffer, if COUNT is negative).  If the function attempts to move
  902.      point past the beginning or end of the buffer (or the limits of the
  903.      accessible portion, when narrowing is in effect), an error is
  904.      signaled with error code `beginning-of-buffer' or `end-of-buffer'.
  905.  
  906.      In an interactive call, COUNT is the numeric prefix argument.
  907.  
  908.  - Command: backward-char &optional COUNT
  909.      This function moves point backward, towards the beginning of the
  910.      buffer, COUNT characters (or forward, towards the end of the
  911.      buffer, if COUNT is negative).  If the function attempts to move
  912.      point past the beginning or end of the buffer (or the limits of
  913.      the accessible portion, when narrowing is in effect), an error is
  914.      signaled with error code `beginning-of-buffer' or `end-of-buffer'.
  915.  
  916.      In an interactive call, COUNT is the numeric prefix argument.
  917.  
  918. 
  919. File: elisp,  Node: Word Motion,  Next: Buffer End Motion,  Prev: Character Motion,  Up: Motion
  920.  
  921. Motion by Words
  922. ---------------
  923.  
  924.    These functions for parsing words use the syntax table to decide
  925. whether a given character is part of a word.  *Note Syntax Tables::.
  926.  
  927.  - Command: forward-word COUNT
  928.      This function moves point forward COUNT words (or backward if
  929.      COUNT is negative).  Normally it returns `t'.  If this motion
  930.      encounters the beginning or end of the buffer, or the limits of the
  931.      accessible portion when narrowing is in effect, point stops there
  932.      and the value is `nil'.
  933.  
  934.      In an interactive call, COUNT is set to the numeric prefix
  935.      argument.
  936.  
  937.  - Command: backward-word COUNT
  938.      This function just like `forward-word', except that it moves
  939.      backward until encountering the front of a word, rather than
  940.      forward.
  941.  
  942.      In an interactive call, COUNT is set to the numeric prefix
  943.      argument.
  944.  
  945.      This function is rarely used in programs, as it is more efficient
  946.      to call `forward-word' with negative argument.
  947.  
  948.  - Variable: words-include-escapes
  949.      This variable affects the behavior of `forward-word' and everything
  950.      that uses it.  If it is non-`nil', then characters in the "escape"
  951.      and "character quote" syntax classes count as part of words.
  952.      Otherwise, they do not.
  953.  
  954. 
  955. File: elisp,  Node: Buffer End Motion,  Next: Text Lines,  Prev: Word Motion,  Up: Motion
  956.  
  957. Motion to an End of the Buffer
  958. ------------------------------
  959.  
  960.    To move point to the beginning of the buffer, write:
  961.  
  962.      (goto-char (point-min))
  963.  
  964. Likewise, to move to the end of the buffer, use:
  965.  
  966.      (goto-char (point-max))
  967.  
  968.    Here are two commands which users use to do these things.  They are
  969. documented here to warn you not to use them in Lisp programs, because
  970. they set the mark and display messages in the echo area.
  971.  
  972.  - Command: beginning-of-buffer &optional N
  973.      This function moves point to the beginning of the buffer (or the
  974.      limits of the accessible portion, when narrowing is in effect),
  975.      setting the mark at the previous position.  If N is non-`nil',
  976.      then it puts point N tenths of the way from the beginning of the
  977.      buffer.
  978.  
  979.      In an interactive call, N is the numeric prefix argument, if
  980.      provided; otherwise N defaults to `nil'.
  981.  
  982.      Don't use this function in Lisp programs!
  983.  
  984.  - Command: end-of-buffer &optional N
  985.      This function moves point to the end of the buffer (or the limits
  986.      of the accessible portion, when narrowing is in effect), setting
  987.      the mark at the previous position.  If N is non-`nil', then it puts
  988.      point N tenths of the way from the end.
  989.  
  990.      In an interactive call, N is the numeric prefix argument, if
  991.      provided; otherwise N defaults to `nil'.
  992.  
  993.      Don't use this function in Lisp programs!
  994.  
  995. 
  996. File: elisp,  Node: Text Lines,  Next: Screen Lines,  Prev: Buffer End Motion,  Up: Motion
  997.  
  998. Motion by Text Lines
  999. --------------------
  1000.  
  1001.    Text lines are portions of the buffer delimited by newline
  1002. characters, which are regarded as part of the previous line.  The first
  1003. text line begins at the beginning of the buffer, and the last text line
  1004. ends at the end of the buffer whether or not the last character is a
  1005. newline.  The division of the buffer into text lines is not affected by
  1006. the width of the window, or by how tabs and control characters are
  1007. displayed.
  1008.  
  1009.  - Command: goto-line LINE
  1010.      This function moves point to the front of the LINEth line,
  1011.      counting from line 1 at beginning of buffer.  If LINE is less than
  1012.      1, then point is set to the beginning of the buffer.  If LINE is
  1013.      greater than the number of lines in the buffer, then point is set
  1014.      to the *end of the last line* of the buffer.
  1015.  
  1016.      If narrowing is in effect, then LINE still counts from the
  1017.      beginning of the buffer, but point cannot go outside the accessible
  1018.      portion.  So point is set at the beginning or end of the accessible
  1019.      portion of the text if the line number specifies a position that is
  1020.      inaccessible.
  1021.  
  1022.      The return value of `goto-line' is the difference between LINE and
  1023.      the line number of the line to which point actually was able move
  1024.      (before taking account of any narrowing).  Thus, the value is
  1025.      positive if the scan encounters the end of the buffer.
  1026.  
  1027.      In an interactive call, LINE is the numeric prefix argument if one
  1028.      has been provided.  Otherwise LINE is read in the minibuffer.
  1029.  
  1030.  - Command: beginning-of-line &optional COUNT
  1031.      This function moves point to the beginning of the current line.
  1032.      With an argument COUNT not `nil' or 1, it moves forward COUNT-1
  1033.      lines and then to the beginning of the line.
  1034.  
  1035.      If this function reaches the end of the buffer (or of the
  1036.      accessible portion, if narrowing is in effect), it positions point
  1037.      at the beginning of the last line.  No error is signaled.
  1038.  
  1039.  - Command: end-of-line &optional COUNT
  1040.      This function moves point to the end of the current line.  With an
  1041.      argument COUNT not `nil' or 1, it moves forward COUNT-1 lines and
  1042.      then to the end of the line.
  1043.  
  1044.      If this function reaches the end of the buffer (or of the
  1045.      accessible portion, if narrowing is in effect), it positions point
  1046.      at the end of the last line.  No error is signaled.
  1047.  
  1048.  - Command: forward-line &optional COUNT
  1049.      This function moves point forward COUNT lines, to the beginning of
  1050.      the line.  If COUNT is negative, it moves point -COUNT lines
  1051.      backward, to the beginning of the line.
  1052.  
  1053.      If the beginning or end of the buffer (or of the accessible
  1054.      portion) is encountered before that many lines are found, then
  1055.      point stops at the beginning or end.  No error is signaled.
  1056.  
  1057.      `forward-line' returns the difference between COUNT and the number
  1058.      of lines actually moved.  If you attempt to move down five lines
  1059.      from the beginning of a buffer that has only three lines, point
  1060.      will positioned at the end of the last line, and the value will be
  1061.      2.
  1062.  
  1063.      In an interactive call, COUNT is the numeric prefix argument.
  1064.  
  1065.  - Function: count-lines START END
  1066.      This function returns the number of lines between the positions
  1067.      START and END in the current buffer.  If START and END are equal,
  1068.      then it returns 0.  Otherwise it returns at least 1, even if START
  1069.      and END are on the same line.  This is because the text between
  1070.      them, considered in isolation, must contain at least one line
  1071.      unless it is empty.
  1072.  
  1073.      Here is an example of using `count-lines':
  1074.  
  1075.           (defun current-line ()
  1076.             "Return the vertical position of point
  1077.           in the selected window.  Top line is 0.
  1078.           Counts each text line only once, even if it wraps."
  1079.             (+ (count-lines (window-start) (point))
  1080.                (if (= (current-column) 0) 1 0)
  1081.                -1))
  1082.  
  1083.    Also see the functions `bolp' and `eolp' in *Note Near Point::.
  1084. These functions do not move point, but test whether it is already at the
  1085. beginning or end of a line.
  1086.  
  1087. 
  1088. File: elisp,  Node: Screen Lines,  Next: Vertical Motion,  Prev: Text Lines,  Up: Motion
  1089.  
  1090. Motion by Screen Lines
  1091. ----------------------
  1092.  
  1093.    The line functions in the previous section count text lines,
  1094. delimited only by newline characters.  By contrast, these functions
  1095. count screen lines, which are defined by the way the text appears on
  1096. the screen.  A text line is a single screen line if it is short enough
  1097. to fit the width of the selected window, but otherwise it may occupy
  1098. several screen lines.
  1099.  
  1100.    In some cases, text lines are truncated on the screen rather than
  1101. continued onto additional screen lines.  Then `vertical-motion' moves
  1102. point just like `forward-line'.  *Note Truncation::.
  1103.  
  1104.    Because the width of a given string depends on the flags which
  1105. control the appearance of certain characters, `vertical-motion' will
  1106. behave differently on a given piece of text found in different buffers.
  1107. It will even act differently in different windows showing the same
  1108. buffer, because the width may differ and so may the truncation flag.
  1109. *Note Usual Display::.
  1110.  
  1111.  - Function: vertical-motion COUNT
  1112.      This function moves point to the start of the screen line COUNT
  1113.      screen lines down from the screen line containing point.  If COUNT
  1114.      is negative, it moves up instead.
  1115.  
  1116.      This function returns the number of lines moved.  The value may be
  1117.      less in absolute value than COUNT if the beginning or end of the
  1118.      buffer was reached.
  1119.  
  1120.  - Command: move-to-window-line COUNT
  1121.      This function moves point with respect to the text currently
  1122.      displayed in the selected window.  Point is moved to the beginning
  1123.      of the screen line COUNT screen lines from the top of the window.
  1124.      If COUNT is negative, point moves either to the beginning of the
  1125.      line -COUNT lines from the bottom or else to the last line of the
  1126.      buffer if the buffer ends above the specified screen position.
  1127.  
  1128.      If COUNT is `nil', then point moves to the beginning of the line
  1129.      in the middle of the window.  If the absolute value of COUNT is
  1130.      greater than the size of the window, then point moves to the place
  1131.      which would appear on that screen line if the window were tall
  1132.      enough.  This will probably cause the next redisplay to scroll to
  1133.      bring that location onto the screen.
  1134.  
  1135.      In an interactive call, COUNT is the numeric prefix argument.
  1136.  
  1137.      The value returned is the window line number, with the top line in
  1138.      the window numbered 0.
  1139.  
  1140. 
  1141. File: elisp,  Node: Vertical Motion,  Next: List Motion,  Prev: Screen Lines,  Up: Motion
  1142.  
  1143. The User-Level Vertical Motion Commands
  1144. ---------------------------------------
  1145.  
  1146.    A goal column is useful if you want to edit text such as a table in
  1147. which you want to move point to a certain column on each line.  The goal
  1148. column affects the vertical text line motion commands, `next-line' and
  1149. `previous-line'.  *Note Basic Editing Commands: (emacs)Basic.
  1150.  
  1151.  - User Option: goal-column
  1152.      This variable holds an explicitly specified goal column for
  1153.      vertical line motion commands.  If it is an integer, it specifies
  1154.      a column, and these commands try to move to that column on each
  1155.      line.  If it is `nil', then the commands set their own goal
  1156.      columns.  Any other value is invalid.
  1157.  
  1158.  - Variable: temporary-goal-column
  1159.      This variable holds the temporary goal column during a sequence of
  1160.      consecutive vertical line motion commands.  It is overridden by
  1161.      `goal-column' if that is non-`nil'.  It is set each time a
  1162.      vertical motion command is invoked, unless the previous command
  1163.      was also a vertical motion command.
  1164.  
  1165.  - User Option: track-eol
  1166.      This variable controls how the vertical line motion commands
  1167.      operate when starting at the end of a line.  If `track-eol' is
  1168.      non-`nil', then vertical motion starting at the end of a line will
  1169.      keep to the ends of lines.  This means moving to the end of each
  1170.      line moved onto.  The value of `track-eol' has no effect if point
  1171.      is not at the end of a line when the first vertical motion command
  1172.      is given.
  1173.  
  1174.      `track-eol' has its effect by causing `temporary-goal-column' to
  1175.      be set to 9999 instead of to the current column.
  1176.  
  1177.  - Command: set-goal-column UNSET
  1178.      This command sets the variable `goal-column' to specify a permanent
  1179.      goal column for the vertical line motion commands.  If UNSET is
  1180.      `nil', then `goal-column' is set to the current column of point.
  1181.      If UNSET is non-`nil', then `goal-column' is set to `nil'.
  1182.  
  1183.      This function is intended for interactive use; and in an
  1184.      interactive call, UNSET is the raw prefix argument.
  1185.  
  1186. 
  1187. File: elisp,  Node: List Motion,  Next: Skipping Characters,  Prev: Vertical Motion,  Up: Motion
  1188.  
  1189. Moving over Balanced Expressions
  1190. --------------------------------
  1191.  
  1192.    Here are several functions concerned with balanced-parenthesis
  1193. expressions (also called "sexps" in connection with moving across them
  1194. in Emacs).  The syntax table controls how these functions interpret
  1195. various characters; see *Note Syntax Tables::.  *Note Parsing
  1196. Expressions::, for lower-level primitives for scanning sexps or parts of
  1197. sexps.  For user-level commands, see *Note Lists and Sexps:
  1198. (emacs)Lists and Sexps.
  1199.  
  1200.  - Command: forward-list ARG
  1201.      Move forward across ARG balanced groups of parentheses.  (Other
  1202.      syntactic entities such as words or paired string quotes are
  1203.      ignored.)
  1204.  
  1205.  - Command: backward-list ARG
  1206.      Move backward across ARG balanced groups of parentheses.  (Other
  1207.      syntactic entities such as words or paired string quotes are
  1208.      ignored.)
  1209.  
  1210.  - Command: up-list ARG
  1211.      Move forward out of ARG levels of parentheses.  A negative
  1212.      argument means move backward but still to a less deep spot.
  1213.  
  1214.  - Command: down-list ARG
  1215.      Move forward down ARG levels of parentheses.  A negative argument
  1216.      means move backward but still go down ARG level.
  1217.  
  1218.  - Command: forward-sexp ARG
  1219.      Move forward across ARG balanced expressions.  Balanced
  1220.      expressions include both those delimited by parentheses and other
  1221.      kinds, such as words and string constants.  For example,
  1222.  
  1223.           ---------- Buffer: foo ----------
  1224.           (concat-!- "foo " (car x) y z)
  1225.           ---------- Buffer: foo ----------
  1226.           
  1227.           (forward-sexp 3)
  1228.                => nil
  1229.           
  1230.           ---------- Buffer: foo ----------
  1231.           (concat "foo " (car x) y-!- z)
  1232.           ---------- Buffer: foo ----------
  1233.  
  1234.  - Command: backward-sexp ARG
  1235.      Move backward across ARG balanced expressions.
  1236.  
  1237.