home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / elisp / elisp-33 < prev    next >
Encoding:
GNU Info File  |  1993-05-11  |  49.4 KB  |  946 lines

  1. This is Info file elisp, produced by Makeinfo-1.52 from the input file
  2. elisp.texi.
  3.  
  4.    This file documents GNU Emacs Lisp.
  5.  
  6.    This is edition 2.0 of the GNU Emacs Lisp Reference Manual, for
  7. Emacs Version 19.
  8.  
  9.    Published by the Free Software Foundation, 675 Massachusetts Avenue,
  10. Cambridge, MA 02139 USA
  11.  
  12.    Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
  13.  
  14.    Permission is granted to make and distribute verbatim copies of this
  15. manual provided the copyright notice and this permission notice are
  16. preserved on all copies.
  17.  
  18.    Permission is granted to copy and distribute modified versions of
  19. this manual under the conditions for verbatim copying, provided that
  20. the entire resulting derived work is distributed under the terms of a
  21. permission notice identical to this one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that this permission notice may be stated in a
  26. translation approved by the Foundation.
  27.  
  28. 
  29. File: elisp,  Node: Selective Display,  Next: Overlay Arrow,  Prev: The Echo Area,  Up: Emacs Display
  30.  
  31. Selective Display
  32. =================
  33.  
  34.                                       "Selective display" is a class of
  35. minor modes in which specially marked lines do not appear on the
  36. screen, or in which highly indented lines do not appear.
  37.  
  38.                                       The first variant, explicit
  39. selective display, is designed for use in a Lisp program.  The program
  40. controls which lines are hidden by altering the text.  Outline mode
  41. uses this variant.  In the second variant, the choice of lines to hide
  42. is made automatically based on indentation.  This variant is designed
  43. as a user-level feature.
  44.  
  45.                                       The way you control explicit
  46. selective display is by replacing a newline (control-j) with a
  47. control-m.  The text which was formerly a line following that newline
  48. is now invisible.  Strictly speaking, it is temporarily no longer a
  49. line at all, since only newlines can separate lines; it is now part of
  50. the previous line.
  51.  
  52.                                       Selective display does not
  53. directly affect editing commands.  For example, `C-f' (`forward-char')
  54. moves point unhesitatingly into invisible space.  However, the
  55. replacement of newline characters with carriage return characters
  56. affects some editing commands.  For example, `next-line' skips
  57. invisible lines, since it searches only for newlines.  Modes that use
  58. selective display can also define commands that take account of the
  59. newlines, or which make parts of the text visible or invisible.
  60.  
  61.                                       When you write a selectively
  62. displayed buffer into a file, all the control-m's are replaced by their
  63. original newlines.  This means that when you next read in the file, it
  64. looks OK, with nothing invisible.  The selective display effect is seen
  65. only within Emacs.
  66.  
  67.                                     - Variable: selective-display
  68.                                         This buffer-local variable
  69.                                         enables selective display.
  70.                                         This means that lines, or
  71.                                         portions of lines, may be made
  72.                                         invisible.
  73.  
  74.                                            * If the value of
  75.                                              `selective-display' is
  76.                                              `t', then any portion of a
  77.                                              line that follows a
  78.                                              control-m is not displayed.
  79.  
  80.                                            * If the value of
  81.                                              `selective-display' is a
  82.                                              positive integer, then
  83.                                              lines that start with more
  84.                                              than `selective-display'
  85.                                              columns of indentation are
  86.                                              not displayed.
  87.  
  88.                                         When some portion of a buffer
  89.                                         is invisible, the vertical
  90.                                         movement commands operate as if
  91.                                         that portion did not exist,
  92.                                         allowing a single `next-line'
  93.                                         command to skip any number of
  94.                                         invisible lines.  However,
  95.                                         character movement commands
  96.                                         (such as `forward-char') do not
  97.                                         skip the invisible portion, and
  98.                                         it is possible (if tricky) to
  99.                                         insert or delete text in an
  100.                                         invisible portion.
  101.  
  102.                                         In the examples below, what is
  103.                                         shown is the *display* of the
  104.                                         buffer `foo', which changes
  105.                                         with the value of
  106.                                         `selective-display'.  The
  107.                                         *contents* of the buffer do not
  108.                                         change.
  109.  
  110.                                              (setq selective-display nil)
  111.                                                   => nil
  112.                                              
  113.                                              ---------- Buffer: foo ----------
  114.                                              1 on this column
  115.                                               2on this column
  116.                                                3n this column
  117.                                                3n this column
  118.                                               2on this column
  119.                                              1 on this column
  120.                                              ---------- Buffer: foo ----------
  121.                                              
  122.                                              (setq selective-display 2)
  123.                                                   => 2
  124.                                              
  125.                                              ---------- Buffer: foo ----------
  126.                                              1 on this column
  127.                                               2on this column
  128.                                               2on this column
  129.                                              1 on this column
  130.                                              ---------- Buffer: foo ----------
  131.  
  132.                                     - Variable:
  133.                                    selective-display-ellipses
  134.                                         If this buffer-local variable
  135.                                         is non-`nil', then Emacs
  136.                                         displays `...' at the end of a
  137.                                         line that is followed by
  138.                                         invisible text.  This example
  139.                                         is a continuation of the
  140.                                         previous one.
  141.  
  142.                                              (setq selective-display-ellipses t)
  143.                                                   => t
  144.                                              
  145.                                              ---------- Buffer: foo ----------
  146.                                              1 on this column
  147.                                               2on this column ...
  148.                                               2on this column
  149.                                              1 on this column
  150.                                              ---------- Buffer: foo ----------
  151.  
  152.                                         You can use a display table to
  153.                                         substitute other text for the
  154.                                         ellipsis (`...').  *Note
  155.                                         Display Tables::.
  156.  
  157. 
  158. File: elisp,  Node: Overlay Arrow,  Next: Temporary Displays,  Prev: Selective Display,  Up: Emacs Display
  159.  
  160. Overlay Arrow
  161. =============
  162.  
  163.                                       The "overlay arrow" is useful for
  164. directing the user's attention to a particular line in a buffer.  For
  165. example, in the modes used for interface to debuggers, the overlay
  166. arrow indicates the line of code about to be executed.
  167.  
  168.                                     - Variable: overlay-arrow-string
  169.                                         This variable holds the string
  170.                                         to display as an arrow, or
  171.                                         `nil' if the arrow feature is
  172.                                         not in use.
  173.  
  174.                                     - Variable: overlay-arrow-position
  175.                                         This variable holds a marker
  176.                                         which indicates where to
  177.                                         display the arrow.  It should
  178.                                         point at the beginning of a
  179.                                         line.  The arrow text is
  180.                                         displayed at the beginning of
  181.                                         that line, overlaying any text
  182.                                         that would otherwise appear.
  183.                                         Since the arrow is usually
  184.                                         short, and the line usually
  185.                                         begins with indentation,
  186.                                         normally nothing significant is
  187.                                         overwritten.
  188.  
  189.                                         The overlay string is displayed
  190.                                         only in the buffer which this
  191.                                         marker points into.  Thus, only
  192.                                         one buffer can have an overlay
  193.                                         arrow at any given time.
  194.  
  195. 
  196. File: elisp,  Node: Temporary Displays,  Next: Overlays,  Prev: Overlay Arrow,  Up: Emacs Display
  197.  
  198. Temporary Displays
  199. ==================
  200.  
  201.                                       Temporary displays are used by
  202. commands to put output into a buffer and then present it to the user
  203. for perusal rather than for editing.  Many of the help commands use
  204. this feature.
  205.  
  206.                                     - Special Form:
  207.                                    with-output-to-temp-buffer
  208.                                              BUFFER-NAME FORMS...
  209.                                         This function executes FORMS
  210.                                         while arranging to insert any
  211.                                         output they print into the
  212.                                         buffer named BUFFER-NAME.  The
  213.                                         buffer is then shown in some
  214.                                         window for viewing, displayed
  215.                                         but not selected.
  216.  
  217.                                         The string BUFFER-NAME
  218.                                         specifies the temporary buffer,
  219.                                         which need not already exist.
  220.                                         The argument must be a string,
  221.                                         not a buffer.  The buffer is
  222.                                         erased initially (with no
  223.                                         questions asked), and it is
  224.                                         marked as unmodified after
  225.                                         `with-output-to-temp-buffer'
  226.                                         exits.
  227.  
  228.                                         `with-output-to-temp-buffer'
  229.                                         binds `standard-output' to the
  230.                                         temporary buffer, then it
  231.                                         evaluates the forms in FORMS.
  232.                                         Output using the Lisp output
  233.                                         functions within FORMS goes by
  234.                                         default to that buffer (but
  235.                                         screen display and messages in
  236.                                         the echo area, although output
  237.                                         in the general sense of the
  238.                                         word, are not affected).  *Note
  239.                                         Output Functions::.
  240.  
  241.                                         The value of the last form in
  242.                                         FORMS is returned.
  243.  
  244.                                              ---------- Buffer: foo ----------
  245.                                               This is the contents of foo.
  246.                                              ---------- Buffer: foo ----------
  247.                                              
  248.                                              (with-output-to-temp-buffer "foo"
  249.                                                  (print 20)
  250.                                                  (print standard-output))
  251.                                              => #<buffer foo>
  252.                                              
  253.                                              ---------- Buffer: foo ----------
  254.                                              20
  255.                                              
  256.                                              #<buffer foo>
  257.                                              
  258.                                              ---------- Buffer: foo ----------
  259.  
  260.                                     - Variable:
  261.                                    temp-buffer-show-function
  262.                                         The value of this variable, if
  263.                                         non-`nil', is called as a
  264.                                         function to display a help
  265.                                         buffer.  This variable is used
  266.                                         by `with-output-to-temp-buffer'.
  267.  
  268.                                         In Emacs versions 18 and
  269.                                         earlier, this variable was
  270.                                         called `temp-buffer-show-hook'.
  271.  
  272.                                     - Function:
  273.                                              momentary-string-display
  274.                                              STRING POSITION &optional
  275.                                              CHAR MESSAGE
  276.                                         This function momentarily
  277.                                         displays STRING in the current
  278.                                         buffer at POSITION (which is a
  279.                                         character offset from the
  280.                                         beginning of the buffer).  The
  281.                                         display remains until the next
  282.                                         character is typed.
  283.  
  284.                                         If the next character the user
  285.                                         types is CHAR, Emacs ignores it.
  286.                                         Otherwise, that character
  287.                                         remains buffered for subsequent
  288.                                         use as input.  Thus, typing
  289.                                         CHAR will simply remove the
  290.                                         string from the display, while
  291.                                         typing (say) `C-f' will remove
  292.                                         the string from the display and
  293.                                         later (presumably) move point
  294.                                         forward.  The argument CHAR is a
  295.                                         space by default.
  296.  
  297.                                         The return value of
  298.                                         `momentary-string-display' is
  299.                                         not meaningful.
  300.  
  301.                                         If MESSAGE is non-`nil', it is
  302.                                         displayed in the echo area
  303.                                         while STRING is displayed in
  304.                                         the buffer.  If it is `nil',
  305.                                         then instructions to type CHAR
  306.                                         are displayed there, e.g.,
  307.                                         `Type RET to continue editing'.
  308.  
  309.                                         In this example, point is
  310.                                         initially located at the
  311.                                         beginning of the second line:
  312.  
  313.                                              ---------- Buffer: foo ----------
  314.                                              This is the contents of foo.
  315.                                              -!-Second line.
  316.                                              ---------- Buffer: foo ----------
  317.                                              
  318.                                              (momentary-string-display
  319.                                                 "**** Important Message! ****" (point) ?\r
  320.                                                 "Type RET when done reading")
  321.                                              => t
  322.                                              
  323.                                              ---------- Buffer: foo ----------
  324.                                              This is the contents of foo.
  325.                                              **** Important Message! ****Second line.
  326.                                              ---------- Buffer: foo ----------
  327.                                              
  328.                                              ---------- Echo Area ----------
  329.                                              Type RET when done reading
  330.                                              ---------- Echo Area ----------
  331.  
  332.                                         This function works by actually
  333.                                         changing the text in the
  334.                                         buffer.  As a result, if you
  335.                                         later undo in this buffer, you
  336.                                         will see the message come and
  337.                                         go.
  338.  
  339. 
  340. File: elisp,  Node: Overlays,  Next: Faces,  Prev: Temporary Displays,  Up: Emacs Display
  341.  
  342. Overlays
  343. ========
  344.  
  345.                                       You can use "overlays" to alter
  346. the appearance of a buffer's text on the screen.  An overlay is an
  347. object which belongs to a particular buffer, and has a specified
  348. beginning and end.  It also has properties which you can examine and
  349. set; these affect the display of the text within the overlay.
  350.  
  351.                                    * Menu:
  352.                                    
  353.                                    * Overlay Properties::    How to read and set properties.
  354.                                                What properties do to the screen display.
  355.                                    * Managing Overlays::   Creating, moving, finding overlays.
  356.  
  357. 
  358. File: elisp,  Node: Overlay Properties,  Next: Managing Overlays,  Up: Overlays
  359.  
  360. Overlay Properties
  361. ------------------
  362.  
  363.                                       Overlay properties are like text
  364. properties in some respects, but the differences are more important
  365. than the similarities.  Text properties are considered a part of the
  366. text; overlays are specifically considered not to be part of the text.
  367. Thus, copying text between various buffers and strings preserves text,
  368. but does not try to preserve overlays.  Changing a buffer's text
  369. properties marks the buffer as modified, while moving an overlay or
  370. changing its properties does not.
  371.  
  372.                                   `face'
  373.                                         This property controls the font
  374.                                         and color of text.  *Note
  375.                                         Faces::, for more information.
  376.                                         This feature is temporary; in
  377.                                         the future, we may replace it
  378.                                         with other ways of specifying
  379.                                         how to display text.
  380.  
  381.                                   `mouse-face'
  382.                                         This property is used instead
  383.                                         of `face' when the mouse is
  384.                                         within the range of the
  385.                                         overlay.  This feature is also
  386.                                         temporary.
  387.  
  388.                                   `priority'
  389.                                         This property's value (which
  390.                                         should be a nonnegative number)
  391.                                         determines the priority of the
  392.                                         overlay.  The priority matters
  393.                                         when two or more overlays cover
  394.                                         the same character and both
  395.                                         specify a face for display; the
  396.                                         one whose `priority' value is
  397.                                         larger takes priority over the
  398.                                         other, and its face attributes
  399.                                         override the face attributes of
  400.                                         the lower priority overlay.
  401.  
  402.                                         Currently, all overlays take
  403.                                         priority over text properties.
  404.                                         Please avoid using negative
  405.                                         priority values, as we have not
  406.                                         yet decided just what they
  407.                                         should mean.
  408.  
  409.                                   `window'
  410.                                         If the `window' property is
  411.                                         non-`nil', then the overlay
  412.                                         applies only on that window.
  413.  
  414.                                   `before-string'
  415.                                         This property's value is a
  416.                                         string to add to the display at
  417.                                         the beginning of the overlay.
  418.                                         The string does not appear in
  419.                                         the buffer in any sense--only
  420.                                         on the screen.
  421.  
  422.                                   `after-string'
  423.                                         This property's value is a
  424.                                         string to add to the display at
  425.                                         the end of the overlay.  The
  426.                                         string does not appear in the
  427.                                         buffer in any sense--only on
  428.                                         the screen.
  429.  
  430.                                       These are the functions for
  431. reading and writing the properties of an overlay.
  432.  
  433.                                     - Function: overlay-get OVERLAY PROP
  434.                                         This function returns the value
  435.                                         of property PROP recorded in
  436.                                         OVERLAY.  If OVERLAY does not
  437.                                         record any value for that
  438.                                         property, then the value is
  439.                                         `nil'.
  440.  
  441.                                     - Function: overlay-put OVERLAY
  442.                                              PROP VALUE
  443.                                         This function set the value of
  444.                                         property PROP recorded in
  445.                                         OVERLAY to VALUE.  It returns
  446.                                         VALUE.
  447.  
  448. 
  449. File: elisp,  Node: Managing Overlays,  Prev: Overlay Properties,  Up: Overlays
  450.  
  451. Managing Overlays
  452. -----------------
  453.  
  454.                                     - Function: make-overlay START END
  455.                                              &optional BUFFER
  456.                                         This function creates and
  457.                                         returns an overlay which
  458.                                         belongs to BUFFER and ranges
  459.                                         from START to END.  Both START
  460.                                         and END must specify buffer
  461.                                         positions; they may be integers
  462.                                         or markers.  If BUFFER is
  463.                                         omitted, the overlay is created
  464.                                         in the current buffer.
  465.  
  466.                                         The return value is the overlay
  467.                                         itself.
  468.  
  469.                                     - Function: overlay-start OVERLAY
  470.                                         This function returns the
  471.                                         position at which OVERLAY
  472.                                         starts.
  473.  
  474.                                     - Function: overlay-end OVERLAY
  475.                                         This function returns the
  476.                                         position at which OVERLAY ends.
  477.  
  478.                                     - Function: overlay-buffer OVERLAY
  479.                                         This function returns the
  480.                                         buffer that OVERLAY belongs to.
  481.  
  482.                                     - Function: delete-overlay OVERLAY
  483.                                         This function deletes OVERLAY.
  484.                                         The overlay continues to exist
  485.                                         as a Lisp object, but ceases to
  486.                                         be part of the buffer it
  487.                                         belonged to, and ceases to have
  488.                                         any effect on display.
  489.  
  490.                                     - Function: move-overlay OVERLAY
  491.                                              START END &optional BUFFER
  492.                                         This function moves OVERLAY to
  493.                                         BUFFER, and places its bounds
  494.                                         at START and END.  Both
  495.                                         arguments START and END must
  496.                                         specify buffer positions; they
  497.                                         may be integers or markers.  If
  498.                                         BUFFER is omitted, the overlay
  499.                                         stays in the same buffer.
  500.  
  501.                                         The return value is OVERLAY.
  502.  
  503.                                         This is the only valid way to
  504.                                         change the endpoints of an
  505.                                         overlay.  Do not try modifying
  506.                                         the markers in the overlay by
  507.                                         hand, as that fails to update
  508.                                         other vital data structures and
  509.                                         can cause some overlays to be
  510.                                         "lost".
  511.  
  512.                                     - Function: overlays-at POS
  513.                                         This function returns a list of
  514.                                         all the overlays that contain
  515.                                         position POS in the current
  516.                                         buffer.  The list is in no
  517.                                         particular order.  An overlay
  518.                                         contains position POS if it
  519.                                         begins at or before POS, and
  520.                                         ends after POS.
  521.  
  522.                                     - Function: next-overlays-change POS
  523.                                         This function returns the
  524.                                         buffer position of the next
  525.                                         beginning or end of an overlay,
  526.                                         after POS.
  527.  
  528. 
  529. File: elisp,  Node: Faces,  Next: Blinking,  Prev: Overlays,  Up: Emacs Display
  530.  
  531. Faces
  532. =====
  533.  
  534.                                       A "face" is a named collection of
  535. graphical attributes: font, foreground color, background color and
  536. optional underlining.  Faces control the display of text on the screen.
  537.  
  538.                                       Each face has its own "face id
  539. number" which distinguishes faces at low levels within Emacs.  However,
  540. for most purposes, you can refer to faces in Lisp programs by their
  541. names.
  542.  
  543.                                       Each face name is meaningful for
  544. all frames, and by default it has the same meaning in all frames.  But
  545. you can arrange to give a particular face name a special meaning in one
  546. frame if you wish.
  547.  
  548.                                    * Menu:
  549.                                    
  550.                                    * Choosing a Face::    How Emacs decides which face to use for a character.
  551.                                    * Face Functions::    How to define and examine faces.
  552.  
  553. 
  554. File: elisp,  Node: Choosing a Face,  Next: Face Functions,  Up: Faces
  555.  
  556. Choosing a Face for Display
  557. ---------------------------
  558.  
  559.                                       Here are all the ways to specify
  560. which face to use for display of text:
  561.  
  562.                                       * With defaults.  Each frame has
  563.                                         a "default face", whose id
  564.                                         number is zero, which is used
  565.                                         for all text that doesn't
  566.                                         somehow specify another face.
  567.  
  568.                                       * With text properties.  A
  569.                                         character may have a `face'
  570.                                         property; if so, it's displayed
  571.                                         with that face.  If the
  572.                                         character has a `mouse-face'
  573.                                         property, that is used instead
  574.                                         of the `face' property when the
  575.                                         mouse is "near enough" to the
  576.                                         character.  *Note Special
  577.                                         Properties::.
  578.  
  579.                                       * With overlays.  An overlay may
  580.                                         have `face' and `mouse-face'
  581.                                         properties too; they apply to
  582.                                         all the text covered by the
  583.                                         overlay.
  584.  
  585.                                       * With special glyphs.  Each
  586.                                         glyph can specify a particular
  587.                                         face id number.  *Note Glyphs::.
  588.  
  589.                                       If these various sources together
  590. specify more than one face for a particular character, Emacs merges the
  591. attributes of the various faces specified.  The attributes of the faces
  592. of special glyphs come first; then come attributes of faces from
  593. overlays, followed by those from text properties, and last the default
  594. face.
  595.  
  596.                                       When multiple overlays cover one
  597. character, an overlay with higher priority overrides those with lower
  598. priority.  *Note Overlays::.
  599.  
  600.                                       If an attribute such as the font
  601. or a color is not specified in any of the above ways, the frame's own
  602. font or color is used.
  603.  
  604. 
  605. File: elisp,  Node: Face Functions,  Prev: Choosing a Face,  Up: Faces
  606.  
  607. Functions for Working with Faces
  608. --------------------------------
  609.  
  610.                                       The attributes a face can specify
  611. include the font, the foreground color, the background color, and
  612. underlining.  The face can also leave these unspecified by giving the
  613. value `nil' for them.
  614.  
  615.                                       Here are the primitives for
  616. creating and changing faces.
  617.  
  618.                                     - Function: make-face NAME
  619.                                         This function defines a new
  620.                                         face named NAME, initially with
  621.                                         all attributes `nil'.  It does
  622.                                         nothing if there is already a
  623.                                         face named NAME.
  624.  
  625.                                     - Function: face-list
  626.                                         This function returns a list of
  627.                                         all defined face names.
  628.  
  629.                                     - Function: copy-face OLD-FACE
  630.                                              NEW-NAME &optional FRAME
  631.                                         This function defines a new
  632.                                         face named NEW which is a copy
  633.                                         of the existing face named OLD.
  634.                                         If there is already a face
  635.                                         named NEW, then it alters the
  636.                                         face to have the same
  637.                                         attributes as OLD.
  638.  
  639.                                         If the optional argument FRAME
  640.                                         is given, this function applies
  641.                                         only to that frame.  Otherwise
  642.                                         it applies to each frame
  643.                                         individually.
  644.  
  645.                                       You can modify the attributes of
  646. an existing face with the following functions.  If you specify FRAME,
  647. they affect just that frame; otherwise, they affect all frames as well
  648. as the defaults that apply to new frames.
  649.  
  650.                                     - Function: set-face-foreground
  651.                                              FACE COLOR &optional FRAME
  652.                                     - Function: set-face-background
  653.                                              FACE COLOR &optional FRAME
  654.                                         These functions set the
  655.                                         foreground (respectively,
  656.                                         background) color of face FACE
  657.                                         to COLOR.  The argument COLOR
  658.                                         color should be a string, the
  659.                                         name of a color.
  660.  
  661.                                     - Function: set-face-font FACE FONT
  662.                                              &optional FRAME
  663.                                         This function sets the font of
  664.                                         face FACE.  The argument FONT
  665.                                         should be a string.
  666.  
  667.                                     - Function: set-face-underline-p
  668.                                              FACE UNDERLINE-P &optional
  669.                                              FRAME
  670.                                         This function sets the
  671.                                         underline attribute of face
  672.                                         FACE.
  673.  
  674.                                     - Function: invert-face FACE
  675.                                              &optional FRAME
  676.                                         Swap the foreground and
  677.                                         background colors of face FACE.
  678.                                         If the face doesn't specify
  679.                                         both foreground and background,
  680.                                         then its foreground and
  681.                                         background are set to the
  682.                                         background and foreground of
  683.                                         the default face.
  684.  
  685.                                       These functions examine the
  686. attributes of a face.  If you don't specify FRAME, they refer to the
  687. default data for new frames.
  688.  
  689.                                     - Function: face-foreground FACE
  690.                                              &optional FRAME
  691.                                     - Function: face-background FACE
  692.                                              &optional FRAME
  693.                                         These functions return the
  694.                                         foreground (respectively,
  695.                                         background) color of face FACE.
  696.                                         The argument COLOR color
  697.                                         should be a string, the name of
  698.                                         a color.
  699.  
  700.                                     - Function: face-font FACE
  701.                                              &optional FRAME
  702.                                         This function returns the name
  703.                                         of the font of face FACE.
  704.  
  705.                                     - Function: face-underline-p FACE
  706.                                              &optional FRAME
  707.                                         This function returns the
  708.                                         underline attribute of face
  709.                                         FACE.
  710.  
  711.                                     - Function: face-id-number FACE
  712.                                         This function returns the id
  713.                                         number of face FACE.
  714.  
  715.                                     - Function: face-equal FACE1 FACE2
  716.                                              &optional FRAME
  717.                                         This returns `t' if the faces
  718.                                         FACE1 and FACE2 have the same
  719.                                         attributes for display.
  720.  
  721.                                     - Function:
  722.                                    face-differs-from-default-p FACE
  723.                                              &optional FRAME
  724.                                         This returns `t' if the face
  725.                                         FACE displays differently from
  726.                                         the default face.  A face is
  727.                                         considered to be "the same" as
  728.                                         the normal face if each
  729.                                         attribute is either the same as
  730.                                         that of the default face or
  731.                                         `nil' (meaning to inherit from
  732.                                         the default).
  733.  
  734. 
  735. File: elisp,  Node: Blinking,  Next: Inverse Video,  Prev: Faces,  Up: Emacs Display
  736.  
  737. Blinking
  738. ========
  739.  
  740.                                       This section describes the
  741. mechanism by which Emacs shows a matching open parenthesis when the
  742. user inserts a close parenthesis.
  743.  
  744.                                     - Variable: blink-paren-function
  745.                                         The value of this variable
  746.                                         should be a function (of no
  747.                                         arguments) to be called
  748.                                         whenever a char with close
  749.                                         parenthesis syntax is inserted.
  750.                                         The value of
  751.                                         `blink-paren-function' may be
  752.                                         `nil', in which case nothing is
  753.                                         done.
  754.  
  755.                                              *Please note:* this
  756.                                              variable was named
  757.                                              `blink-paren-hook' in
  758.                                              older Emacs versions, but
  759.                                              since it is not called
  760.                                              with the standard
  761.                                              convention for hooks, it
  762.                                              was renamed to
  763.                                              `blink-paren-function' in
  764.                                              version 19.
  765.  
  766.                                     - Variable: blink-matching-paren
  767.                                         If this variable is `nil', then
  768.                                         `blink-matching-open' does
  769.                                         nothing.
  770.  
  771.                                     - Variable:
  772.                                    blink-matching-paren-distance
  773.                                         This variable specifies the
  774.                                         maximum distance to scan for a
  775.                                         matching parenthesis before
  776.                                         giving up.
  777.  
  778.                                     - Function: blink-matching-open
  779.                                         This function is the default
  780.                                         value of
  781.                                         `blink-paren-function'.  It
  782.                                         assumes that point follows a
  783.                                         character with close
  784.                                         parenthesis syntax and moves
  785.                                         the cursor momentarily to the
  786.                                         matching opening character.  If
  787.                                         that character is not already
  788.                                         on the screen, then its context
  789.                                         is shown by displaying it in
  790.                                         the echo area.  To avoid long
  791.                                         delays, this function does not
  792.                                         search farther than
  793.                                         `blink-matching-paren-distance'
  794.                                         characters.
  795.  
  796.                                         Here is an example of calling
  797.                                         this function explicitly.
  798.  
  799.                                              (defun interactive-blink-matching-open ()
  800.                                                "Indicate momentarily the start of sexp before point."
  801.                                                (interactive)
  802.                                                (let ((blink-matching-paren-distance
  803.                                                       (buffer-size))
  804.                                                      (blink-matching-paren t))
  805.                                                  (blink-matching-open)))
  806.  
  807. 
  808. File: elisp,  Node: Inverse Video,  Next: Usual Display,  Prev: Blinking,  Up: Emacs Display
  809.  
  810. Inverse Video
  811. =============
  812.  
  813.                                     - User Option: inverse-video
  814.                                         This variable controls whether
  815.                                         Emacs uses inverse video for
  816.                                         all text on the screen.
  817.                                         Non-`nil' means yes, `nil'
  818.                                         means no.  The default is `nil'.
  819.  
  820.                                     - User Option:
  821.                                    mode-line-inverse-video
  822.                                         This variable controls the use
  823.                                         of inverse video for mode
  824.                                         lines.  If it is non-`nil',
  825.                                         then mode lines are displayed
  826.                                         in inverse video (or another
  827.                                         suitable display mode).
  828.                                         Otherwise, mode lines are
  829.                                         displayed normal, just like the
  830.                                         rest of the screen.  The
  831.                                         default is `t'.
  832.  
  833. 
  834. File: elisp,  Node: Usual Display,  Next: Display Tables,  Prev: Inverse Video,  Up: Emacs Display
  835.  
  836. Usual Display Conventions
  837. =========================
  838.  
  839.                                       The usual display conventions
  840. define how to display each character code.  You can override these
  841. conventions by setting up a display table (*note Display Tables::.).
  842. Here are the usual display conventions:
  843.  
  844.                                       * Character codes 32 through 126
  845.                                         map to glyph codes 32 through
  846.                                         126.  Normally this means they
  847.                                         display as themselves.
  848.  
  849.                                       * Character code 9 is a
  850.                                         horizontal tab.  It displays as
  851.                                         whitespace up to a position
  852.                                         determined by `tab-width'.
  853.  
  854.                                       * Character code 10 is a newline.
  855.  
  856.                                       * All other codes in the range 0
  857.                                         through 31, and code 127,
  858.                                         display in one of two ways
  859.                                         according to the value of
  860.                                         `ctl-arrow'.  If it is is
  861.                                         non-`nil', these codes map to
  862.                                         sequences of two glyphs, where
  863.                                         the first glyph is the ASCII
  864.                                         code for `^'.  Otherwise, these
  865.                                         codes map just like the codes
  866.                                         in the range 128 to 255.
  867.  
  868.                                       * Character codes 128 through 255
  869.                                         map to sequences of four
  870.                                         glyphs, where the first glyph
  871.                                         is the ASCII code for `\', and
  872.                                         the others are digit characters
  873.                                         representing the code in octal.
  874.  
  875.                                       The usual display conventions
  876. apply even when there is a display table, for any character whose entry
  877. in the active display table is `nil'.  Thus, when you set up a display
  878. table, you need only specify the the characters for which you want
  879. unusual behavior.
  880.  
  881.                                       These variables affect the way
  882. certain characters are displayed on the screen.  Since they change the
  883. number of columns the characters occupy, they also affect the
  884. indentation functions.
  885.  
  886.                                     - User Option: ctl-arrow
  887.                                         This buffer-local variable
  888.                                         controls how control characters
  889.                                         are displayed.  If it is
  890.                                         non-`nil', they are displayed
  891.                                         as an uparrow followed by the
  892.                                         character: `^A'.  If it is
  893.                                         `nil', they are displayed as a
  894.                                         backslash followed by three
  895.                                         octal digits: `\001'.
  896.  
  897.                                     - Variable: default-ctl-arrow
  898.                                         The value of this variable is
  899.                                         the default value for
  900.                                         `ctl-arrow' in buffers that do
  901.                                         not override it.  This is the
  902.                                         same as executing the following
  903.                                         expression:
  904.  
  905.                                              (default-value 'ctl-arrow)
  906.  
  907.                                         *Note Default Value::.
  908.  
  909.                                     - User Option: tab-width
  910.                                         The value of this variable is
  911.                                         the spacing between tab stops
  912.                                         used for displaying tab
  913.                                         characters in Emacs buffers.
  914.                                         The default is 8.  Note that
  915.                                         this feature is completely
  916.                                         independent from the
  917.                                         user-settable tab stops used by
  918.                                         the command `tab-to-tab-stop'.
  919.                                         *Note Indent Tabs::.
  920.  
  921. 
  922. File: elisp,  Node: Display Tables,  Next: Beeping,  Prev: Usual Display,  Up: Emacs Display
  923.  
  924. Display Tables
  925. ==============
  926.  
  927.                                       You can use the "display table"
  928. feature to control how all 256 possible character codes display on the
  929. screen.  This is useful for displaying European languages that have
  930. letters not in the ASCII character set.
  931.  
  932.                                       The display table maps each
  933. character code into a sequence of "glyphs", each glyph being an image
  934. that takes up one character position on the screen.  You can also
  935. define how to display each glyph on your terminal, using the "glyph
  936. table".
  937.  
  938.                                    * Menu:
  939.                                    
  940.                                    * Display Table Format::    What a display table consists of.
  941.                                    * Active Display Table::    How Emacs selects a display table to use.
  942.                                    * Glyphs::            How to define a glyph, and what glyphs mean.
  943.                                    * ISO Latin 1::            How to use display tables
  944.                                                      to support the ISO Latin 1 character set.
  945.  
  946.