aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorKenichi Handa2012-03-21 16:43:58 +0900
committerKenichi Handa2012-03-21 16:43:58 +0900
commit136220349968063bef3f249baddba30a24b52ec2 (patch)
treec9da83473ae16e2d2226523d16dfc5555d56b95c /doc
parent26090a2783518afc82bb907a28e32749542fead6 (diff)
parentfb5b8aca9928223c3fef042f1de4b50cd08fde43 (diff)
downloademacs-136220349968063bef3f249baddba30a24b52ec2.tar.gz
emacs-136220349968063bef3f249baddba30a24b52ec2.zip
merge trunk
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog26
-rw-r--r--doc/lispref/display.texi529
-rw-r--r--doc/lispref/os.texi43
3 files changed, 309 insertions, 289 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index af0cb306245..77468f562c6 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,29 @@
12012-03-21 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (The Echo Area): Add xref to Output Streams.
4 (Displaying Messages): Improve doc of message.
5 (Echo Area Customization, Invisible Text): Copyedits.
6 (Invisible Text): Mention that spec comparison is done with eq.
7 (Width): Improve doc of char-width.
8 (Faces): Recommend using symbol instead of string for face name.
9 Minor clarifications.
10 (Defining Faces): Copyedits. Update face example.
11 (Attribute Functions): Mark set-face-foreground etc as commands.
12 (Face Remapping): Mention text-scale-adjust. Clarify
13 face-remapping-alist and related docs.
14 (Face Functions): Don't document make-face or copy-face.
15
162012-03-20 Chong Yidong <cyd@gnu.org>
17
18 * display.texi (Forcing Redisplay): Various rewrites to reflect
19 new value of redisplay-dont-pause.
20 (Truncation): Copyedits.
21
222012-03-20 Glenn Morris <rgm@gnu.org>
23
24 * os.texi (Startup Summary): Don't mention initial-buffer-choice = t.
25 Add summary table of some relevant command-line options.
26
12012-03-18 Chong Yidong <cyd@gnu.org> 272012-03-18 Chong Yidong <cyd@gnu.org>
2 28
3 * internals.texi (Building Emacs, Garbage Collection): Copyedits. 29 * internals.texi (Building Emacs, Garbage Collection): Copyedits.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index c70418be52b..dbcc1d1190b 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -86,59 +86,57 @@ attempt to redisplay, in the middle of Lisp code, without actually
86waiting for input. 86waiting for input.
87 87
88@defun redisplay &optional force 88@defun redisplay &optional force
89This function tries immediately to redisplay, provided there are no 89This function tries immediately to redisplay. The optional argument
90pending input events. 90@var{force}, if non-@code{nil}, forces the redisplay to be performed,
91 91instead of being preempted, even if input is pending and the variable
92If the optional argument @var{force} is non-@code{nil}, it does all 92@code{redisplay-dont-pause} is @code{nil} (see below). If
93pending redisplay work even if input is available, with no 93@code{redisplay-dont-pause} is non-@code{nil} (the default), this
94pre-emption. 94function redisplays in any case, i.e.@: @var{force} does nothing.
95 95
96The function returns @code{t} if it actually tried to redisplay, and 96The function returns @code{t} if it actually tried to redisplay, and
97@code{nil} otherwise. A value of @code{t} does not mean that 97@code{nil} otherwise. A value of @code{t} does not mean that
98redisplay proceeded to completion; it could have been pre-empted by 98redisplay proceeded to completion; it could have been preempted by
99newly arriving terminal input. 99newly arriving input.
100@end defun
101
102 @code{redisplay} with no argument tries immediately to redisplay,
103but has no effect on the usual rules for what parts of the screen to
104redisplay. By contrast, the following function adds certain windows
105to the pending redisplay work (as if their contents had completely
106changed), but doesn't immediately try to do any redisplay work.
107
108@defun force-window-update &optional object
109This function forces some or all windows to be updated on next
110redisplay. If @var{object} is a window, it requires eventual
111redisplay of that window. If @var{object} is a buffer or buffer name,
112it requires eventual redisplay of all windows displaying that buffer.
113If @var{object} is @code{nil} (or omitted), it requires eventual
114redisplay of all windows.
115@end defun 100@end defun
116 101
117 @code{force-window-update} does not do a redisplay immediately.
118(Emacs will do that when it waits for input.) Rather, its effect is
119to put more work on the queue to be done by redisplay whenever there
120is a chance.
121
122@defvar redisplay-dont-pause 102@defvar redisplay-dont-pause
123If this variable is non-@code{nil}, pending input does not prevent or 103If this variable is @code{nil}, arriving input events preempt
124halt redisplay; redisplay occurs, and finishes, regardless of whether 104redisplay; Emacs avoids starting a redisplay, and stops any redisplay
125input is available. If it is @code{nil}, Emacs redisplay stops if 105that is in progress, until the input has been processed. In
126input arrives, and does not happen at all if input is available before 106particular, @code{(redisplay)} returns @code{nil} without actually
127it starts. The default is @code{t}. 107redisplaying, if there is pending input.
108
109The default value is @code{t}, which means that pending input does not
110preempt redisplay.
128@end defvar 111@end defvar
129 112
130@defvar redisplay-preemption-period 113@defvar redisplay-preemption-period
131This variable specifies how many seconds Emacs waits between checks 114If @code{redisplay-dont-pause} is @code{nil}, this variable specifies
132for new input during redisplay. (The default is 0.1 seconds.) If 115how many seconds Emacs waits between checks for new input during
133input has arrived when Emacs checks, it pre-empts redisplay and 116redisplay; if input arrives during this interval, redisplay stops and
134processes the available input before trying again to redisplay. 117the input is processed. The default value is 0.1; if the value is
118@code{nil}, Emacs does not check for input during redisplay.
119
120This variable has no effect when @code{redisplay-dont-pause} is
121non-@code{nil} (the default).
122@end defvar
135 123
136If this variable is @code{nil}, Emacs does not check for input during 124 Although @code{redisplay} tries immediately to redisplay, it does
137redisplay, and redisplay cannot be preempted by input. 125not change how Emacs decides which parts of its frame(s) to redisplay.
126By contrast, the following function adds certain windows to the
127pending redisplay work (as if their contents had completely changed),
128but does not immediately try to perform redisplay.
138 129
139This variable is only obeyed on graphical terminals. For 130@defun force-window-update &optional object
140text terminals, see @ref{Terminal Output}. 131This function forces some or all windows to be updated the next time
141@end defvar 132Emacs does a redisplay. If @var{object} is a window, that window is
133to be updated. If @var{object} is a buffer or buffer name, all
134windows displaying that buffer are to be updated. If @var{object} is
135@code{nil} (or omitted), all windows are to be updated.
136
137This function does not do a redisplay immediately; Emacs does that as
138it waits for input, or when the function @code{redisplay} is called.
139@end defun
142 140
143@node Truncation 141@node Truncation
144@section Truncation 142@section Truncation
@@ -169,7 +167,7 @@ If this buffer-local variable is non-@code{nil}, lines that extend
169beyond the right edge of the window are truncated; otherwise, they are 167beyond the right edge of the window are truncated; otherwise, they are
170continued. As a special exception, the variable 168continued. As a special exception, the variable
171@code{truncate-partial-width-windows} takes precedence in 169@code{truncate-partial-width-windows} takes precedence in
172@dfn{partial-width} windows (i.e., windows that do not occupy the 170@dfn{partial-width} windows (i.e.@: windows that do not occupy the
173entire frame width). 171entire frame width).
174@end defopt 172@end defopt
175 173
@@ -192,37 +190,37 @@ a window, that forces truncation.
192 190
193@defvar wrap-prefix 191@defvar wrap-prefix
194If this buffer-local variable is non-@code{nil}, it defines a 192If this buffer-local variable is non-@code{nil}, it defines a
195``prefix'' that is prepended to every continuation line at 193@dfn{wrap prefix} which Emacs displays at the start of every
196display time. (If lines are truncated, the wrap-prefix is never 194continuation line. (If lines are truncated, @code{wrap-prefix} is
197used.) It may be a string or an image (@pxref{Other Display Specs}), 195never used.) Its value may be a string or an image (@pxref{Other
198or a stretch of whitespace such as specified by the @code{:width} or 196Display Specs}), or a stretch of whitespace such as specified by the
199@code{:align-to} display properties (@pxref{Specified Space}). The 197@code{:width} or @code{:align-to} display properties (@pxref{Specified
200value is interpreted in the same way as a @code{display} text 198Space}). The value is interpreted in the same way as a @code{display}
201property. @xref{Display Property}. 199text property. @xref{Display Property}.
202 200
203A wrap-prefix may also be specified for regions of text, using the 201A wrap prefix may also be specified for regions of text, using the
204@code{wrap-prefix} text or overlay property. This takes precedence 202@code{wrap-prefix} text or overlay property. This takes precedence
205over the @code{wrap-prefix} variable. @xref{Special Properties}. 203over the @code{wrap-prefix} variable. @xref{Special Properties}.
206@end defvar 204@end defvar
207 205
208@defvar line-prefix 206@defvar line-prefix
209If this buffer-local variable is non-@code{nil}, it defines a 207If this buffer-local variable is non-@code{nil}, it defines a
210``prefix'' that is prepended to every non-continuation line at 208@dfn{line prefix} which Emacs displays at the start of every
211display time. It may be a string or an image (@pxref{Other Display 209non-continuation line. Its value may be a string or an image
212Specs}), or a stretch of whitespace such as specified by the 210(@pxref{Other Display Specs}), or a stretch of whitespace such as
213@code{:width} or @code{:align-to} display properties (@pxref{Specified 211specified by the @code{:width} or @code{:align-to} display properties
214Space}). The value is interpreted in the same way as a @code{display} 212(@pxref{Specified Space}). The value is interpreted in the same way
215text property. @xref{Display Property}. 213as a @code{display} text property. @xref{Display Property}.
216 214
217A line-prefix may also be specified for regions of text using the 215A line prefix may also be specified for regions of text using the
218@code{line-prefix} text or overlay property. This takes precedence 216@code{line-prefix} text or overlay property. This takes precedence
219over the @code{line-prefix} variable. @xref{Special Properties}. 217over the @code{line-prefix} variable. @xref{Special Properties}.
220@end defvar 218@end defvar
221 219
222 If your buffer contains @emph{very} long lines, and you use 220 If your buffer contains @emph{very} long lines, and you use
223continuation to display them, computing the continuation lines can 221continuation to display them, computing the continuation lines can
224make Emacs redisplay slow. The column computation and indentation 222make redisplay slow. The column computation and indentation functions
225functions also become slow. Then you might find it advisable to set 223also become slow. Then you might find it advisable to set
226@code{cache-long-line-scans} to @code{t}. 224@code{cache-long-line-scans} to @code{t}.
227 225
228@defvar cache-long-line-scans 226@defvar cache-long-line-scans
@@ -245,14 +243,12 @@ This variable is automatically buffer-local in every buffer.
245(@pxref{Errors}), for messages made with the @code{message} primitive, 243(@pxref{Errors}), for messages made with the @code{message} primitive,
246and for echoing keystrokes. It is not the same as the minibuffer, 244and for echoing keystrokes. It is not the same as the minibuffer,
247despite the fact that the minibuffer appears (when active) in the same 245despite the fact that the minibuffer appears (when active) in the same
248place on the screen as the echo area. The @cite{GNU Emacs Manual} 246place on the screen as the echo area. @xref{Minibuffer,, The
249specifies the rules for resolving conflicts between the echo area and 247Minibuffer, emacs, The GNU Emacs Manual}.
250the minibuffer for use of that screen space (@pxref{Minibuffer,, The
251Minibuffer, emacs, The GNU Emacs Manual}).
252 248
253 You can write output in the echo area by using the Lisp printing 249 Apart from the functions documented in this section, you can print
254functions with @code{t} as the stream (@pxref{Output Functions}), or 250Lisp objects to the echo area by specifying @code{t} as the output
255explicitly. 251stream. @xref{Output Streams}.
256 252
257@menu 253@menu
258* Displaying Messages:: Explicitly displaying text in the echo area. 254* Displaying Messages:: Explicitly displaying text in the echo area.
@@ -265,27 +261,26 @@ explicitly.
265@subsection Displaying Messages in the Echo Area 261@subsection Displaying Messages in the Echo Area
266@cindex display message in echo area 262@cindex display message in echo area
267 263
268 This section describes the functions for explicitly producing echo 264 This section describes the standard functions for displaying
269area messages. Many other Emacs features display messages there, too. 265messages in the echo area.
270 266
271@defun message format-string &rest arguments 267@defun message format-string &rest arguments
272This function displays a message in the echo area. The argument 268This function displays a message in the echo area.
273@var{format-string} is similar to a C language @code{printf} format 269@var{format-string} is a format string, and @var{arguments} are the
274string. See @code{format} in @ref{Formatting Strings}, for the details 270objects for its format specifications, like in the @code{format}
275on the conversion specifications. @code{message} returns the 271function (@pxref{Formatting Strings}). The resulting formatted string
276constructed string. 272is displayed in the echo area; if it contains @code{face} text
277 273properties, it is displayed with the specified faces (@pxref{Faces}).
278In batch mode, @code{message} prints the message text on the standard 274The string is also added to the @samp{*Messages*} buffer, but without
279error stream, followed by a newline. 275text properties (@pxref{Logging Messages}).
276
277In batch mode, the message is printed to the standard error stream,
278followed by a newline.
280 279
281If @var{format-string}, or strings among the @var{arguments}, have
282@code{face} text properties, these affect the way the message is displayed.
283
284@c Emacs 19 feature
285If @var{format-string} is @code{nil} or the empty string, 280If @var{format-string} is @code{nil} or the empty string,
286@code{message} clears the echo area; if the echo area has been 281@code{message} clears the echo area; if the echo area has been
287expanded automatically, this brings it back to its normal size. 282expanded automatically, this brings it back to its normal size. If
288If the minibuffer is active, this brings the minibuffer contents back 283the minibuffer is active, this brings the minibuffer contents back
289onto the screen immediately. 284onto the screen immediately.
290 285
291@example 286@example
@@ -561,13 +556,13 @@ If the value is zero, then command input is not echoed.
561Normally, displaying a long message resizes the echo area to display 556Normally, displaying a long message resizes the echo area to display
562the entire message. But if the variable @code{message-truncate-lines} 557the entire message. But if the variable @code{message-truncate-lines}
563is non-@code{nil}, the echo area does not resize, and the message is 558is non-@code{nil}, the echo area does not resize, and the message is
564truncated to fit it, as in Emacs 20 and before. 559truncated to fit it.
565@end defvar 560@end defvar
566 561
567 The variable @code{max-mini-window-height}, which specifies the 562 The variable @code{max-mini-window-height}, which specifies the
568maximum height for resizing minibuffer windows, also applies to the 563maximum height for resizing minibuffer windows, also applies to the
569echo area (which is really a special use of the minibuffer window. 564echo area (which is really a special use of the minibuffer window;
570@xref{Minibuffer Misc}.). 565@pxref{Minibuffer Misc}).
571 566
572@node Warnings 567@node Warnings
573@section Reporting Warnings 568@section Reporting Warnings
@@ -764,10 +759,11 @@ that warning is not logged.
764@cindex invisible text 759@cindex invisible text
765You can make characters @dfn{invisible}, so that they do not appear on 760You can make characters @dfn{invisible}, so that they do not appear on
766the screen, with the @code{invisible} property. This can be either a 761the screen, with the @code{invisible} property. This can be either a
767text property (@pxref{Text Properties}) or a property of an overlay 762text property (@pxref{Text Properties}) or an overlay property
768(@pxref{Overlays}). Cursor motion also partly ignores these 763(@pxref{Overlays}). Cursor motion also partly ignores these
769characters; if the command loop finds point within them, it moves 764characters; if the command loop finds that point is inside a range of
770point to the other side of them. 765invisible text after a command, it relocates point to the other side
766of the text.
771 767
772In the simplest case, any non-@code{nil} @code{invisible} property makes 768In the simplest case, any non-@code{nil} @code{invisible} property makes
773a character invisible. This is the default case---if you don't alter 769a character invisible. This is the default case---if you don't alter
@@ -807,13 +803,15 @@ the character is invisible. The list can have two kinds of elements:
807 803
808@table @code 804@table @code
809@item @var{atom} 805@item @var{atom}
810A character is invisible if its @code{invisible} property value 806A character is invisible if its @code{invisible} property value is
811is @var{atom} or if it is a list with @var{atom} as a member. 807@var{atom} or if it is a list with @var{atom} as a member; comparison
808is done with @code{eq}.
812 809
813@item (@var{atom} . t) 810@item (@var{atom} . t)
814A character is invisible if its @code{invisible} property value is 811A character is invisible if its @code{invisible} property value is
815@var{atom} or if it is a list with @var{atom} as a member. Moreover, 812@var{atom} or if it is a list with @var{atom} as a member; comparison
816a sequence of such characters displays as an ellipsis. 813is done with @code{eq}. Moreover, a sequence of such characters
814displays as an ellipsis.
817@end table 815@end table
818@end table 816@end table
819@end defvar 817@end defvar
@@ -848,7 +846,7 @@ major mode should use the mode's own name as an element of
848(overlay-put (make-overlay beginning end) 846(overlay-put (make-overlay beginning end)
849 'invisible 'my-symbol) 847 'invisible 'my-symbol)
850 848
851;; @r{When done with the overlays:} 849;; @r{When done with the invisibility:}
852(remove-from-invisibility-spec '(my-symbol . t)) 850(remove-from-invisibility-spec '(my-symbol . t))
853;; @r{Or respectively:} 851;; @r{Or respectively:}
854(remove-from-invisibility-spec 'my-symbol) 852(remove-from-invisibility-spec 'my-symbol)
@@ -874,15 +872,16 @@ ignore invisible newlines if @code{line-move-ignore-invisible} is
874non-@code{nil} (the default), but only because they are explicitly 872non-@code{nil} (the default), but only because they are explicitly
875programmed to do so. 873programmed to do so.
876 874
877 However, if a command ends with point inside or at the boundary of invisible 875 However, if a command ends with point inside or at the boundary of
878text, the main editing loop moves point to one of the two ends of the invisible 876invisible text, the main editing loop relocates point to one of the
879text. Which end to move to is chosen based on the following factors: make sure 877two ends of the invisible text. Emacs chooses the direction of
880that the overall movement of the command is still in the same direction, and 878relocation so that it is the same as the overall movement direction of
881prefer a position where an inserted char would not inherit the @code{invisible} 879the command; if in doubt, it prefers a position where an inserted char
882property. Additionally, if the text is not replaced by an ellipsis and the 880would not inherit the @code{invisible} property. Additionally, if the
883command only moved within the invisible text, then point is moved one extra 881text is not replaced by an ellipsis and the command only moved within
884character so as to try and reflect the command's movement by a visible movement 882the invisible text, then point is moved one extra character so as to
885of the cursor. 883try and reflect the command's movement by a visible movement of the
884cursor.
886 885
887 Thus, if the command moved point back to an invisible range (with the usual 886 Thus, if the command moved point back to an invisible range (with the usual
888stickiness), Emacs moves point back to the beginning of that range. If the 887stickiness), Emacs moves point back to the beginning of that range. If the
@@ -1668,8 +1667,11 @@ check the width of a character. @xref{Primitive Indent}, and
1668@ref{Screen Lines}, for related functions. 1667@ref{Screen Lines}, for related functions.
1669 1668
1670@defun char-width char 1669@defun char-width char
1671This function returns the width in columns of the character @var{char}, 1670This function returns the width in columns of the character
1672if it were displayed in the current buffer and the selected window. 1671@var{char}, if it were displayed in the current buffer (i.e.@: taking
1672into account the buffer's display table, if any; @pxref{Display
1673Tables}). The width of a tab character is usually @code{tab-width}
1674(@pxref{Usual Display}).
1673@end defun 1675@end defun
1674 1676
1675@defun string-width string 1677@defun string-width string
@@ -1815,26 +1817,27 @@ height.
1815@section Faces 1817@section Faces
1816@cindex faces 1818@cindex faces
1817 1819
1818 A @dfn{face} is a collection of graphical attributes for displaying 1820 A @dfn{face} is a collection of graphical @dfn{attributes} for
1819text: font, foreground color, background color, optional underlining, 1821displaying text: font, foreground color, background color, optional
1820and so on. Faces control how buffer text is displayed, and how some 1822underlining, and so on. Faces control how Emacs displays text in
1821parts of the frame, such as the mode-line, are displayed. 1823buffers, as well as other parts of the frame such as the mode line.
1822@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of 1824@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of
1823faces Emacs normally comes with. 1825faces Emacs normally comes with.
1824 1826
1825@cindex face id 1827@cindex face id
1826 For most purposes, you refer to a face in Lisp programs using its 1828 For most purposes, you refer to a face in Lisp programs using its
1827@dfn{face name}. This is either a string or (equivalently) a Lisp 1829@dfn{face name}, which is usually a Lisp symbol. For backward
1828symbol whose name is equal to that string. 1830compatibility, a face name can also be a string, which is equivalent
1831to a Lisp symbol of the same name.
1829 1832
1830@defun facep object 1833@defun facep object
1831This function returns a non-@code{nil} value if @var{object} is a Lisp 1834This function returns a non-@code{nil} value if @var{object} is a Lisp
1832symbol or string that names a face. Otherwise, it returns @code{nil}. 1835symbol or string that names a face. Otherwise, it returns @code{nil}.
1833@end defun 1836@end defun
1834 1837
1835 Each face name is meaningful for all frames, and by default it has 1838 By default, each face name corresponds to the same set of attributes
1836the same meaning in all frames. But you can arrange to give a 1839in all frames. But you can also assign a face name a special set of
1837particular face name a special meaning in one frame if you wish. 1840attributes in one frame (@pxref{Attribute Functions}).
1838 1841
1839@menu 1842@menu
1840* Defining Faces:: How to define a face with @code{defface}. 1843* Defining Faces:: How to define a face with @code{defface}.
@@ -1857,9 +1860,8 @@ particular face name a special meaning in one frame if you wish.
1857@subsection Defining Faces 1860@subsection Defining Faces
1858 1861
1859 The way to define a new face is with @code{defface}. This creates a 1862 The way to define a new face is with @code{defface}. This creates a
1860kind of customization item (@pxref{Customization}) which the user can 1863kind of customization item which the user can customize using the
1861customize using the Customization buffer (@pxref{Easy Customization,,, 1864Customization buffer (@pxref{Customization}).
1862emacs, The GNU Emacs Manual}).
1863 1865
1864 People are sometimes tempted to create variables whose values specify 1866 People are sometimes tempted to create variables whose values specify
1865which faces to use (for example, Font-Lock does this). In the vast 1867which faces to use (for example, Font-Lock does this). In the vast
@@ -1885,14 +1887,16 @@ exactly what the @code{defface} says.
1885 1887
1886The purpose of @var{spec} is to specify how the face should appear on 1888The purpose of @var{spec} is to specify how the face should appear on
1887different kinds of terminals. It should be an alist whose elements 1889different kinds of terminals. It should be an alist whose elements
1888have the form @code{(@var{display} @var{atts})}. Each element's 1890have the form @code{(@var{display} @var{atts})}. @var{display}
1889@sc{car}, @var{display}, specifies a class of terminals. (The first 1891specifies a class of terminals (see below), while @var{atts} is a
1890element, if its @sc{car} is @code{default}, is special---it specifies 1892property list of face attributes and their values, specifying the
1891defaults for the remaining elements). The element's @sc{cadr}, 1893appearance of the face on matching terminals
1892@var{atts}, is a list of face attributes and their values; it 1894@iftex
1893specifies what the face should look like on that kind of terminal. 1895(see the next section for details about face attributes).
1894The possible attributes are defined in the value of 1896@end iftex
1895@code{custom-face-attributes}. 1897@ifnottex
1898(@pxref{Face Attributes}, for details about face attributes).
1899@end ifnottex
1896 1900
1897The @var{display} part of an element of @var{spec} determines which 1901The @var{display} part of an element of @var{spec} determines which
1898frames the element matches. If more than one element of @var{spec} 1902frames the element matches. If more than one element of @var{spec}
@@ -1954,29 +1958,23 @@ frame must match one of the @var{value}s specified for it in
1954@end table 1958@end table
1955@end defmac 1959@end defmac
1956 1960
1957 Here's how the standard face @code{region} is defined: 1961 Here's how the standard face @code{highlight} is defined:
1958 1962
1959@example 1963@example
1960@group 1964(defface highlight
1961(defface region 1965 '((((class color) (min-colors 88) (background light))
1962 '((((class color) (min-colors 88) (background dark)) 1966 :background "darkseagreen2")
1963 :background "blue3") 1967 (((class color) (min-colors 88) (background dark))
1964@end group 1968 :background "darkolivegreen")
1965 (((class color) (min-colors 88) (background light))
1966 :background "lightgoldenrod2")
1967 (((class color) (min-colors 16) (background dark))
1968 :background "blue3")
1969 (((class color) (min-colors 16) (background light)) 1969 (((class color) (min-colors 16) (background light))
1970 :background "lightgoldenrod2") 1970 :background "darkseagreen2")
1971 (((class color) (min-colors 16) (background dark))
1972 :background "darkolivegreen")
1971 (((class color) (min-colors 8)) 1973 (((class color) (min-colors 8))
1972 :background "blue" :foreground "white") 1974 :background "green" :foreground "black")
1973 (((type tty) (class mono)) 1975 (t :inverse-video t))
1974 :inverse-video t) 1976 "Basic face for highlighting."
1975 (t :background "gray"))
1976@group
1977 "Basic face for highlighting the region."
1978 :group 'basic-faces) 1977 :group 'basic-faces)
1979@end group
1980@end example 1978@end example
1981 1979
1982 Internally, @code{defface} uses the symbol property 1980 Internally, @code{defface} uses the symbol property
@@ -2012,8 +2010,8 @@ doesn't specify that attribute. In face merging, when the first face
2012fails to specify a particular attribute, the next face gets a chance. 2010fails to specify a particular attribute, the next face gets a chance.
2013However, the @code{default} face must specify all attributes. 2011However, the @code{default} face must specify all attributes.
2014 2012
2015 Some of these font attributes are meaningful only on certain kinds 2013 Some of these attributes are meaningful only on certain kinds of
2016of displays. If your display cannot handle a certain attribute, the 2014displays. If your display cannot handle a certain attribute, the
2017attribute is ignored. 2015attribute is ignored.
2018 2016
2019@table @code 2017@table @code
@@ -2218,20 +2216,18 @@ This function sets one or more attributes of @var{face} for
2218the @code{defface} says. 2216the @code{defface} says.
2219 2217
2220The extra arguments @var{arguments} specify the attributes to set, and 2218The extra arguments @var{arguments} specify the attributes to set, and
2221the values for them. They should consist of alternating attribute names 2219the values for them. They should consist of alternating attribute
2222(such as @code{:family} or @code{:underline}) and corresponding values. 2220names (such as @code{:family} or @code{:underline}) and values. Thus,
2223Thus,
2224 2221
2225@example 2222@example
2226(set-face-attribute 'foo nil 2223(set-face-attribute 'foo nil
2227 :width 'extended 2224 :width 'extended
2228 :weight 'bold 2225 :weight 'bold)
2229 :underline "red")
2230@end example 2226@end example
2231 2227
2232@noindent 2228@noindent
2233sets the attributes @code{:width}, @code{:weight} and @code{:underline} 2229sets the attribute @code{:width} to @code{extended} and the attribute
2234to the corresponding values. 2230@code{:weight} to @code{bold}.
2235 2231
2236If @var{frame} is @code{t}, this function sets the default attributes 2232If @var{frame} is @code{t}, this function sets the default attributes
2237for new frames. Default attribute values specified this way override 2233for new frames. Default attribute values specified this way override
@@ -2308,54 +2304,51 @@ If @var{value1} is a relative value for the face attribute
2308face attribute @var{attribute}, returns @var{value1} unchanged. 2304face attribute @var{attribute}, returns @var{value1} unchanged.
2309@end defun 2305@end defun
2310 2306
2311 The following functions provide compatibility with Emacs 20 and 2307 The following commands and functions mostly provide compatibility
2312below. They work by calling @code{set-face-attribute}. Values of 2308with old versions of Emacs. They work by calling
2313@code{t} and @code{nil} for their @var{frame} argument are handled 2309@code{set-face-attribute}. Values of @code{t} and @code{nil} for
2314just like @code{set-face-attribute} and @code{face-attribute}. 2310their @var{frame} argument are handled just like
2311@code{set-face-attribute} and @code{face-attribute}. The commands
2312read their arguments using the minibuffer, if called interactively.
2315 2313
2316@defun set-face-foreground face color &optional frame 2314@deffn Command set-face-foreground face color &optional frame
2317@defunx set-face-background face color &optional frame 2315@deffnx Command set-face-background face color &optional frame
2318These functions set the @code{:foreground} attribute (or 2316These set the @code{:foreground} attribute (or @code{:background}
2319@code{:background} attribute, respectively) of @var{face} to 2317attribute, respectively) of @var{face} to @var{color}.
2320@var{color}. 2318@end deffn
2321@end defun
2322 2319
2323@defun set-face-stipple face pattern &optional frame 2320@deffn Command set-face-stipple face pattern &optional frame
2324This function sets the @code{:stipple} attribute of @var{face} to 2321This sets the @code{:stipple} attribute of @var{face} to
2325@var{pattern}. 2322@var{pattern}.
2326@end defun 2323@end deffn
2327 2324
2328@defun set-face-font face font &optional frame 2325@deffn Command set-face-font face font &optional frame
2329This function sets the @code{:font} attribute of @var{face} to 2326This sets the @code{:font} attribute of @var{face} to @var{font}.
2330@var{font}. 2327@end deffn
2331@end defun
2332 2328
2333@defun set-face-bold-p face bold-p &optional frame 2329@defun set-face-bold-p face bold-p &optional frame
2334This function sets the @code{:weight} attribute of @var{face} to 2330This sets the @code{:weight} attribute of @var{face} to @var{normal}
2335@var{normal} if @var{bold-p} is @code{nil}, and to @var{bold} 2331if @var{bold-p} is @code{nil}, and to @var{bold} otherwise.
2336otherwise.
2337@end defun 2332@end defun
2338 2333
2339@defun set-face-italic-p face italic-p &optional frame 2334@defun set-face-italic-p face italic-p &optional frame
2340This function sets the @code{:slant} attribute of @var{face} to 2335This sets the @code{:slant} attribute of @var{face} to @var{normal} if
2341@var{normal} if @var{italic-p} is @code{nil}, and to @var{italic} 2336@var{italic-p} is @code{nil}, and to @var{italic} otherwise.
2342otherwise.
2343@end defun 2337@end defun
2344 2338
2345@defun set-face-underline-p face underline &optional frame 2339@defun set-face-underline-p face underline &optional frame
2346This function sets the @code{:underline} attribute of @var{face} to 2340This sets the @code{:underline} attribute of @var{face} to
2347@var{underline}. 2341@var{underline}.
2348@end defun 2342@end defun
2349 2343
2350@defun set-face-inverse-video-p face inverse-video-p &optional frame 2344@defun set-face-inverse-video-p face inverse-video-p &optional frame
2351This function sets the @code{:inverse-video} attribute of @var{face} 2345This sets the @code{:inverse-video} attribute of @var{face} to
2352to @var{inverse-video-p}. 2346@var{inverse-video-p}.
2353@end defun 2347@end defun
2354 2348
2355@defun invert-face face &optional frame 2349@deffn Command invert-face face &optional frame
2356This function swaps the foreground and background colors of face 2350This swaps the foreground and background colors of face @var{face}.
2357@var{face}. 2351@end deffn
2358@end defun
2359 2352
2360 The following functions examine the attributes of a face. If you 2353 The following functions examine the attributes of a face. If you
2361don't specify @var{frame}, they refer to the selected frame; @code{t} 2354don't specify @var{frame}, they refer to the selected frame; @code{t}
@@ -2461,27 +2454,26 @@ steps, Emacs applies the attribute of the @code{default} face.
2461 If these various sources together specify more than one face for a 2454 If these various sources together specify more than one face for a
2462particular character, Emacs merges the attributes of the various faces 2455particular character, Emacs merges the attributes of the various faces
2463specified. For each attribute, Emacs tries using the above order 2456specified. For each attribute, Emacs tries using the above order
2464(i.e., first the face of any special glyph; then the face for region 2457(i.e.@: first the face of any special glyph; then the face for region
2465highlighting, if appropriate; then faces specified by overlays, then 2458highlighting, if appropriate; and so on).
2466faces specified by text properties, then the @code{mode-line} or
2467@code{mode-line-inactive} or @code{header-line} face, if appropriate,
2468and finally the @code{default} face).
2469 2459
2470@node Face Remapping 2460@node Face Remapping
2471@subsection Face Remapping 2461@subsection Face Remapping
2472 2462
2473 The variable @code{face-remapping-alist} is used for buffer-local or 2463 The variable @code{face-remapping-alist} is used for buffer-local or
2474global changes in the appearance of a face. For instance, it can be 2464global changes in the appearance of a face. For instance, it is used
2475used to make the @code{default} face a variable-pitch face within a 2465to implement the @code{text-scale-adjust} command (@pxref{Text
2476particular buffer. 2466Scale,,, emacs, The GNU Emacs Manual}).
2477 2467
2478@defvar face-remapping-alist 2468@defvar face-remapping-alist
2479An alist whose elements have the form @code{(@var{face} 2469The value of this variable is an alist whose elements have the form
2480@var{remapping...})}. This causes Emacs to display text using the 2470@code{(@var{face} . @var{remapping})}. This causes Emacs to display
2481face @var{face} using @var{remapping...} instead of @var{face}'s 2471any text having the face @var{face} with @var{remapping}, rather than
2482ordinary definition. @var{remapping...} may be any face specification 2472the ordinary definition of @var{face}. @var{remapping} may be any
2483suitable for a @code{face} text property: either a face name, or a 2473face specification suitable for a @code{face} text property: either a
2484property list of attribute/value pairs. @xref{Special Properties}. 2474face name, or a property list of attribute/value pairs, or a list in
2475which each element is either a face name or a property list
2476(@pxref{Special Properties}).
2485 2477
2486If @code{face-remapping-alist} is buffer-local, its local value takes 2478If @code{face-remapping-alist} is buffer-local, its local value takes
2487effect only within that buffer. 2479effect only within that buffer.
@@ -2490,17 +2482,15 @@ Two points bear emphasizing:
2490 2482
2491@enumerate 2483@enumerate
2492@item 2484@item
2493The new definition @var{remapping...} is the complete 2485@var{remapping} serves as the complete specification for the remapped
2494specification of how to display @var{face}---it entirely replaces, 2486face---it replaces the normal definition of @var{face}, instead of
2495rather than augmenting or modifying, the normal definition of that 2487modifying it.
2496face.
2497 2488
2498@item 2489@item
2499If @var{remapping...} recursively references the same face name 2490If @var{remapping} references the same face name @var{face}, either
2500@var{face}, either directly remapping entry, or via the 2491directly or via the @code{:inherit} attribute of some other face in
2501@code{:inherit} attribute of some other face in @var{remapping...}, 2492@var{remapping}, that reference uses the normal definition of
2502then that reference uses the normal definition of @var{face} in the 2493@var{face}. In other words, the remapping cannot be recursive.
2503selected frame, instead of the ``remapped'' definition.
2504 2494
2505For instance, if the @code{mode-line} face is remapped using this 2495For instance, if the @code{mode-line} face is remapped using this
2506entry in @code{face-remapping-alist}: 2496entry in @code{face-remapping-alist}:
@@ -2514,82 +2504,72 @@ then the new definition of the @code{mode-line} face inherits from the
2514@end enumerate 2504@end enumerate
2515@end defvar 2505@end defvar
2516 2506
2517 A typical use of the @code{face-remapping-alist} is to change a
2518buffer's @code{default} face; for example, the following changes a
2519buffer's @code{default} face to use the @code{variable-pitch} face,
2520with the height doubled:
2521
2522@example
2523(set (make-local-variable 'face-remapping-alist)
2524 '((default variable-pitch :height 2.0)))
2525@end example
2526
2527 The following functions implement a higher-level interface to 2507 The following functions implement a higher-level interface to
2528@code{face-remapping-alist}, making it easier to use 2508@code{face-remapping-alist}. Most Lisp code should use these
2529``cooperatively''. They are mainly intended for buffer-local use, and 2509functions instead of setting @code{face-remapping-alist} directly, to
2530so all make @code{face-remapping-alist} variable buffer-local as a 2510avoid trampling on remappings applied elsewhere. These functions are
2531side-effect. They use entries in @code{face-remapping-alist} which 2511intended for buffer-local remappings, so they all make
2532have the general form: 2512@code{face-remapping-alist} buffer-local as a side-effect. They manage
2513@code{face-remapping-alist} entries of the form
2533 2514
2534@example 2515@example
2535 (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs}) 2516 (@var{face} @var{relative-spec-1} @var{relative-spec-2} @var{...} @var{base-spec})
2536@end example 2517@end example
2537 2518
2538Everything except @var{face} is a ``face spec'': a list of face names 2519@noindent
2539or face attribute-value pairs. All face specs are merged together, 2520where, as explained above, each of the @var{relative-spec-N} and
2540with earlier values taking precedence. 2521@var{base-spec} is either a face name, or a property list of
2541 2522attribute/value pairs. Each of the @dfn{relative remapping} entries,
2542The @var{relative_specs_}n values are ``relative specs'', and are 2523@var{relative-spec-N}, is managed by the
2543added by @code{face-remap-add-relative} (and removed by 2524@code{face-remap-add-relative} and @code{face-remap-remove-relative}
2544@code{face-remap-remove-relative}. These are intended for face 2525functions; these are intended for simple modifications like changing
2545modifications (such as increasing the size). Typical users of these 2526the text size. The @dfn{base remapping} entry, @var{base-spec}, has
2546relative specs would be minor modes. 2527the lowest priority and is managed by the @code{face-remap-set-base}
2547 2528and @code{face-remap-reset-base} functions; it is intended for major
2548@var{base_specs} is the lowest-priority value, and by default is just the 2529modes to remap faces in the buffers they control.
2549face name, which causes the global definition of that face to be used.
2550
2551A non-default value of @var{base_specs} may also be set using
2552@code{face-remap-set-base}. Because this @emph{overwrites} the
2553default base-spec value (which inherits the global face definition),
2554it is up to the caller of @code{face-remap-set-base} to add such
2555inheritance if it is desired. A typical use of
2556@code{face-remap-set-base} would be a major mode adding a face
2557remappings, e.g., of the default face.
2558
2559 2530
2560@defun face-remap-add-relative face &rest specs 2531@defun face-remap-add-relative face &rest specs
2561This functions adds a face remapping entry of @var{face} to @var{specs} 2532This functions adds the face specifications in @var{specs} as relative
2562in the current buffer. 2533remappings for face @var{face} in the current buffer. The remaining
2534arguments, @var{specs}, should form either a list of face names, or a
2535property list of attribute/value pairs.
2536
2537The return value is a Lisp object that serves as a ``cookie''; you can
2538pass this object as an argument to @code{face-remap-remove-relative}
2539if you need to remove the remapping later.
2563 2540
2564It returns a ``cookie'' which can be used to later delete the remapping with 2541@example
2565@code{face-remap-remove-relative}. 2542;; Remap the `escape-glyph' face into a combination
2543;; of the `highlight' and `italic' faces:
2544(face-remap-add-relative 'escape-glyph 'highlight 'italic)
2566 2545
2567@var{specs} can be any value suitable for the @code{face} text 2546;; Increase the size of the `default' face by 50%:
2568property, including a face name, a list of face names, or a 2547(face-remap-add-relative 'default :height 1.5)
2569face-attribute property list. The attributes given by @var{specs} 2548@end example
2570will be merged with any other currently active face remappings of
2571@var{face}, and with the global definition of @var{face} (by default;
2572this may be changed using @code{face-remap-set-base}), with the most
2573recently added relative remapping taking precedence.
2574@end defun 2549@end defun
2575 2550
2576@defun face-remap-remove-relative cookie 2551@defun face-remap-remove-relative cookie
2577This function removes a face remapping previously added by 2552This function removes a relative remapping previously added by
2578@code{face-remap-add-relative}. @var{cookie} should be a return value 2553@code{face-remap-add-relative}. @var{cookie} should be the Lisp
2579from that function. 2554object returned by @code{face-remap-add-relative} when the remapping
2555was added.
2580@end defun 2556@end defun
2581 2557
2582@defun face-remap-set-base face &rest specs 2558@defun face-remap-set-base face &rest specs
2583This function sets the ``base remapping'' of @var{face} in the current 2559This function sets the base remapping of @var{face} in the current
2584buffer to @var{specs}. If @var{specs} is empty, the default base 2560buffer to @var{specs}. If @var{specs} is empty, the default base
2585remapping is restored, which inherits from the global definition of 2561remapping is restored, similar to calling @code{face-remap-reset-base}
2586@var{face}; note that this is different from @var{specs} containing a 2562(see below); note that this is different from @var{specs} containing a
2587single value @code{nil}, which has the opposite result (the global 2563single value @code{nil}, which has the opposite result (the global
2588definition of @var{face} is ignored). 2564definition of @var{face} is ignored).
2565
2566This overwrites the default @var{base-spec}, which inherits the global
2567face definition, so it is up to the caller to add such inheritance if
2568so desired.
2589@end defun 2569@end defun
2590 2570
2591@defun face-remap-reset-base face 2571@defun face-remap-reset-base face
2592This function sets the ``base remapping'' of @var{face} to its default 2572This function sets the base remapping of @var{face} to its default
2593value, which inherits from @var{face}'s global definition. 2573value, which inherits from @var{face}'s global definition.
2594@end defun 2574@end defun
2595 2575
@@ -2598,29 +2578,8 @@ value, which inherits from @var{face}'s global definition.
2598 2578
2599 Here are additional functions for creating and working with faces. 2579 Here are additional functions for creating and working with faces.
2600 2580
2601@defun make-face name
2602This function defines a new face named @var{name}, initially with all
2603attributes @code{nil}. It does nothing if there is already a face named
2604@var{name}.
2605@end defun
2606
2607@defun face-list 2581@defun face-list
2608This function returns a list of all defined faces. 2582This function returns a list of all defined face names.
2609@end defun
2610
2611@defun copy-face old-face new-name &optional frame new-frame
2612This function defines a face named @var{new-name} as a copy of the existing
2613face named @var{old-face}. It creates the face @var{new-name} if that
2614doesn't already exist.
2615
2616If the optional argument @var{frame} is given, this function applies
2617only to that frame. Otherwise it applies to each frame individually,
2618copying attributes from @var{old-face} in each frame to @var{new-face}
2619in the same frame.
2620
2621If the optional argument @var{new-frame} is given, then @code{copy-face}
2622copies the attributes of @var{old-face} in @var{frame} to @var{new-name}
2623in @var{new-frame}.
2624@end defun 2583@end defun
2625 2584
2626@defun face-id face 2585@defun face-id face
@@ -2754,7 +2713,7 @@ these are used for messages in @samp{*Compilation*} buffers.
2754@node Font Selection 2713@node Font Selection
2755@subsection Font Selection 2714@subsection Font Selection
2756 2715
2757 Before Emacs can draw a character on a particular display, it must 2716 Before Emacs can draw a character on a graphical display, it must
2758select a @dfn{font} for that character@footnote{In this context, the 2717select a @dfn{font} for that character@footnote{In this context, the
2759term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock 2718term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock
2760Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally, 2719Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally,
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 1021787a0f4..2563bc57aef 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -248,6 +248,9 @@ previous session. @xref{Session Management}.
248 248
249@end enumerate 249@end enumerate
250 250
251@noindent
252The following options affect some aspects of the startup sequence.
253
251@defopt inhibit-startup-screen 254@defopt inhibit-startup-screen
252This variable, if non-@code{nil}, inhibits the startup screen. In 255This variable, if non-@code{nil}, inhibits the startup screen. In
253that case, Emacs typically displays the @samp{*scratch*} buffer; but 256that case, Emacs typically displays the @samp{*scratch*} buffer; but
@@ -265,9 +268,13 @@ aliases for this variable.
265 268
266@defopt initial-buffer-choice 269@defopt initial-buffer-choice
267This variable, if non-@code{nil}, determines a file or buffer for 270This variable, if non-@code{nil}, determines a file or buffer for
268Emacs to display after starting up, instead of the startup screen. If 271Emacs to display after starting up, instead of the startup screen.
269its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. If 272@ignore
270its value is a string, that specifies the name of a file for Emacs to 273@c I do not think this should be mentioned. AFAICS it is just a dodge
274@c around inhibit-startup-screen not being settable on a site-wide basis.
275If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer.
276@end ignore
277If its value is a string, that specifies the name of a file for Emacs to
271visit. 278visit.
272@end defopt 279@end defopt
273 280
@@ -283,7 +290,7 @@ form to your init file:
283 290
284Emacs explicitly checks for an expression as shown above in your init 291Emacs explicitly checks for an expression as shown above in your init
285file; your login name must appear in the expression as a Lisp string 292file; your login name must appear in the expression as a Lisp string
286constant. Other methods of setting 293constant. You can also use the Custom interface. Other methods of setting
287@code{inhibit-startup-echo-area-message} to the same value do not 294@code{inhibit-startup-echo-area-message} to the same value do not
288inhibit the startup message. This way, you can easily inhibit the 295inhibit the startup message. This way, you can easily inhibit the
289message for yourself if you wish, but thoughtless copying of your init 296message for yourself if you wish, but thoughtless copying of your init
@@ -296,6 +303,34 @@ inserted into the @samp{*scratch*} buffer when Emacs starts up. If it
296is @code{nil}, the @samp{*scratch*} buffer is empty. 303is @code{nil}, the @samp{*scratch*} buffer is empty.
297@end defopt 304@end defopt
298 305
306@noindent
307The following command-line options affect some aspects of the startup
308sequence. @xref{Initial Options,,, emacs, The GNU Emacs Manual}.
309
310@table @code
311@item --no-splash
312Do not display a splash screen.
313
314@item --batch
315Run without an interactive terminal. @xref{Batch Mode}.
316
317@item --daemon
318Do not initialize any display; just start a server in the background.
319
320@item --no-init-file
321@itemx -Q
322Do not load either the init file, or the @file{default} library.
323
324@item --no-site-file
325Do not load the @file{site-start} library.
326
327@item --quick
328@itemx -Q
329Equivalent to @samp{-q --no-site-file --no-splash}.
330@c and --no-site-lisp, but let's not mention that here.
331@end table
332
333
299@node Init File 334@node Init File
300@subsection The Init File 335@subsection The Init File
301@cindex init file 336@cindex init file