annotate lispref/display.texi @ 10033:8f4aaec7f0e0

Delete duplicate of sparc-*.
author Doug Evans <dje@gnu.org>
date Mon, 21 Nov 1994 17:15:24 +0000
parents 7cdfcd5e71ff
children 0a84a40f16d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 @c -*-texinfo-*-
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 @c This is part of the GNU Emacs Lisp Reference Manual.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 @c See the file elisp.texi for copying conditions.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 @setfilename ../info/display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 @node Display, Calendar, System Interface, Top
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 @chapter Emacs Display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 This chapter describes a number of features related to the display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 that Emacs presents to the user.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 @menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 * Refresh Screen:: Clearing the screen and redrawing everything on it.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 * Screen Size:: How big is the Emacs screen.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 * Truncation:: Folding or wrapping long text lines.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 * The Echo Area:: Where messages are displayed.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 * Selective Display:: Hiding part of the buffer text.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 * Overlay Arrow:: Display of an arrow to indicate position.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 * Temporary Displays:: Displays that go away automatically.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 * Overlays:: Use overlays to highlight parts of the buffer.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 * Faces:: A face defines a graphics appearance: font, color, etc.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 * Blinking:: How Emacs shows the matching open parenthesis.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 * Inverse Video:: Specifying how the screen looks.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 * Usual Display:: The usual conventions for displaying nonprinting chars.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 * Display Tables:: How to specify other conventions.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 * Beeping:: Audible signal to the user.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 * Window Systems:: Which window system is being used.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 @end menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 @node Refresh Screen
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 @section Refreshing the Screen
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 The function @code{redraw-frame} redisplays the entire contents of a
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 given frame. @xref{Frames}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 @c Emacs 19 feature
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 @defun redraw-frame frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 This function clears and redisplays frame @var{frame}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 Even more powerful is @code{redraw-display}:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 @deffn Command redraw-display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 This function clears and redisplays all visible frames.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 @end deffn
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 Normally, suspending and resuming Emacs also refreshes the screen.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 Some terminal emulators record separate contents for display-oriented
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 programs such as Emacs and for ordinary sequential display. If you are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 using such a terminal, you might want to inhibit the redisplay on
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
51 resumption.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 @defvar no-redraw-on-reenter
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 @cindex suspend (cf. @code{no-redraw-on-reenter})
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 @cindex resume (cf. @code{no-redraw-on-reenter})
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 This variable controls whether Emacs redraws the entire screen after it
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 has been suspended and resumed. Non-@code{nil} means yes, @code{nil}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 means no.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 Processing user input takes absolute priority over redisplay. If you
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 call these functions when input is available, they do nothing
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 immediately, but a full redisplay does happen eventually---after all the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 input has been processed.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 @node Screen Size
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 @section Screen Size
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 @cindex size of screen
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 @cindex screen size
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 @cindex display lines
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 @cindex display columns
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 @cindex resize redisplay
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
74 The screen size functions access or specify the height or width of
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 the terminal. When you are using multiple frames, they apply to the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 selected frame (@pxref{Frames}).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 @defun screen-height
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 This function returns the number of lines on the screen that are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 available for display.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 (screen-height)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 @result{} 50
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 @defun screen-width
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91 This function returns the number of columns on the screen that are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 available for display.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 (screen-width)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 @result{} 80
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 @defun set-screen-height lines &optional not-actual-size
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 This function declares that the terminal can display @var{lines} lines.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 The sizes of existing windows are altered proportionally to fit.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 If @var{not-actual-size} is non-@code{nil}, then Emacs displays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 @var{lines} lines of output, but does not change its value for the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 actual height of the screen. (Knowing the correct actual size may be
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 necessary for correct cursor positioning.) Using a smaller height than
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 the terminal actually implements may be useful to reproduce behavior
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 observed on a smaller screen, or if the terminal malfunctions when using
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 its whole screen.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 If @var{lines} is different from what it was previously, then the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 entire screen is cleared and redisplayed using the new size.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 This function returns @code{nil}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 @defun set-screen-width columns &optional not-actual-size
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 This function declares that the terminal can display @var{columns}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 columns. The details are as in @code{set-screen-height}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 @node Truncation
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 @section Truncation
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 @cindex line wrapping
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 @cindex continuation lines
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 @cindex @samp{$} in display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 @cindex @samp{\} in display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 When a line of text extends beyond the right edge of a window, the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 line can either be continued on the next screen line, or truncated to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 one screen line. The additional screen lines used to display a long
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 text line are called @dfn{continuation} lines. Normally, a @samp{$} in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 the rightmost column of the window indicates truncation; a @samp{\} on
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 the rightmost column indicates a line that ``wraps'' or is continued
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 onto the next line. (The display table can specify alternative
7086
075343a6b32b *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6598
diff changeset
139 indicators; see @ref{Display Tables}.)
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 Note that continuation is different from filling; continuation happens
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142 on the screen only, not in the buffer contents, and it breaks a line
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 precisely at the right margin, not at a word boundary. @xref{Filling}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 @defopt truncate-lines
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 This buffer-local variable controls how Emacs displays lines that extend
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 beyond the right edge of the window. The default is @code{nil}, which
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 specifies continuation. If the value is non-@code{nil}, then these
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 lines are truncated.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 If the variable @code{truncate-partial-width-windows} is non-@code{nil},
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 then truncation is always used for side-by-side windows (within one
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 frame) regardless of the value of @code{truncate-lines}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 @end defopt
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 @defvar default-truncate-lines
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 This variable is the default value for @code{truncate-lines}, for
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 buffers that do not have local values for it.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 @defopt truncate-partial-width-windows
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 This variable controls display of lines that extend beyond the right
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 edge of the window, in side-by-side windows (@pxref{Splitting Windows}).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 If it is non-@code{nil}, these lines are truncated; otherwise,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 @code{truncate-lines} says what to do with them.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 @end defopt
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 You can override the images that indicate continuation or truncation
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 with the display table; see @ref{Display Tables}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 @node The Echo Area
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 @section The Echo Area
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 @cindex error display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 @cindex echo area
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 The @dfn{echo area} is used for displaying messages made with the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 @code{message} primitive, and for echoing keystrokes. It is not the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 same as the minibuffer, despite the fact that the minibuffer appears
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 (when active) in the same place on the screen as the echo area. The
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 @cite{GNU Emacs Manual} specifies the rules for resolving conflicts
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 between the echo area and the minibuffer for use of that screen space
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 (@pxref{Minibuffer,, The Minibuffer, emacs, The GNU Emacs Manual}).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183 Error messages appear in the echo area; see @ref{Errors}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 You can write output in the echo area by using the Lisp printing
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186 functions with @code{t} as the stream (@pxref{Output Functions}), or as
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 follows:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 @defun message string &rest arguments
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190 This function prints a one-line message in the echo area. The
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 argument @var{string} is similar to a C language @code{printf} control
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
192 string. See @code{format} in @ref{String Conversion}, for the details
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 on the conversion specifications. @code{message} returns the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 constructed string.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195
7735
7db892210924 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7086
diff changeset
196 In batch mode, @code{message} prints the message text on the standard
7db892210924 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7086
diff changeset
197 error stream, followed by a newline.
7db892210924 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7086
diff changeset
198
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 @c Emacs 19 feature
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 If @var{string} is @code{nil}, @code{message} clears the echo area. If
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 the minibuffer is active, this brings the minibuffer contents back onto
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202 the screen immediately.
7735
7db892210924 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7086
diff changeset
203
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206 (message "Minibuffer depth is %d."
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207 (minibuffer-depth))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208 @print{} Minibuffer depth is 0.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
209 @result{} "Minibuffer depth is 0."
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
210 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 ---------- Echo Area ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 Minibuffer depth is 0.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215 ---------- Echo Area ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 @defvar cursor-in-echo-area
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221 This variable controls where the cursor appears when a message is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 displayed in the echo area. If it is non-@code{nil}, then the cursor
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 appears at the end of the message. Otherwise, the cursor appears at
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 point---not in the echo area at all.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226 The value is normally @code{nil}; Lisp programs bind it to @code{t}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227 for brief periods of time.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230 @node Selective Display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 @section Selective Display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 @cindex selective display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 @dfn{Selective display} is a class of minor modes in which specially
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 marked lines do not appear on the screen, or in which highly indented
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 lines do not appear.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 The first variant, explicit selective display, is designed for use in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 a Lisp program. The program controls which lines are hidden by altering
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240 the text. Outline mode uses this variant. In the second variant, the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 choice of lines to hide is made automatically based on indentation.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 This variant is designed as a user-level feature.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 The way you control explicit selective display is by replacing a
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
245 newline (control-j) with a carriage return (control-m). The text that
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 was formerly a line following that newline is now invisible. Strictly
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 speaking, it is temporarily no longer a line at all, since only newlines
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 can separate lines; it is now part of the previous line.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
250 Selective display does not directly affect editing commands. For
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 example, @kbd{C-f} (@code{forward-char}) moves point unhesitatingly into
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252 invisible text. However, the replacement of newline characters with
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253 carriage return characters affects some editing commands. For example,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 @code{next-line} skips invisible lines, since it searches only for
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 newlines. Modes that use selective display can also define commands
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256 that take account of the newlines, or that make parts of the text
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257 visible or invisible.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 When you write a selectively displayed buffer into a file, all the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 control-m's are output as newlines. This means that when you next read
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
261 in the file, it looks OK, with nothing invisible. The selective display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 effect is seen only within Emacs.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 @defvar selective-display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265 This buffer-local variable enables selective display. This means that
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 lines, or portions of lines, may be made invisible.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 @itemize @bullet
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 If the value of @code{selective-display} is @code{t}, then any portion
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 of a line that follows a control-m is not displayed.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 If the value of @code{selective-display} is a positive integer, then
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 lines that start with more than that many columns of indentation are not
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 displayed.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 @end itemize
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 When some portion of a buffer is invisible, the vertical movement
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 commands operate as if that portion did not exist, allowing a single
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281 @code{next-line} command to skip any number of invisible lines.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 However, character movement commands (such as @code{forward-char}) do
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 not skip the invisible portion, and it is possible (if tricky) to insert
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 or delete text in an invisible portion.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 In the examples below, we show the @emph{display appearance} of the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287 buffer @code{foo}, which changes with the value of
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 @code{selective-display}. The @emph{contents} of the buffer do not
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 change.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 (setq selective-display nil)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 @result{} nil
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297 1 on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
298 2on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 3n this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300 3n this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301 2on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302 1 on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
306 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307 (setq selective-display 2)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 @result{} 2
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 1 on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 2on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 2on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 1 on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
315 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
317 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
318 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320 @defvar selective-display-ellipses
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321 If this buffer-local variable is non-@code{nil}, then Emacs displays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 @samp{@dots{}} at the end of a line that is followed by invisible text.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323 This example is a continuation of the previous one.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
325 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 (setq selective-display-ellipses t)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328 @result{} t
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
329
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331 1 on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332 2on this column ...
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
333 2on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
334 1 on this column
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
335 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
336 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
338
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
339 You can use a display table to substitute other text for the ellipsis
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340 (@samp{@dots{}}). @xref{Display Tables}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
341 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343 @node Overlay Arrow
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
344 @section The Overlay Arrow
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
345 @cindex overlay arrow
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 The @dfn{overlay arrow} is useful for directing the user's attention
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348 to a particular line in a buffer. For example, in the modes used for
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349 interface to debuggers, the overlay arrow indicates the line of code
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350 about to be executed.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 @defvar overlay-arrow-string
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
353 This variable holds the string to display to call attention to a
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
354 particular line, or @code{nil} if the arrow feature is not in use.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
355 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
356
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357 @defvar overlay-arrow-position
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
358 This variable holds a marker that indicates where to display the overlay
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
359 arrow. It should point at the beginning of a line. The arrow text
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
360 appears at the beginning of that line, overlaying any text that would
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
361 otherwise appear. Since the arrow is usually short, and the line
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
362 usually begins with indentation, normally nothing significant is
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
363 overwritten.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
365 The overlay string is displayed only in the buffer that this marker
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
366 points into. Thus, only one buffer can have an overlay arrow at any
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367 given time.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 @c !!! overlay-arrow-position: but the overlay string may remain in the display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
369 @c of some other buffer until an update is required. This should be fixed
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 @c now. Is it?
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
372
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373 @node Temporary Displays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 @section Temporary Displays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
376 Temporary displays are used by commands to put output into a buffer
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
377 and then present it to the user for perusal rather than for editing.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
378 Many of the help commands use this feature.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
379
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
380 @defspec with-output-to-temp-buffer buffer-name forms@dots{}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
381 This function executes @var{forms} while arranging to insert any
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
382 output they print into the buffer named @var{buffer-name}. The buffer
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
383 is then shown in some window for viewing, displayed but not selected.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
384
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
385 The string @var{buffer-name} specifies the temporary buffer, which
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
386 need not already exist. The argument must be a string, not a buffer.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
387 The buffer is erased initially (with no questions asked), and it is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
388 marked as unmodified after @code{with-output-to-temp-buffer} exits.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
389
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
390 @code{with-output-to-temp-buffer} binds @code{standard-output} to the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
391 temporary buffer, then it evaluates the forms in @var{forms}. Output
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
392 using the Lisp output functions within @var{forms} goes by default to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
393 that buffer (but screen display and messages in the echo area, although
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
394 they are ``output'' in the general sense of the word, are not affected).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
395 @xref{Output Functions}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
396
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
397 The value of the last form in @var{forms} is returned.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
398
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
399 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
400 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
401 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
402 This is the contents of foo.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
403 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
404 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
406 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
407 (with-output-to-temp-buffer "foo"
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
408 (print 20)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
409 (print standard-output))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
410 @result{} #<buffer foo>
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
411
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
412 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
413 20
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
414
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
415 #<buffer foo>
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
416
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
417 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
418 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
419 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
420 @end defspec
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
421
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
422 @defvar temp-buffer-show-function
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
423 If this variable is non-@code{nil}, @code{with-output-to-temp-buffer}
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
424 calls it as a function to do the job of displaying a help buffer. The
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
425 function gets one argument, which is the buffer it should display.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
426
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
427 In Emacs versions 18 and earlier, this variable was called
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
428 @code{temp-buffer-show-hook}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
429 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
430
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
431 @defun momentary-string-display string position &optional char message
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
432 This function momentarily displays @var{string} in the current buffer at
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
433 @var{position}. It has no effect on the undo list or on the buffer's
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
434 modification status.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
435
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
436 The momentary display remains until the next input event. If the next
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
437 input event is @var{char}, @code{momentary-string-display} ignores it
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
438 and returns. Otherwise, that event remains buffered for subsequent use
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
439 as input. Thus, typing @var{char} will simply remove the string from
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
440 the display, while typing (say) @kbd{C-f} will remove the string from
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
441 the display and later (presumably) move point forward. The argument
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
442 @var{char} is a space by default.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
443
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
444 The return value of @code{momentary-string-display} is not meaningful.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
445
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
446 If @var{message} is non-@code{nil}, it is displayed in the echo area
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
447 while @var{string} is displayed in the buffer. If it is @code{nil}, a
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
448 default message says to type @var{char} to continue.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
449
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
450 In this example, point is initially located at the beginning of the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
451 second line:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
452
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
453 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
454 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
455 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
456 This is the contents of foo.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
457 @point{}Second line.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
458 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
459 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
460
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
461 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
462 (momentary-string-display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
463 "**** Important Message! ****"
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
464 (point) ?\r
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
465 "Type RET when done reading")
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
466 @result{} t
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
467 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
468
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
469 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
470 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471 This is the contents of foo.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
472 **** Important Message! ****Second line.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
473 ---------- Buffer: foo ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
475 ---------- Echo Area ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
476 Type RET when done reading
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
477 ---------- Echo Area ----------
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
478 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
479 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
480 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
481
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
482 @node Overlays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
483 @section Overlays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
484 @cindex overlays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
485
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
486 You can use @dfn{overlays} to alter the appearance of a buffer's text on
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
487 the screen. An overlay is an object that belongs to a particular
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
488 buffer, and has a specified beginning and end. It also has properties
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
489 that you can examine and set; these affect the display of the text
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
490 within the overlay.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
491
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
492 @menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493 * Overlay Properties:: How to read and set properties.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
494 What properties do to the screen display.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
495 * Managing Overlays:: Creating, moving, finding overlays.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
496 @end menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
497
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
498 @node Overlay Properties
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
499 @subsection Overlay Properties
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
500
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
501 Overlay properties are like text properties in some respects, but the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
502 differences are more important than the similarities. Text properties
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
503 are considered a part of the text; overlays are specifically considered
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
504 not to be part of the text. Thus, copying text between various buffers
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
505 and strings preserves text properties, but does not try to preserve
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
506 overlays. Changing a buffer's text properties marks the buffer as
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
507 modified, while moving an overlay or changing its properties does not.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
508 Unlike text propery changes, overlay changes are not recorded in the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509 buffer's undo list.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
511 @table @code
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
512 @item priority
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513 @kindex priority @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
514 This property's value (which should be a nonnegative number) determines
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
515 the priority of the overlay. The priority matters when two or more
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
516 overlays cover the same character and both specify a face for display;
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
517 the one whose @code{priority} value is larger takes priority over the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
518 other, and its face attributes override the face attributes of the lower
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
519 priority overlay.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
520
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
521 Currently, all overlays take priority over text properties. Please
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
522 avoid using negative priority values, as we have not yet decided just
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
523 what they should mean.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
524
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
525 @item window
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
526 @kindex window @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
527 If the @code{window} property is non-@code{nil}, then the overlay
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
528 applies only on that window.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
529
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
530 @item face
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
531 @kindex face @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
532 This property controls the font and color of text. @xref{Faces}, for
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
533 more information. This feature is temporary; in the future, we may
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
534 replace it with other ways of specifying how to display text.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
535
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
536 @item mouse-face
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
537 @kindex mouse-face @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
538 This property is used instead of @code{face} when the mouse is within
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
539 the range of the overlay. This feature may be temporary, like
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
540 @code{face}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
541
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
542 @item modification-hooks
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
543 @kindex modification-hooks @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
544 This property's value is a list of functions to be called if any
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
545 character within the overlay is changed or if text is inserted strictly
7086
075343a6b32b *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6598
diff changeset
546 within the overlay. Each function receives three arguments: the
075343a6b32b *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6598
diff changeset
547 overlay, and the beginning and end of the part of the buffer being
075343a6b32b *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6598
diff changeset
548 modified.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
549
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
550 @item insert-in-front-hooks
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
551 @kindex insert-in-front-hooks @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
552 This property's value is a list of functions to be called
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
553 if text is inserted right at the beginning of the overlay.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
554
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
555 @item insert-behind-hooks
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
556 @kindex insert-behind-hooks @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
557 This property's value is a list of functions to be called if text is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
558 inserted right at the end of the overlay.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
559
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
560 @item invisible
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
561 @kindex invisible @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
562 A non-@code{nil} @code{invisible} property means that the text in the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
563 overlay does not appear on the screen. This works much like selective
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
564 display. Details of this feature are likely to change in future
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
565 versions, so check the @file{etc/NEWS} file in the version you are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
566 using.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
568 @item before-string
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
569 @kindex before-string @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
570 This property's value is a string to add to the display at the beginning
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
571 of the overlay. The string does not appear in the buffer in any
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
572 sense---only on the screen. This is not yet implemented, but will be.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
573
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
574 @item after-string
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
575 @kindex after-string @r{(overlay property)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
576 This property's value is a string to add to the display at the end of
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
577 the overlay. The string does not appear in the buffer in any
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
578 sense---only on the screen. This is not yet implemented, but will be.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
579 @end table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
580
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
581 These are the functions for reading and writing the properties of an
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
582 overlay.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
583
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
584 @defun overlay-get overlay prop
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
585 This function returns the value of property @var{prop} recorded in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
586 @var{overlay}. If @var{overlay} does not record any value for that
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
587 property, then the value is @code{nil}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
588 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
589
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
590 @defun overlay-put overlay prop value
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591 This function sets the value of property @var{prop} recorded in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
592 @var{overlay} to @var{value}. It returns @var{value}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
593 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
595 See also the function @code{get-char-property} which checks both
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
596 overlay properties and text properties for a given character.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
597 @xref{Examining Properties}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
599 @node Managing Overlays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
600 @subsection Managing Overlays
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
601
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
602 This section describes the functions to create, delete and move
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
603 overlays, and to examine their contents.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
604
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
605 @defun make-overlay start end &optional buffer
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
606 This function creates and returns an overlay that belongs to
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
607 @var{buffer} and ranges from @var{start} to @var{end}. Both @var{start}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
608 and @var{end} must specify buffer positions; they may be integers or
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
609 markers. If @var{buffer} is omitted, the overlay is created in the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
610 current buffer.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
611 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
612
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
613 @defun overlay-start overlay
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
614 This function returns the position at which @var{overlay} starts.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
615 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
616
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
617 @defun overlay-end overlay
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
618 This function returns the position at which @var{overlay} ends.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
619 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
620
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
621 @defun overlay-buffer overlay
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
622 This function returns the buffer that @var{overlay} belongs to.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
624
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
625 @defun delete-overlay overlay
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
626 This function deletes @var{overlay}. The overlay continues to exist as
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
627 a Lisp object, but ceases to be part of the buffer it belonged to, and
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
628 ceases to have any effect on display.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
629 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
630
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
631 @defun move-overlay overlay start end &optional buffer
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
632 This function moves @var{overlay} to @var{buffer}, and places its bounds
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
633 at @var{start} and @var{end}. Both arguments @var{start} and @var{end}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
634 must specify buffer positions; they may be integers or markers. If
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635 @var{buffer} is omitted, the overlay stays in the same buffer.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
636
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637 The return value is @var{overlay}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
638
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
639 This is the only valid way to change the endpoints of an overlay. Do
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
640 not try modifying the markers in the overlay by hand, as that fails to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641 update other vital data structures and can cause some overlays to be
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
642 ``lost''.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
643 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
644
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
645 @defun overlays-at pos
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
646 This function returns a list of all the overlays that contain position
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
647 @var{pos} in the current buffer. The list is in no particular order.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
648 An overlay contains position @var{pos} if it begins at or before
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
649 @var{pos}, and ends after @var{pos}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
650 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
651
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
652 @defun next-overlay-change pos
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
653 This function returns the buffer position of the next beginning or end
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
654 of an overlay, after @var{pos}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
655 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
656
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
657 @node Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
658 @section Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
659 @cindex face
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
660
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
661 A @dfn{face} is a named collection of graphical attributes: font,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
662 foreground color, background color and optional underlining. Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
663 control the display of text on the screen.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
664
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
665 @cindex face id
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
666 Each face has its own @dfn{face id number} which distinguishes faces at
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
667 low levels within Emacs. However, for most purposes, you can refer to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
668 faces in Lisp programs by their names.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
669
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
670 Each face name is meaningful for all frames, and by default it has the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
671 same meaning in all frames. But you can arrange to give a particular
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
672 face name a special meaning in one frame if you wish.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
673
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
674 @menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
675 * Standard Faces:: The faces Emacs normally comes with.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
676 * Merging Faces:: How Emacs decides which face to use for a character.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
677 * Face Functions:: How to define and examine faces.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
678 @end menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
679
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
680 @node Standard Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
681 @subsection Standard Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
682
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
683 This table lists all the standard faces and their uses.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
684
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
685 @table @code
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
686 @item default
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
687 @kindex default @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
688 This face is used for ordinary text.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
689
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
690 @item modeline
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
691 @kindex modeline @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
692 This face is used for mode lines and menu bars.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
693
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
694 @item region
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
695 @kindex region @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
696 This face is used for highlighting the region in Transient Mark mode.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
697
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
698 @item secondary-selection
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
699 @kindex secondary-selection @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
700 This face is used to show any secondary selection you have made.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
701
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
702 @item highlight
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
703 @kindex highlight @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
704 This face is meant to be used for highlighting for various purposes.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
705
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
706 @item underline
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
707 @kindex underline @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
708 This face underlines text.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
709
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
710 @item bold
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
711 @kindex bold @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
712 This face uses a bold font, if possible. It uses the bold variant of
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
713 the frame's font, if it has one. It's up to you to choose a default
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714 font that has a bold variant, if you want to use one.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
716 @item italic
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717 @kindex italic @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
718 This face uses the italic variant of the frame's font, if it has one.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
719
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
720 @item bold-italic
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
721 @kindex bold-italic @r{(face name)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722 This face uses the bold italic variant of the frame's font, if it has
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
723 one.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
724 @end table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
725
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
726 @node Merging Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
727 @subsection Merging Faces for Display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
728
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
729 Here are all the ways to specify which face to use for display of text:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
730
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
731 @itemize @bullet
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
732 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
733 With defaults. Each frame has a @dfn{default face}, whose id number is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
734 zero, which is used for all text that doesn't somehow specify another
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
735 face.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
736
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
737 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
738 With text properties. A character may have a @code{face} property; if so,
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
739 it is displayed with that face. @xref{Special Properties}.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
740
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
741 If the character has a @code{mouse-face} property, that is used instead
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
742 of the @code{face} property when the mouse is ``near enough'' to the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
743 character.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
744
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
745 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
746 With overlays. An overlay may have @code{face} and @code{mouse-face}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
747 properties too; they apply to all the text covered by the overlay.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750 With special glyphs. Each glyph can specify a particular face id
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
751 number. @xref{Glyphs}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
752 @end itemize
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
753
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754 If these various sources together specify more than one face for a
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
755 particular character, Emacs merges the attributes of the various faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
756 specified. The attributes of the faces of special glyphs come first;
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
757 then come attributes of faces from overlays, followed by those from text
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
758 properties, and last the default face.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
759
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
760 When multiple overlays cover one character, an overlay with higher
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
761 priority overrides those with lower priority. @xref{Overlays}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
762
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
763 If an attribute such as the font or a color is not specified in any of
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
764 the above ways, the frame's own font or color is used.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
766 @node Face Functions
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
767 @subsection Functions for Working with Faces
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
768
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
769 The attributes a face can specify include the font, the foreground
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
770 color, the background color, and underlining. The face can also leave
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
771 these unspecified by giving the value @code{nil} for them.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
772
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
773 Here are the primitives for creating and changing faces.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
774
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
775 @defun make-face name
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
776 This function defines a new face named @var{name}, initially with all
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
777 attributes @code{nil}. It does nothing if there is already a face named
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
778 @var{name}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
779 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
780
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
781 @defun face-list
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
782 This function returns a list of all defined face names.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
783 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
784
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
785 @defun copy-face old-face new-name &optional frame new-frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
786 This function defines the face @var{new-name} as a copy of the existing
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
787 face named @var{old-face}. It creates the face @var{new-name} if that
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
788 doesn't already exist.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
789
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
790 If the optional argument @var{frame} is given, this function applies
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
791 only to that frame. Otherwise it applies to each frame individually,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
792 copying attributes from @var{old-face} in each frame to @var{new-face}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
793 in the same frame.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
794
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
795 If the optional argument @var{new-frame} is given, then @code{copy-face}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
796 copies the attributes of @var{old-face} in @var{frame} to @var{new-name}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
797 in @var{new-frame}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
798 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
799
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
800 You can modify the attributes of an existing face with the following
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
801 functions. If you specify @var{frame}, they affect just that frame;
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
802 otherwise, they affect all frames as well as the defaults that apply to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
803 new frames.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
804
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
805 @defun set-face-foreground face color &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
806 @defunx set-face-background face color &optional frame
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
807 These functions set the foreground (or background, respectively) color
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
808 of face @var{face} to @var{color}. The argument @var{color} should be a
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
809 string, the name of a color.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
810 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
811
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
812 @defun set-face-font face font &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
813 This function sets the font of face @var{face}. The argument @var{font}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
814 should be a string.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
815 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
816
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
817 @defun set-face-underline-p face underline-p &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
818 This function sets the underline attribute of face @var{face}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
819 Non-@code{nil} means do underline; @code{nil} means don't.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
820 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
821
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
822 @defun invert-face face &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
823 Swap the foreground and background colors of face @var{face}. If the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
824 face doesn't specify both foreground and background, then its foreground
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
825 and background are set to the default background and foreground,
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
826 respectively.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
827 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
828
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
829 These functions examine the attributes of a face. If you don't
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
830 specify @var{frame}, they refer to the default data for new frames.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
831
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
832 @defun face-foreground face &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
833 @defunx face-background face &optional frame
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
834 These functions return the foreground color (or background color,
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
835 respectively) of face @var{face}, as a string.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
836 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
837
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
838 @defun face-font face &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
839 This function returns the name of the font of face @var{face}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
840 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
841
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
842 @defun face-underline-p face &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
843 This function returns the underline attribute of face @var{face}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
844 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
845
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 @defun face-id-number face
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
847 This function returns the face id number of face @var{face}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
848 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
849
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
850 @defun face-equal face1 face2 &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
851 This returns @code{t} if the faces @var{face1} and @var{face2} have the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
852 same attributes for display.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
853 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
854
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
855 @defun face-differs-from-default-p face &optional frame
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
856 This returns @code{t} if the face @var{face} displays differently from
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
857 the default face. A face is considered to be ``the same'' as the normal
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
858 face if each attribute is either the same as that of the default face or
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
859 @code{nil} (meaning to inherit from the default).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
860 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
861
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
862 @defvar region-face
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
863 This variable's value specifies the face id to use to display characters
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 in the region when it is active (in Transient Mark mode only). The face
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 thus specified takes precedence over all faces that come from text
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866 properties and overlays, for characters in the region. @xref{The Mark},
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
867 for more information about Transient Mark mode.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
868
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
869 Normally, the value is the id number of the face named @code{region}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
870 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
871
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
872 @node Blinking
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
873 @section Blinking Parentheses
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
874 @cindex parenthesis matching
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
875 @cindex blinking
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
876 @cindex balancing parentheses
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
877 @cindex close parenthesis
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
878
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
879 This section describes the mechanism by which Emacs shows a matching
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
880 open parenthesis when the user inserts a close parenthesis.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
881
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
882 @vindex blink-paren-hook
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 @defvar blink-paren-function
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884 The value of this variable should be a function (of no arguments) to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
885 be called whenever a character with close parenthesis syntax is inserted.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
886 The value of @code{blink-paren-function} may be @code{nil}, in which
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887 case nothing is done.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
889 @quotation
7735
7db892210924 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7086
diff changeset
890 @strong{Please note:} This variable was named @code{blink-paren-hook} in
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 older Emacs versions, but since it is not called with the standard
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892 convention for hooks, it was renamed to @code{blink-paren-function} in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
893 version 19.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
894 @end quotation
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
895 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
896
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
897 @defvar blink-matching-paren
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
898 If this variable is @code{nil}, then @code{blink-matching-open} does
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
899 nothing.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
900 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
901
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
902 @defvar blink-matching-paren-distance
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
903 This variable specifies the maximum distance to scan for a matching
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
904 parenthesis before giving up.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
905 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
906
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
907 @defun blink-matching-open
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
908 This function is the default value of @code{blink-paren-function}. It
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
909 assumes that point follows a character with close parenthesis syntax and
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
910 moves the cursor momentarily to the matching opening character. If that
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
911 character is not already on the screen, it displays the character's
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
912 context in the echo area. To avoid long delays, this function does not
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
913 search farther than @code{blink-matching-paren-distance} characters.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
914
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
915 Here is an example of calling this function explicitly.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
916
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
917 @smallexample
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
918 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
919 (defun interactive-blink-matching-open ()
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
920 @c Do not break this line! -- rms.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
921 @c The first line of a doc string
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
922 @c must stand alone.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
923 "Indicate momentarily the start of sexp before point."
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
924 (interactive)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
925 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
926 @group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
927 (let ((blink-matching-paren-distance
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
928 (buffer-size))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
929 (blink-matching-paren t))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
930 (blink-matching-open)))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
931 @end group
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
932 @end smallexample
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
933 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
934
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
935 @node Inverse Video
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
936 @section Inverse Video
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
937 @cindex Inverse Video
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
938
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
939 @defopt inverse-video
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
940 @cindex highlighting
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
941 This variable controls whether Emacs uses inverse video for all text
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
942 on the screen. Non-@code{nil} means yes, @code{nil} means no. The
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
943 default is @code{nil}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
944 @end defopt
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
945
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
946 @defopt mode-line-inverse-video
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
947 This variable controls the use of inverse video for mode lines. If it
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
948 is non-@code{nil}, then mode lines are displayed in inverse video (under
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
949 X, this uses the face named @code{modeline}, which you can set as you
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 wish). Otherwise, mode lines are displayed normally, just like text.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
951 The default is @code{t}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
952 @end defopt
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
953
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
954 @node Usual Display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
955 @section Usual Display Conventions
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
956
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
957 The usual display conventions define how to display each character
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
958 code. You can override these conventions by setting up a display table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
959 (@pxref{Display Tables}). Here are the usual display conventions:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
960
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
961 @itemize @bullet
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
962 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
963 Character codes 32 through 126 map to glyph codes 32 through 126.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
964 Normally this means they display as themselves.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
965
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
966 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
967 Character code 9 is a horizontal tab. It displays as whitespace
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
968 up to a position determined by @code{tab-width}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
969
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
970 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
971 Character code 10 is a newline.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
972
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
973 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
974 All other codes in the range 0 through 31, and code 127, display in one
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
975 of two ways according to the value of @code{ctl-arrow}. If it is
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
976 non-@code{nil}, these codes map to sequences of two glyphs, where the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
977 first glyph is the @sc{ASCII} code for @samp{^}. (A display table can
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
978 specify a glyph to use instead of @samp{^}.) Otherwise, these codes map
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
979 just like the codes in the range 128 to 255.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
980
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
981 @item
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
982 Character codes 128 through 255 map to sequences of four glyphs, where
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
983 the first glyph is the @sc{ASCII} code for @samp{\}, and the others are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
984 digit characters representing the code in octal. (A display table can
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
985 specify a glyph to use instead of @samp{\}.)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
986 @end itemize
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
987
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
988 The usual display conventions apply even when there is a display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
989 table, for any character whose entry in the active display table is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
990 @code{nil}. Thus, when you set up a display table, you need only
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
991 specify the the characters for which you want unusual behavior.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
992
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
993 These variables affect the way certain characters are displayed on the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
994 screen. Since they change the number of columns the characters occupy,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
995 they also affect the indentation functions.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
996
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
997 @defopt ctl-arrow
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
998 @cindex control characters in display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
999 This buffer-local variable controls how control characters are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1000 displayed. If it is non-@code{nil}, they are displayed as a caret
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1001 followed by the character: @samp{^A}. If it is @code{nil}, they are
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1002 displayed as a backslash followed by three octal digits: @samp{\001}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1003 @end defopt
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1004
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1005 @c Following may have overfull hbox.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1006 @defvar default-ctl-arrow
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1007 The value of this variable is the default value for @code{ctl-arrow} in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1008 buffers that do not override it. @xref{Default Value}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1009 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1010
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1011 @defopt tab-width
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1012 The value of this variable is the spacing between tab stops used for
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1013 displaying tab characters in Emacs buffers. The default is 8. Note
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1014 that this feature is completely independent from the user-settable tab
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1015 stops used by the command @code{tab-to-tab-stop}. @xref{Indent Tabs}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1016 @end defopt
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1017
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1018 @node Display Tables
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1019 @section Display Tables
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1020
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1021 @cindex display table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1022 You can use the @dfn{display table} feature to control how all 256
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1023 possible character codes display on the screen. This is useful for
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1024 displaying European languages that have letters not in the @sc{ASCII}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1025 character set.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1026
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1027 The display table maps each character code into a sequence of
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1028 @dfn{glyphs}, each glyph being an image that takes up one character
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1029 position on the screen. You can also define how to display each glyph
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1030 on your terminal, using the @dfn{glyph table}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1031
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1032 @menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1033 * Display Table Format:: What a display table consists of.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1034 * Active Display Table:: How Emacs selects a display table to use.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1035 * Glyphs:: How to define a glyph, and what glyphs mean.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1036 * ISO Latin 1:: How to use display tables
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1037 to support the ISO Latin 1 character set.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1038 @end menu
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1039
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1040 @node Display Table Format
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1041 @subsection Display Table Format
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1042
8925
b05788fd41f0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 8096
diff changeset
1043 A display table is actually an array of 262 elements.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1044
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1045 @defun make-display-table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1046 This creates and returns a display table. The table initially has
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1047 @code{nil} in all elements.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1048 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1049
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1050 The first 256 elements correspond to character codes; the @var{n}th
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1051 element says how to display the character code @var{n}. The value
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1052 should be @code{nil} or a vector of glyph values (@pxref{Glyphs}). If
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1053 an element is @code{nil}, it says to display that character according to
8096
355f353f7c74 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7735
diff changeset
1054 the usual display conventions (@pxref{Usual Display}). Note that the
355f353f7c74 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7735
diff changeset
1055 display table has no effect on the tab and newline characters; they are
355f353f7c74 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 7735
diff changeset
1056 always displayed as whitespace in their usual special fashion.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1057
8925
b05788fd41f0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 8096
diff changeset
1058 The remaining six elements of a display table serve special purposes,
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1059 and @code{nil} means use the default stated below.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1060
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1061 @table @asis
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1062 @item 256
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1063 The glyph for the end of a truncated screen line (the default for this
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1064 is @samp{$}). @xref{Glyphs}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1065 @item 257
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1066 The glyph for the end of a continued line (the default is @samp{\}).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1067 @item 258
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1068 The glyph for indicating a character displayed as an octal character
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1069 code (the default is @samp{\}).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1070 @item 259
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1071 The glyph for indicating a control character (the default is @samp{^}).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1072 @item 260
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1073 A vector of glyphs for indicating the presence of invisible lines (the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1074 default is @samp{...}). @xref{Selective Display}.
8925
b05788fd41f0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 8096
diff changeset
1075 @item 261
b05788fd41f0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 8096
diff changeset
1076 The glyph used to draw the border between side-by-side windows (the
b05788fd41f0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 8096
diff changeset
1077 default is @samp{|}). @xref{Splitting Windows}.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1078 @end table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1079
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1080 For example, here is how to construct a display table that mimics the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1081 effect of setting @code{ctl-arrow} to a non-@code{nil} value:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1082
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1083 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1084 (setq disptab (make-display-table))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1085 (let ((i 0))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1086 (while (< i 32)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1087 (or (= i ?\t) (= i ?\n)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1088 (aset disptab i (vector ?^ (+ i 64))))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1089 (setq i (1+ i)))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1090 (aset disptab 127 (vector ?^ ??)))
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1091 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1092
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1093 @node Active Display Table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1094 @subsection Active Display Table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1095 @cindex active display table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1096
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1097 Each window can specify a display table, and so can each buffer. When
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1098 a buffer @var{b} is displayed in window @var{w}, display uses the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1099 display table for window @var{w} if it has one; otherwise, the display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1100 table for buffer @var{b} if it has one; otherwise, the standard display
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1101 table if any. The display table chosen is called the @dfn{active}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1102 display table.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1103
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1104 @defun window-display-table window
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1105 This function returns @var{window}'s display table, or @code{nil}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1106 if @var{window} does not have an assigned display table.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1107 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1108
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1109 @defun set-window-display-table window table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1110 This function sets the display table of @var{window} to @var{table}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1111 The argument @var{table} should be either a display table or
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1112 @code{nil}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1113 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1114
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1115 @defvar buffer-display-table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1116 This variable is automatically local in all buffers; its value in a
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1117 particular buffer is the display table for that buffer, or @code{nil} if
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1118 the buffer does not have an assigned display table.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1119 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1120
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1121 @defvar standard-display-table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1122 This variable's value is the default display table, used whenever a
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1123 window has no display table and neither does the buffer displayed in
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1124 that window. This variable is @code{nil} by default.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1125 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1126
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1127 If there is no display table to use for a particular window---that is,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1128 if the window has none, its buffer has none, and
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1129 @code{standard-display-table} has none---then Emacs uses the usual
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1130 display conventions for all character codes in that window. @xref{Usual
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1131 Display}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1132
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1133 @node Glyphs
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1134 @subsection Glyphs
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1135
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1136 @cindex glyph
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1137 A @dfn{glyph} is a generalization of a character; it stands for an
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1138 image that takes up a single character position on the screen. Glyphs
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1139 are represented in Lisp as integers, just as characters are.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1140
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1141 @cindex glyph table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1142 The meaning of each integer, as a glyph, is defined by the glyph
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1143 table, which is the value of the variable @code{glyph-table}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1144
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1145 @defvar glyph-table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1146 The value of this variable is the current glyph table. It should be a
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1147 vector; the @var{g}th element defines glyph code @var{g}. If the value
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1148 is @code{nil} instead of a vector, then all glyphs are simple (see
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1149 below).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1150 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1151
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1152 Here are the possible types of elements in the glyph table:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1153
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1154 @table @var
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1155 @item string
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1156 Send the characters in @var{string} to the terminal to output
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1157 this glyph. This alternative is available on character terminals,
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1158 but not under X.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1159
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1160 @item integer
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1161 Define this glyph code as an alias for code @var{integer}. You can use
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1162 an alias to specify a face code for the glyph; see below.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1163
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1164 @item @code{nil}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1165 This glyph is simple. On an ordinary terminal, the glyph code mod 256
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1166 is the character to output. With X, the glyph code mod 256 is the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1167 character to output, and the glyph code divided by 256 specifies the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1168 @dfn{face id number} to use while outputting it. @xref{Faces}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1169 @end table
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1170
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1171 If a glyph code is greater than or equal to the length of the glyph
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1172 table, that code is automatically simple.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1173
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1174 @node ISO Latin 1
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1175 @subsection ISO Latin 1
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1176
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1177 If you have a terminal that can handle the entire ISO Latin 1 character
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1178 set, you can arrange to use that character set as follows:
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1179
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1180 @example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1181 (require 'disp-table)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1182 ;; @r{Set char codes 160--255 to display as themselves.}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1183 ;; @r{(Codes 128--159 are the additional control characters.)}
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1184 (standard-display-8bit 160 255)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1185 @end example
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1186
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1187 If you are editing buffers written in the ISO Latin 1 character set and
9009
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
1188 your terminal doesn't handle anything but @sc{ASCII}, you can load the
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
1189 file @file{iso-ascii} to set up a display table that displays the other
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
1190 ISO characters as explanatory sequences of @sc{ASCII} characters. For
7cdfcd5e71ff entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 8925
diff changeset
1191 example, the character ``o with umlaut'' displays as @samp{@{"o@}}.
6598
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1192
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1193 Some European countries have terminals that don't support ISO Latin 1
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1194 but do support the special characters for that country's language. You
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1195 can define a display table to work one language using such terminals.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1196 For an example, see @file{lisp/iso-swed.el}, which handles certain
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1197 Swedish terminals.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1198
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1199 You can load the appropriate display table for your terminal
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1200 automatically by writing a terminal-specific Lisp file for the terminal
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1201 type.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1202
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1203 @node Beeping
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1204 @section Beeping
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1205 @cindex beeping
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1206 @cindex bell
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1207
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1208 You can make Emacs ring a bell (or blink the screen) to attract the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1209 user's attention. Be conservative about how often you do this; frequent
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1210 bells can become irritating. Also be careful not to use beeping alone
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1211 when signaling an error is appropriate. (@xref{Errors}.)
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1212
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1213 @defun ding &optional dont-terminate
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1214 @cindex keyboard macro termination
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1215 This function beeps, or flashes the screen (see @code{visible-bell} below).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1216 It also terminates any keyboard macro currently executing unless
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1217 @var{dont-terminate} is non-@code{nil}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1218 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1219
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1220 @defun beep &optional dont-terminate
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1221 This is a synonym for @code{ding}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1222 @end defun
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1223
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1224 @defvar visible-bell
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1225 This variable determines whether Emacs should flash the screen to
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1226 represent a bell. Non-@code{nil} means yes, @code{nil} means no. This
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1227 is effective only if the Termcap entry for the terminal in use has the
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1228 visible bell flag (@samp{vb}) set.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1229 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1230
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1231 @node Window Systems
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1232 @section Window Systems
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1233
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1234 Emacs works with several window systems, most notably the X Window
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1235 System. Both Emacs and X use the term ``window'', but use it
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1236 differently. An Emacs frame is a single window as far as X is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1237 concerned; the individual Emacs windows are not known to X at all.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1238
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1239 @defvar window-system
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1240 @cindex X Window System
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1241 This variable tells Lisp programs what window system Emacs is running
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1242 under. Its value should be a symbol such as @code{x} (if Emacs is
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1243 running under X) or @code{nil} (if Emacs is running on an ordinary
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1244 terminal).
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1245 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1246
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1247 @defvar window-system-version
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1248 This variable distinguishes between different versions of the X Window
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1249 System. Its value is 10 or 11 when using X; @code{nil} otherwise.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1250 @end defvar
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1251
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1252 @defvar window-setup-hook
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1253 This variable is a normal hook which Emacs runs after loading your
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1254 @file{.emacs} file and the default initialization file (if any), after
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1255 loading terminal-specific Lisp code, and after running the hook
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1256 @code{term-setup-hook}.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1257
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1258 This hook is used for internal purposes: setting up communication with
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1259 the window system, and creating the initial window. Users should not
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1260 interfere with it.
db2685239be9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1261 @end defvar