aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/dired.texi2
-rw-r--r--doc/lispref/ChangeLog32
-rw-r--r--doc/lispref/display.texi1028
-rw-r--r--doc/lispref/elisp.texi15
-rw-r--r--doc/lispref/strings.texi7
-rw-r--r--doc/lispref/vol1.texi15
-rw-r--r--doc/lispref/vol2.texi15
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/gnus.texi4
10 files changed, 561 insertions, 566 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index f5ccba1005f..56a63b1a0eb 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12012-03-22 Glenn Morris <rgm@gnu.org>
2
3 * dired.texi (Operating on Files): Fix dired-recursive-copies default.
4
12012-03-17 Chong Yidong <cyd@gnu.org> 52012-03-17 Chong Yidong <cyd@gnu.org>
2 6
3 * package.texi (Package Installation): Document use of 7 * package.texi (Package Installation): Document use of
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 7dd290939fe..301f8a76477 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -610,7 +610,7 @@ the copy, like @samp{cp -p}.
610@cindex recursive copying 610@cindex recursive copying
611The variable @code{dired-recursive-copies} controls whether to copy 611The variable @code{dired-recursive-copies} controls whether to copy
612directories recursively (like @samp{cp -r}). The default is 612directories recursively (like @samp{cp -r}). The default is
613@code{nil}, which means that directories cannot be copied. 613@code{top}, which means to ask before recursively copying a directory.
614 614
615@item D 615@item D
616@findex dired-do-delete 616@findex dired-do-delete
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 43ae349cb4c..5477da38abe 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,35 @@
12012-03-25 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Fringes): Note that fringes are shown on graphical
4 displays only.
5 (Fringe Size/Pos, Fringe Bitmaps, Making Buttons): Clarifications.
6 (Replacing Specs): Clarify example.
7 (Manipulating Buttons): Note that button-at can return a marker.
8 (Buttons): Minor rewrite.
9 (Character Display): New node. Consolidate all character display
10 related nodes into its subsections.
11 (Usual Display): Character 127 is also affected by ctl-arrow.
12 (Display Tables): Improve example.
13
142012-03-22 Glenn Morris <rgm@gnu.org>
15
16 * strings.texi (Text Comparison): Mention string-prefix-p.
17
182012-03-21 Chong Yidong <cyd@gnu.org>
19
20 * display.texi (The Echo Area): Add xref to Output Streams.
21 (Displaying Messages): Improve doc of message.
22 (Echo Area Customization, Invisible Text): Copyedits.
23 (Invisible Text): Mention that spec comparison is done with eq.
24 (Width): Improve doc of char-width.
25 (Faces): Recommend using symbol instead of string for face name.
26 Minor clarifications.
27 (Defining Faces): Copyedits. Update face example.
28 (Attribute Functions): Mark set-face-foreground etc as commands.
29 (Face Remapping): Mention text-scale-adjust. Clarify
30 face-remapping-alist and related docs.
31 (Face Functions): Don't document make-face or copy-face.
32
12012-03-20 Chong Yidong <cyd@gnu.org> 332012-03-20 Chong Yidong <cyd@gnu.org>
2 34
3 * display.texi (Forcing Redisplay): Various rewrites to reflect 35 * display.texi (Forcing Redisplay): Various rewrites to reflect
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b68b0697936..b3bf78c4799 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -30,13 +30,11 @@ that Emacs presents to the user.
30* Buttons:: Adding clickable buttons to Emacs buffers. 30* Buttons:: Adding clickable buttons to Emacs buffers.
31* Abstract Display:: Emacs's Widget for Object Collections. 31* Abstract Display:: Emacs's Widget for Object Collections.
32* Blinking:: How Emacs shows the matching open parenthesis. 32* Blinking:: How Emacs shows the matching open parenthesis.
33* Usual Display:: The usual conventions for displaying nonprinting chars. 33* Character Display:: How Emacs displays individual characters.
34* Display Tables:: How to specify other conventions.
35* Beeping:: Audible signal to the user. 34* Beeping:: Audible signal to the user.
36* Window Systems:: Which window system is being used. 35* Window Systems:: Which window system is being used.
37* Bidirectional Display:: Display of bidirectional scripts, such as 36* Bidirectional Display:: Display of bidirectional scripts, such as
38 Arabic and Farsi. 37 Arabic and Farsi.
39* Glyphless Chars:: How glyphless characters are drawn.
40@end menu 38@end menu
41 39
42@node Refresh Screen 40@node Refresh Screen
@@ -46,7 +44,6 @@ that Emacs presents to the user.
46contents of a given frame (@pxref{Frames}). This is useful if the 44contents of a given frame (@pxref{Frames}). This is useful if the
47screen is corrupted. 45screen is corrupted.
48 46
49@c Emacs 19 feature
50@defun redraw-frame frame 47@defun redraw-frame frame
51This function clears and redisplays frame @var{frame}. 48This function clears and redisplays frame @var{frame}.
52@end defun 49@end defun
@@ -243,14 +240,12 @@ This variable is automatically buffer-local in every buffer.
243(@pxref{Errors}), for messages made with the @code{message} primitive, 240(@pxref{Errors}), for messages made with the @code{message} primitive,
244and for echoing keystrokes. It is not the same as the minibuffer, 241and for echoing keystrokes. It is not the same as the minibuffer,
245despite the fact that the minibuffer appears (when active) in the same 242despite the fact that the minibuffer appears (when active) in the same
246place on the screen as the echo area. The @cite{GNU Emacs Manual} 243place on the screen as the echo area. @xref{Minibuffer,, The
247specifies the rules for resolving conflicts between the echo area and 244Minibuffer, emacs, The GNU Emacs Manual}.
248the minibuffer for use of that screen space (@pxref{Minibuffer,, The
249Minibuffer, emacs, The GNU Emacs Manual}).
250 245
251 You can write output in the echo area by using the Lisp printing 246 Apart from the functions documented in this section, you can print
252functions with @code{t} as the stream (@pxref{Output Functions}), or 247Lisp objects to the echo area by specifying @code{t} as the output
253explicitly. 248stream. @xref{Output Streams}.
254 249
255@menu 250@menu
256* Displaying Messages:: Explicitly displaying text in the echo area. 251* Displaying Messages:: Explicitly displaying text in the echo area.
@@ -263,27 +258,26 @@ explicitly.
263@subsection Displaying Messages in the Echo Area 258@subsection Displaying Messages in the Echo Area
264@cindex display message in echo area 259@cindex display message in echo area
265 260
266 This section describes the functions for explicitly producing echo 261 This section describes the standard functions for displaying
267area messages. Many other Emacs features display messages there, too. 262messages in the echo area.
268 263
269@defun message format-string &rest arguments 264@defun message format-string &rest arguments
270This function displays a message in the echo area. The argument 265This function displays a message in the echo area.
271@var{format-string} is similar to a C language @code{printf} format 266@var{format-string} is a format string, and @var{arguments} are the
272string. See @code{format} in @ref{Formatting Strings}, for the details 267objects for its format specifications, like in the @code{format}
273on the conversion specifications. @code{message} returns the 268function (@pxref{Formatting Strings}). The resulting formatted string
274constructed string. 269is displayed in the echo area; if it contains @code{face} text
275 270properties, it is displayed with the specified faces (@pxref{Faces}).
276In batch mode, @code{message} prints the message text on the standard 271The string is also added to the @samp{*Messages*} buffer, but without
277error stream, followed by a newline. 272text properties (@pxref{Logging Messages}).
278 273
279If @var{format-string}, or strings among the @var{arguments}, have 274In batch mode, the message is printed to the standard error stream,
280@code{face} text properties, these affect the way the message is displayed. 275followed by a newline.
281 276
282@c Emacs 19 feature
283If @var{format-string} is @code{nil} or the empty string, 277If @var{format-string} is @code{nil} or the empty string,
284@code{message} clears the echo area; if the echo area has been 278@code{message} clears the echo area; if the echo area has been
285expanded automatically, this brings it back to its normal size. 279expanded automatically, this brings it back to its normal size. If
286If the minibuffer is active, this brings the minibuffer contents back 280the minibuffer is active, this brings the minibuffer contents back
287onto the screen immediately. 281onto the screen immediately.
288 282
289@example 283@example
@@ -559,13 +553,13 @@ If the value is zero, then command input is not echoed.
559Normally, displaying a long message resizes the echo area to display 553Normally, displaying a long message resizes the echo area to display
560the entire message. But if the variable @code{message-truncate-lines} 554the entire message. But if the variable @code{message-truncate-lines}
561is non-@code{nil}, the echo area does not resize, and the message is 555is non-@code{nil}, the echo area does not resize, and the message is
562truncated to fit it, as in Emacs 20 and before. 556truncated to fit it.
563@end defvar 557@end defvar
564 558
565 The variable @code{max-mini-window-height}, which specifies the 559 The variable @code{max-mini-window-height}, which specifies the
566maximum height for resizing minibuffer windows, also applies to the 560maximum height for resizing minibuffer windows, also applies to the
567echo area (which is really a special use of the minibuffer window. 561echo area (which is really a special use of the minibuffer window;
568@xref{Minibuffer Misc}.). 562@pxref{Minibuffer Misc}).
569 563
570@node Warnings 564@node Warnings
571@section Reporting Warnings 565@section Reporting Warnings
@@ -762,10 +756,11 @@ that warning is not logged.
762@cindex invisible text 756@cindex invisible text
763You can make characters @dfn{invisible}, so that they do not appear on 757You can make characters @dfn{invisible}, so that they do not appear on
764the screen, with the @code{invisible} property. This can be either a 758the screen, with the @code{invisible} property. This can be either a
765text property (@pxref{Text Properties}) or a property of an overlay 759text property (@pxref{Text Properties}) or an overlay property
766(@pxref{Overlays}). Cursor motion also partly ignores these 760(@pxref{Overlays}). Cursor motion also partly ignores these
767characters; if the command loop finds point within them, it moves 761characters; if the command loop finds that point is inside a range of
768point to the other side of them. 762invisible text after a command, it relocates point to the other side
763of the text.
769 764
770In the simplest case, any non-@code{nil} @code{invisible} property makes 765In the simplest case, any non-@code{nil} @code{invisible} property makes
771a character invisible. This is the default case---if you don't alter 766a character invisible. This is the default case---if you don't alter
@@ -805,13 +800,15 @@ the character is invisible. The list can have two kinds of elements:
805 800
806@table @code 801@table @code
807@item @var{atom} 802@item @var{atom}
808A character is invisible if its @code{invisible} property value 803A character is invisible if its @code{invisible} property value is
809is @var{atom} or if it is a list with @var{atom} as a member. 804@var{atom} or if it is a list with @var{atom} as a member; comparison
805is done with @code{eq}.
810 806
811@item (@var{atom} . t) 807@item (@var{atom} . t)
812A character is invisible if its @code{invisible} property value is 808A character is invisible if its @code{invisible} property value is
813@var{atom} or if it is a list with @var{atom} as a member. Moreover, 809@var{atom} or if it is a list with @var{atom} as a member; comparison
814a sequence of such characters displays as an ellipsis. 810is done with @code{eq}. Moreover, a sequence of such characters
811displays as an ellipsis.
815@end table 812@end table
816@end table 813@end table
817@end defvar 814@end defvar
@@ -846,7 +843,7 @@ major mode should use the mode's own name as an element of
846(overlay-put (make-overlay beginning end) 843(overlay-put (make-overlay beginning end)
847 'invisible 'my-symbol) 844 'invisible 'my-symbol)
848 845
849;; @r{When done with the overlays:} 846;; @r{When done with the invisibility:}
850(remove-from-invisibility-spec '(my-symbol . t)) 847(remove-from-invisibility-spec '(my-symbol . t))
851;; @r{Or respectively:} 848;; @r{Or respectively:}
852(remove-from-invisibility-spec 'my-symbol) 849(remove-from-invisibility-spec 'my-symbol)
@@ -872,15 +869,16 @@ ignore invisible newlines if @code{line-move-ignore-invisible} is
872non-@code{nil} (the default), but only because they are explicitly 869non-@code{nil} (the default), but only because they are explicitly
873programmed to do so. 870programmed to do so.
874 871
875 However, if a command ends with point inside or at the boundary of invisible 872 However, if a command ends with point inside or at the boundary of
876text, the main editing loop moves point to one of the two ends of the invisible 873invisible text, the main editing loop relocates point to one of the
877text. Which end to move to is chosen based on the following factors: make sure 874two ends of the invisible text. Emacs chooses the direction of
878that the overall movement of the command is still in the same direction, and 875relocation so that it is the same as the overall movement direction of
879prefer a position where an inserted char would not inherit the @code{invisible} 876the command; if in doubt, it prefers a position where an inserted char
880property. Additionally, if the text is not replaced by an ellipsis and the 877would not inherit the @code{invisible} property. Additionally, if the
881command only moved within the invisible text, then point is moved one extra 878text is not replaced by an ellipsis and the command only moved within
882character so as to try and reflect the command's movement by a visible movement 879the invisible text, then point is moved one extra character so as to
883of the cursor. 880try and reflect the command's movement by a visible movement of the
881cursor.
884 882
885 Thus, if the command moved point back to an invisible range (with the usual 883 Thus, if the command moved point back to an invisible range (with the usual
886stickiness), Emacs moves point back to the beginning of that range. If the 884stickiness), Emacs moves point back to the beginning of that range. If the
@@ -1666,8 +1664,11 @@ check the width of a character. @xref{Primitive Indent}, and
1666@ref{Screen Lines}, for related functions. 1664@ref{Screen Lines}, for related functions.
1667 1665
1668@defun char-width char 1666@defun char-width char
1669This function returns the width in columns of the character @var{char}, 1667This function returns the width in columns of the character
1670if it were displayed in the current buffer and the selected window. 1668@var{char}, if it were displayed in the current buffer (i.e.@: taking
1669into account the buffer's display table, if any; @pxref{Display
1670Tables}). The width of a tab character is usually @code{tab-width}
1671(@pxref{Usual Display}).
1671@end defun 1672@end defun
1672 1673
1673@defun string-width string 1674@defun string-width string
@@ -1813,26 +1814,27 @@ height.
1813@section Faces 1814@section Faces
1814@cindex faces 1815@cindex faces
1815 1816
1816 A @dfn{face} is a collection of graphical attributes for displaying 1817 A @dfn{face} is a collection of graphical @dfn{attributes} for
1817text: font, foreground color, background color, optional underlining, 1818displaying text: font, foreground color, background color, optional
1818and so on. Faces control how buffer text is displayed, and how some 1819underlining, and so on. Faces control how Emacs displays text in
1819parts of the frame, such as the mode-line, are displayed. 1820buffers, as well as other parts of the frame such as the mode line.
1820@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of 1821@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of
1821faces Emacs normally comes with. 1822faces Emacs normally comes with.
1822 1823
1823@cindex face id 1824@cindex face id
1824 For most purposes, you refer to a face in Lisp programs using its 1825 For most purposes, you refer to a face in Lisp programs using its
1825@dfn{face name}. This is either a string or (equivalently) a Lisp 1826@dfn{face name}, which is usually a Lisp symbol. For backward
1826symbol whose name is equal to that string. 1827compatibility, a face name can also be a string, which is equivalent
1828to a Lisp symbol of the same name.
1827 1829
1828@defun facep object 1830@defun facep object
1829This function returns a non-@code{nil} value if @var{object} is a Lisp 1831This function returns a non-@code{nil} value if @var{object} is a Lisp
1830symbol or string that names a face. Otherwise, it returns @code{nil}. 1832symbol or string that names a face. Otherwise, it returns @code{nil}.
1831@end defun 1833@end defun
1832 1834
1833 Each face name is meaningful for all frames, and by default it has 1835 By default, each face name corresponds to the same set of attributes
1834the same meaning in all frames. But you can arrange to give a 1836in all frames. But you can also assign a face name a special set of
1835particular face name a special meaning in one frame if you wish. 1837attributes in one frame (@pxref{Attribute Functions}).
1836 1838
1837@menu 1839@menu
1838* Defining Faces:: How to define a face with @code{defface}. 1840* Defining Faces:: How to define a face with @code{defface}.
@@ -1855,9 +1857,8 @@ particular face name a special meaning in one frame if you wish.
1855@subsection Defining Faces 1857@subsection Defining Faces
1856 1858
1857 The way to define a new face is with @code{defface}. This creates a 1859 The way to define a new face is with @code{defface}. This creates a
1858kind of customization item (@pxref{Customization}) which the user can 1860kind of customization item which the user can customize using the
1859customize using the Customization buffer (@pxref{Easy Customization,,, 1861Customization buffer (@pxref{Customization}).
1860emacs, The GNU Emacs Manual}).
1861 1862
1862 People are sometimes tempted to create variables whose values specify 1863 People are sometimes tempted to create variables whose values specify
1863which faces to use (for example, Font-Lock does this). In the vast 1864which faces to use (for example, Font-Lock does this). In the vast
@@ -1883,14 +1884,16 @@ exactly what the @code{defface} says.
1883 1884
1884The purpose of @var{spec} is to specify how the face should appear on 1885The purpose of @var{spec} is to specify how the face should appear on
1885different kinds of terminals. It should be an alist whose elements 1886different kinds of terminals. It should be an alist whose elements
1886have the form @code{(@var{display} @var{atts})}. Each element's 1887have the form @code{(@var{display} @var{atts})}. @var{display}
1887@sc{car}, @var{display}, specifies a class of terminals. (The first 1888specifies a class of terminals (see below), while @var{atts} is a
1888element, if its @sc{car} is @code{default}, is special---it specifies 1889property list of face attributes and their values, specifying the
1889defaults for the remaining elements). The element's @sc{cadr}, 1890appearance of the face on matching terminals
1890@var{atts}, is a list of face attributes and their values; it 1891@iftex
1891specifies what the face should look like on that kind of terminal. 1892(see the next section for details about face attributes).
1892The possible attributes are defined in the value of 1893@end iftex
1893@code{custom-face-attributes}. 1894@ifnottex
1895(@pxref{Face Attributes}, for details about face attributes).
1896@end ifnottex
1894 1897
1895The @var{display} part of an element of @var{spec} determines which 1898The @var{display} part of an element of @var{spec} determines which
1896frames the element matches. If more than one element of @var{spec} 1899frames the element matches. If more than one element of @var{spec}
@@ -1952,29 +1955,23 @@ frame must match one of the @var{value}s specified for it in
1952@end table 1955@end table
1953@end defmac 1956@end defmac
1954 1957
1955 Here's how the standard face @code{region} is defined: 1958 Here's how the standard face @code{highlight} is defined:
1956 1959
1957@example 1960@example
1958@group 1961(defface highlight
1959(defface region 1962 '((((class color) (min-colors 88) (background light))
1960 '((((class color) (min-colors 88) (background dark)) 1963 :background "darkseagreen2")
1961 :background "blue3") 1964 (((class color) (min-colors 88) (background dark))
1962@end group 1965 :background "darkolivegreen")
1963 (((class color) (min-colors 88) (background light))
1964 :background "lightgoldenrod2")
1965 (((class color) (min-colors 16) (background dark))
1966 :background "blue3")
1967 (((class color) (min-colors 16) (background light)) 1966 (((class color) (min-colors 16) (background light))
1968 :background "lightgoldenrod2") 1967 :background "darkseagreen2")
1968 (((class color) (min-colors 16) (background dark))
1969 :background "darkolivegreen")
1969 (((class color) (min-colors 8)) 1970 (((class color) (min-colors 8))
1970 :background "blue" :foreground "white") 1971 :background "green" :foreground "black")
1971 (((type tty) (class mono)) 1972 (t :inverse-video t))
1972 :inverse-video t) 1973 "Basic face for highlighting."
1973 (t :background "gray"))
1974@group
1975 "Basic face for highlighting the region."
1976 :group 'basic-faces) 1974 :group 'basic-faces)
1977@end group
1978@end example 1975@end example
1979 1976
1980 Internally, @code{defface} uses the symbol property 1977 Internally, @code{defface} uses the symbol property
@@ -2010,8 +2007,8 @@ doesn't specify that attribute. In face merging, when the first face
2010fails to specify a particular attribute, the next face gets a chance. 2007fails to specify a particular attribute, the next face gets a chance.
2011However, the @code{default} face must specify all attributes. 2008However, the @code{default} face must specify all attributes.
2012 2009
2013 Some of these font attributes are meaningful only on certain kinds 2010 Some of these attributes are meaningful only on certain kinds of
2014of displays. If your display cannot handle a certain attribute, the 2011displays. If your display cannot handle a certain attribute, the
2015attribute is ignored. 2012attribute is ignored.
2016 2013
2017@table @code 2014@table @code
@@ -2216,20 +2213,18 @@ This function sets one or more attributes of @var{face} for
2216the @code{defface} says. 2213the @code{defface} says.
2217 2214
2218The extra arguments @var{arguments} specify the attributes to set, and 2215The extra arguments @var{arguments} specify the attributes to set, and
2219the values for them. They should consist of alternating attribute names 2216the values for them. They should consist of alternating attribute
2220(such as @code{:family} or @code{:underline}) and corresponding values. 2217names (such as @code{:family} or @code{:underline}) and values. Thus,
2221Thus,
2222 2218
2223@example 2219@example
2224(set-face-attribute 'foo nil 2220(set-face-attribute 'foo nil
2225 :width 'extended 2221 :width 'extended
2226 :weight 'bold 2222 :weight 'bold)
2227 :underline "red")
2228@end example 2223@end example
2229 2224
2230@noindent 2225@noindent
2231sets the attributes @code{:width}, @code{:weight} and @code{:underline} 2226sets the attribute @code{:width} to @code{extended} and the attribute
2232to the corresponding values. 2227@code{:weight} to @code{bold}.
2233 2228
2234If @var{frame} is @code{t}, this function sets the default attributes 2229If @var{frame} is @code{t}, this function sets the default attributes
2235for new frames. Default attribute values specified this way override 2230for new frames. Default attribute values specified this way override
@@ -2306,54 +2301,51 @@ If @var{value1} is a relative value for the face attribute
2306face attribute @var{attribute}, returns @var{value1} unchanged. 2301face attribute @var{attribute}, returns @var{value1} unchanged.
2307@end defun 2302@end defun
2308 2303
2309 The following functions provide compatibility with Emacs 20 and 2304 The following commands and functions mostly provide compatibility
2310below. They work by calling @code{set-face-attribute}. Values of 2305with old versions of Emacs. They work by calling
2311@code{t} and @code{nil} for their @var{frame} argument are handled 2306@code{set-face-attribute}. Values of @code{t} and @code{nil} for
2312just like @code{set-face-attribute} and @code{face-attribute}. 2307their @var{frame} argument are handled just like
2308@code{set-face-attribute} and @code{face-attribute}. The commands
2309read their arguments using the minibuffer, if called interactively.
2313 2310
2314@defun set-face-foreground face color &optional frame 2311@deffn Command set-face-foreground face color &optional frame
2315@defunx set-face-background face color &optional frame 2312@deffnx Command set-face-background face color &optional frame
2316These functions set the @code{:foreground} attribute (or 2313These set the @code{:foreground} attribute (or @code{:background}
2317@code{:background} attribute, respectively) of @var{face} to 2314attribute, respectively) of @var{face} to @var{color}.
2318@var{color}. 2315@end deffn
2319@end defun
2320 2316
2321@defun set-face-stipple face pattern &optional frame 2317@deffn Command set-face-stipple face pattern &optional frame
2322This function sets the @code{:stipple} attribute of @var{face} to 2318This sets the @code{:stipple} attribute of @var{face} to
2323@var{pattern}. 2319@var{pattern}.
2324@end defun 2320@end deffn
2325 2321
2326@defun set-face-font face font &optional frame 2322@deffn Command set-face-font face font &optional frame
2327This function sets the @code{:font} attribute of @var{face} to 2323This sets the @code{:font} attribute of @var{face} to @var{font}.
2328@var{font}. 2324@end deffn
2329@end defun
2330 2325
2331@defun set-face-bold-p face bold-p &optional frame 2326@defun set-face-bold-p face bold-p &optional frame
2332This function sets the @code{:weight} attribute of @var{face} to 2327This sets the @code{:weight} attribute of @var{face} to @var{normal}
2333@var{normal} if @var{bold-p} is @code{nil}, and to @var{bold} 2328if @var{bold-p} is @code{nil}, and to @var{bold} otherwise.
2334otherwise.
2335@end defun 2329@end defun
2336 2330
2337@defun set-face-italic-p face italic-p &optional frame 2331@defun set-face-italic-p face italic-p &optional frame
2338This function sets the @code{:slant} attribute of @var{face} to 2332This sets the @code{:slant} attribute of @var{face} to @var{normal} if
2339@var{normal} if @var{italic-p} is @code{nil}, and to @var{italic} 2333@var{italic-p} is @code{nil}, and to @var{italic} otherwise.
2340otherwise.
2341@end defun 2334@end defun
2342 2335
2343@defun set-face-underline-p face underline &optional frame 2336@defun set-face-underline-p face underline &optional frame
2344This function sets the @code{:underline} attribute of @var{face} to 2337This sets the @code{:underline} attribute of @var{face} to
2345@var{underline}. 2338@var{underline}.
2346@end defun 2339@end defun
2347 2340
2348@defun set-face-inverse-video-p face inverse-video-p &optional frame 2341@defun set-face-inverse-video-p face inverse-video-p &optional frame
2349This function sets the @code{:inverse-video} attribute of @var{face} 2342This sets the @code{:inverse-video} attribute of @var{face} to
2350to @var{inverse-video-p}. 2343@var{inverse-video-p}.
2351@end defun 2344@end defun
2352 2345
2353@defun invert-face face &optional frame 2346@deffn Command invert-face face &optional frame
2354This function swaps the foreground and background colors of face 2347This swaps the foreground and background colors of face @var{face}.
2355@var{face}. 2348@end deffn
2356@end defun
2357 2349
2358 The following functions examine the attributes of a face. If you 2350 The following functions examine the attributes of a face. If you
2359don't specify @var{frame}, they refer to the selected frame; @code{t} 2351don't specify @var{frame}, they refer to the selected frame; @code{t}
@@ -2459,27 +2451,26 @@ steps, Emacs applies the attribute of the @code{default} face.
2459 If these various sources together specify more than one face for a 2451 If these various sources together specify more than one face for a
2460particular character, Emacs merges the attributes of the various faces 2452particular character, Emacs merges the attributes of the various faces
2461specified. For each attribute, Emacs tries using the above order 2453specified. For each attribute, Emacs tries using the above order
2462(i.e., first the face of any special glyph; then the face for region 2454(i.e.@: first the face of any special glyph; then the face for region
2463highlighting, if appropriate; then faces specified by overlays, then 2455highlighting, if appropriate; and so on).
2464faces specified by text properties, then the @code{mode-line} or
2465@code{mode-line-inactive} or @code{header-line} face, if appropriate,
2466and finally the @code{default} face).
2467 2456
2468@node Face Remapping 2457@node Face Remapping
2469@subsection Face Remapping 2458@subsection Face Remapping
2470 2459
2471 The variable @code{face-remapping-alist} is used for buffer-local or 2460 The variable @code{face-remapping-alist} is used for buffer-local or
2472global changes in the appearance of a face. For instance, it can be 2461global changes in the appearance of a face. For instance, it is used
2473used to make the @code{default} face a variable-pitch face within a 2462to implement the @code{text-scale-adjust} command (@pxref{Text
2474particular buffer. 2463Scale,,, emacs, The GNU Emacs Manual}).
2475 2464
2476@defvar face-remapping-alist 2465@defvar face-remapping-alist
2477An alist whose elements have the form @code{(@var{face} 2466The value of this variable is an alist whose elements have the form
2478@var{remapping...})}. This causes Emacs to display text using the 2467@code{(@var{face} . @var{remapping})}. This causes Emacs to display
2479face @var{face} using @var{remapping...} instead of @var{face}'s 2468any text having the face @var{face} with @var{remapping}, rather than
2480ordinary definition. @var{remapping...} may be any face specification 2469the ordinary definition of @var{face}. @var{remapping} may be any
2481suitable for a @code{face} text property: either a face name, or a 2470face specification suitable for a @code{face} text property: either a
2482property list of attribute/value pairs. @xref{Special Properties}. 2471face name, or a property list of attribute/value pairs, or a list in
2472which each element is either a face name or a property list
2473(@pxref{Special Properties}).
2483 2474
2484If @code{face-remapping-alist} is buffer-local, its local value takes 2475If @code{face-remapping-alist} is buffer-local, its local value takes
2485effect only within that buffer. 2476effect only within that buffer.
@@ -2488,17 +2479,15 @@ Two points bear emphasizing:
2488 2479
2489@enumerate 2480@enumerate
2490@item 2481@item
2491The new definition @var{remapping...} is the complete 2482@var{remapping} serves as the complete specification for the remapped
2492specification of how to display @var{face}---it entirely replaces, 2483face---it replaces the normal definition of @var{face}, instead of
2493rather than augmenting or modifying, the normal definition of that 2484modifying it.
2494face.
2495 2485
2496@item 2486@item
2497If @var{remapping...} recursively references the same face name 2487If @var{remapping} references the same face name @var{face}, either
2498@var{face}, either directly remapping entry, or via the 2488directly or via the @code{:inherit} attribute of some other face in
2499@code{:inherit} attribute of some other face in @var{remapping...}, 2489@var{remapping}, that reference uses the normal definition of
2500then that reference uses the normal definition of @var{face} in the 2490@var{face}. In other words, the remapping cannot be recursive.
2501selected frame, instead of the ``remapped'' definition.
2502 2491
2503For instance, if the @code{mode-line} face is remapped using this 2492For instance, if the @code{mode-line} face is remapped using this
2504entry in @code{face-remapping-alist}: 2493entry in @code{face-remapping-alist}:
@@ -2512,82 +2501,72 @@ then the new definition of the @code{mode-line} face inherits from the
2512@end enumerate 2501@end enumerate
2513@end defvar 2502@end defvar
2514 2503
2515 A typical use of the @code{face-remapping-alist} is to change a
2516buffer's @code{default} face; for example, the following changes a
2517buffer's @code{default} face to use the @code{variable-pitch} face,
2518with the height doubled:
2519
2520@example
2521(set (make-local-variable 'face-remapping-alist)
2522 '((default variable-pitch :height 2.0)))
2523@end example
2524
2525 The following functions implement a higher-level interface to 2504 The following functions implement a higher-level interface to
2526@code{face-remapping-alist}, making it easier to use 2505@code{face-remapping-alist}. Most Lisp code should use these
2527``cooperatively''. They are mainly intended for buffer-local use, and 2506functions instead of setting @code{face-remapping-alist} directly, to
2528so all make @code{face-remapping-alist} variable buffer-local as a 2507avoid trampling on remappings applied elsewhere. These functions are
2529side-effect. They use entries in @code{face-remapping-alist} which 2508intended for buffer-local remappings, so they all make
2530have the general form: 2509@code{face-remapping-alist} buffer-local as a side-effect. They manage
2510@code{face-remapping-alist} entries of the form
2531 2511
2532@example 2512@example
2533 (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs}) 2513 (@var{face} @var{relative-spec-1} @var{relative-spec-2} @var{...} @var{base-spec})
2534@end example 2514@end example
2535 2515
2536Everything except @var{face} is a ``face spec'': a list of face names 2516@noindent
2537or face attribute-value pairs. All face specs are merged together, 2517where, as explained above, each of the @var{relative-spec-N} and
2538with earlier values taking precedence. 2518@var{base-spec} is either a face name, or a property list of
2539 2519attribute/value pairs. Each of the @dfn{relative remapping} entries,
2540The @var{relative_specs_}n values are ``relative specs'', and are 2520@var{relative-spec-N}, is managed by the
2541added by @code{face-remap-add-relative} (and removed by 2521@code{face-remap-add-relative} and @code{face-remap-remove-relative}
2542@code{face-remap-remove-relative}. These are intended for face 2522functions; these are intended for simple modifications like changing
2543modifications (such as increasing the size). Typical users of these 2523the text size. The @dfn{base remapping} entry, @var{base-spec}, has
2544relative specs would be minor modes. 2524the lowest priority and is managed by the @code{face-remap-set-base}
2545 2525and @code{face-remap-reset-base} functions; it is intended for major
2546@var{base_specs} is the lowest-priority value, and by default is just the 2526modes to remap faces in the buffers they control.
2547face name, which causes the global definition of that face to be used.
2548
2549A non-default value of @var{base_specs} may also be set using
2550@code{face-remap-set-base}. Because this @emph{overwrites} the
2551default base-spec value (which inherits the global face definition),
2552it is up to the caller of @code{face-remap-set-base} to add such
2553inheritance if it is desired. A typical use of
2554@code{face-remap-set-base} would be a major mode adding a face
2555remappings, e.g., of the default face.
2556
2557 2527
2558@defun face-remap-add-relative face &rest specs 2528@defun face-remap-add-relative face &rest specs
2559This functions adds a face remapping entry of @var{face} to @var{specs} 2529This functions adds the face specifications in @var{specs} as relative
2560in the current buffer. 2530remappings for face @var{face} in the current buffer. The remaining
2531arguments, @var{specs}, should form either a list of face names, or a
2532property list of attribute/value pairs.
2561 2533
2562It returns a ``cookie'' which can be used to later delete the remapping with 2534The return value is a Lisp object that serves as a ``cookie''; you can
2563@code{face-remap-remove-relative}. 2535pass this object as an argument to @code{face-remap-remove-relative}
2536if you need to remove the remapping later.
2564 2537
2565@var{specs} can be any value suitable for the @code{face} text 2538@example
2566property, including a face name, a list of face names, or a 2539;; Remap the `escape-glyph' face into a combination
2567face-attribute property list. The attributes given by @var{specs} 2540;; of the `highlight' and `italic' faces:
2568will be merged with any other currently active face remappings of 2541(face-remap-add-relative 'escape-glyph 'highlight 'italic)
2569@var{face}, and with the global definition of @var{face} (by default; 2542
2570this may be changed using @code{face-remap-set-base}), with the most 2543;; Increase the size of the `default' face by 50%:
2571recently added relative remapping taking precedence. 2544(face-remap-add-relative 'default :height 1.5)
2545@end example
2572@end defun 2546@end defun
2573 2547
2574@defun face-remap-remove-relative cookie 2548@defun face-remap-remove-relative cookie
2575This function removes a face remapping previously added by 2549This function removes a relative remapping previously added by
2576@code{face-remap-add-relative}. @var{cookie} should be a return value 2550@code{face-remap-add-relative}. @var{cookie} should be the Lisp
2577from that function. 2551object returned by @code{face-remap-add-relative} when the remapping
2552was added.
2578@end defun 2553@end defun
2579 2554
2580@defun face-remap-set-base face &rest specs 2555@defun face-remap-set-base face &rest specs
2581This function sets the ``base remapping'' of @var{face} in the current 2556This function sets the base remapping of @var{face} in the current
2582buffer to @var{specs}. If @var{specs} is empty, the default base 2557buffer to @var{specs}. If @var{specs} is empty, the default base
2583remapping is restored, which inherits from the global definition of 2558remapping is restored, similar to calling @code{face-remap-reset-base}
2584@var{face}; note that this is different from @var{specs} containing a 2559(see below); note that this is different from @var{specs} containing a
2585single value @code{nil}, which has the opposite result (the global 2560single value @code{nil}, which has the opposite result (the global
2586definition of @var{face} is ignored). 2561definition of @var{face} is ignored).
2562
2563This overwrites the default @var{base-spec}, which inherits the global
2564face definition, so it is up to the caller to add such inheritance if
2565so desired.
2587@end defun 2566@end defun
2588 2567
2589@defun face-remap-reset-base face 2568@defun face-remap-reset-base face
2590This function sets the ``base remapping'' of @var{face} to its default 2569This function sets the base remapping of @var{face} to its default
2591value, which inherits from @var{face}'s global definition. 2570value, which inherits from @var{face}'s global definition.
2592@end defun 2571@end defun
2593 2572
@@ -2596,29 +2575,8 @@ value, which inherits from @var{face}'s global definition.
2596 2575
2597 Here are additional functions for creating and working with faces. 2576 Here are additional functions for creating and working with faces.
2598 2577
2599@defun make-face name
2600This function defines a new face named @var{name}, initially with all
2601attributes @code{nil}. It does nothing if there is already a face named
2602@var{name}.
2603@end defun
2604
2605@defun face-list 2578@defun face-list
2606This function returns a list of all defined faces. 2579This function returns a list of all defined face names.
2607@end defun
2608
2609@defun copy-face old-face new-name &optional frame new-frame
2610This function defines a face named @var{new-name} as a copy of the existing
2611face named @var{old-face}. It creates the face @var{new-name} if that
2612doesn't already exist.
2613
2614If the optional argument @var{frame} is given, this function applies
2615only to that frame. Otherwise it applies to each frame individually,
2616copying attributes from @var{old-face} in each frame to @var{new-face}
2617in the same frame.
2618
2619If the optional argument @var{new-frame} is given, then @code{copy-face}
2620copies the attributes of @var{old-face} in @var{frame} to @var{new-name}
2621in @var{new-frame}.
2622@end defun 2580@end defun
2623 2581
2624@defun face-id face 2582@defun face-id face
@@ -2752,7 +2710,7 @@ these are used for messages in @samp{*Compilation*} buffers.
2752@node Font Selection 2710@node Font Selection
2753@subsection Font Selection 2711@subsection Font Selection
2754 2712
2755 Before Emacs can draw a character on a particular display, it must 2713 Before Emacs can draw a character on a graphical display, it must
2756select a @dfn{font} for that character@footnote{In this context, the 2714select a @dfn{font} for that character@footnote{In this context, the
2757term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock 2715term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock
2758Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally, 2716Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally,
@@ -3245,9 +3203,9 @@ consecutive wildcards in the XLFD are folded into one.
3245@section Fringes 3203@section Fringes
3246@cindex fringes 3204@cindex fringes
3247 3205
3248 The @dfn{fringes} of a window are thin vertical strips down the 3206 On graphical displays, Emacs draws @dfn{fringes} next to each
3249sides that are used for displaying bitmaps that indicate truncation, 3207window: thin vertical strips down the sides which can display bitmaps
3250continuation, horizontal scrolling, and the overlay arrow. 3208indicating truncation, continuation, horizontal scrolling, and so on.
3251 3209
3252@menu 3210@menu
3253* Fringe Size/Pos:: Specifying where to put the window fringes. 3211* Fringe Size/Pos:: Specifying where to put the window fringes.
@@ -3262,7 +3220,7 @@ continuation, horizontal scrolling, and the overlay arrow.
3262@subsection Fringe Size and Position 3220@subsection Fringe Size and Position
3263 3221
3264 The following buffer-local variables control the position and width 3222 The following buffer-local variables control the position and width
3265of the window fringes. 3223of fringes in windows showing that buffer.
3266 3224
3267@defvar fringes-outside-margins 3225@defvar fringes-outside-margins
3268The fringes normally appear between the display margins and the window 3226The fringes normally appear between the display margins and the window
@@ -3282,12 +3240,17 @@ fringe in pixels. A value of @code{nil} means to use the right fringe
3282width from the window's frame. 3240width from the window's frame.
3283@end defvar 3241@end defvar
3284 3242
3285 The values of these variables take effect when you display the 3243 Any buffer which does not specify values for these variables uses
3286buffer in a window. If you change them while the buffer is visible, 3244the values specified by the @code{left-fringe} and @code{right-fringe}
3287you can call @code{set-window-buffer} to display it once again in the 3245frame parameters (@pxref{Layout Parameters}).
3288same window, to make the changes take effect. A buffer that does not 3246
3289specify values for these variables will use the default values 3247 The above variables actually take effect via the function
3290specified for the frame; see @ref{Layout Parameters}. 3248@code{set-window-buffer} (@pxref{Buffers and Windows}), which calls
3249@code{set-window-fringes} as a subroutine. If you change one of these
3250variables, the fringe display is not updated in existing windows
3251showing the buffer, unless you call @code{set-window-buffer} again in
3252each affected window. You can also use @code{set-window-fringes} to
3253control the fringe display in individual windows.
3291 3254
3292@defun set-window-fringes window left &optional right outside-margins 3255@defun set-window-fringes window left &optional right outside-margins
3293This function sets the fringe widths of window @var{window}. 3256This function sets the fringe widths of window @var{window}.
@@ -3313,9 +3276,9 @@ window is used. The value has the form @code{(@var{left-width}
3313@cindex fringe indicators 3276@cindex fringe indicators
3314@cindex indicators, fringe 3277@cindex indicators, fringe
3315 3278
3316 The @dfn{fringe indicators} are tiny icons Emacs displays in the 3279 @dfn{Fringe indicators} are tiny icons displayed in the window
3317window fringe (on a graphic display) to indicate truncated or 3280fringe to indicate truncated or continued lines, buffer boundaries,
3318continued lines, buffer boundaries, overlay arrow, etc. 3281etc.
3319 3282
3320@defopt indicate-empty-lines 3283@defopt indicate-empty-lines
3321@cindex fringes, and empty line indication 3284@cindex fringes, and empty line indication
@@ -3487,21 +3450,15 @@ characters appearing in the line (@pxref{Other Display Specs}). Such
3487a display specification has the form 3450a display specification has the form
3488 3451
3489@example 3452@example
3490(left-fringe @var{bitmap} [@var{face}]) 3453(@var{fringe} @var{bitmap} [@var{face}])
3491@end example
3492
3493@noindent
3494or
3495
3496@example
3497(right-fringe @var{bitmap} [@var{face}])
3498@end example 3454@end example
3499 3455
3500@noindent 3456@noindent
3501The symbol @var{bitmap} identifies the bitmap to display. The 3457@var{fringe} is either the symbol @code{left-fringe} or
3502optional @var{face} names a face whose foreground color is used to 3458@code{right-fringe}. @var{bitmap} is a symbol identifying the bitmap
3503display the bitmap; this face is automatically merged with the 3459to display. The optional @var{face} names a face whose foreground
3504@code{fringe} face. 3460color is used to display the bitmap; this face is automatically merged
3461with the @code{fringe} face.
3505 3462
3506 Here is a list of the standard fringe bitmaps defined in Emacs, and 3463 Here is a list of the standard fringe bitmaps defined in Emacs, and
3507how they are currently used in Emacs (via 3464how they are currently used in Emacs (via
@@ -3749,7 +3706,7 @@ to use the value specified by the frame.
3749@kindex display @r{(text property)} 3706@kindex display @r{(text property)}
3750 3707
3751 The @code{display} text property (or overlay property) is used to 3708 The @code{display} text property (or overlay property) is used to
3752insert images into text, and also control other aspects of how text 3709insert images into text, and to control other aspects of how text
3753displays. The value of the @code{display} property should be a 3710displays. The value of the @code{display} property should be a
3754display specification, or a list or vector containing several display 3711display specification, or a list or vector containing several display
3755specifications. Display specifications in the same @code{display} 3712specifications. Display specifications in the same @code{display}
@@ -3775,8 +3732,8 @@ display specifications and what they mean.
3775@node Replacing Specs 3732@node Replacing Specs
3776@subsection Display Specs That Replace The Text 3733@subsection Display Specs That Replace The Text
3777 3734
3778 Some kinds of @code{display} specifications specify something to 3735 Some kinds of display specifications specify something to display
3779display instead of the text that has the property. These are called 3736instead of the text that has the property. These are called
3780@dfn{replacing} display specifications. Emacs does not allow the user 3737@dfn{replacing} display specifications. Emacs does not allow the user
3781to interactively move point into the middle of buffer text that is 3738to interactively move point into the middle of buffer text that is
3782replaced in this way. 3739replaced in this way.
@@ -3789,47 +3746,34 @@ irrelevant, since those don't apply to the replacement.
3789 For replacing display specifications, ``the text that has the 3746 For replacing display specifications, ``the text that has the
3790property'' means all the consecutive characters that have the same 3747property'' means all the consecutive characters that have the same
3791Lisp object as their @code{display} property; these characters are 3748Lisp object as their @code{display} property; these characters are
3792replaced as a single unit. By contrast, characters that have similar 3749replaced as a single unit. If two characters have different Lisp
3793but distinct Lisp objects as their @code{display} properties are 3750objects as their @code{display} properties (i.e.@: objects which are
3794handled separately. Here's a function that illustrates this point: 3751not @code{eq}), they are handled separately.
3795
3796@smallexample
3797(defun foo ()
3798 (goto-char (point-min))
3799 (dotimes (i 5)
3800 (let ((string (concat "A")))
3801 (put-text-property (point) (1+ (point)) 'display string)
3802 (forward-char 1)
3803 (put-text-property (point) (1+ (point)) 'display string)
3804 (forward-char 1))))
3805@end smallexample
3806 3752
3807@noindent 3753 Here is an example which illustrates this point. A string serves as
3808It gives each of the first ten characters in the buffer string 3754a replacing display specification, which replaces the text that has
3809@code{"A"} as the @code{display} property, but they don't all get the 3755the property with the specified string (@pxref{Other Display Specs}).
3810same string. The first two characters get the same string, so they 3756Consider the following function:
3811together are replaced with one @samp{A}. The next two characters get
3812a second string, so they together are replaced with one @samp{A}.
3813Likewise for each following pair of characters. Thus, the ten
3814characters appear as five A's. This function would have the same
3815results:
3816 3757
3817@smallexample 3758@smallexample
3818(defun foo () 3759(defun foo ()
3819 (goto-char (point-min))
3820 (dotimes (i 5) 3760 (dotimes (i 5)
3821 (let ((string (concat "A"))) 3761 (let ((string (concat "A"))
3822 (put-text-property (point) (+ 2 (point)) 'display string) 3762 (start (+ i i (point-min))))
3823 (put-text-property (point) (1+ (point)) 'display string) 3763 (put-text-property start (1+ start) 'display string)
3824 (forward-char 2)))) 3764 (put-text-property start (+ 2 start) 'display string))))
3825@end smallexample 3765@end smallexample
3826 3766
3827@noindent 3767@noindent
3828This illustrates that what matters is the property value for 3768This function gives each of the first ten characters in the buffer a
3829each character. If two consecutive characters have the same 3769@code{display} property which is a string @code{"A"}, but they don't
3830object as the @code{display} property value, it's irrelevant 3770all get the same string object. The first two characters get the same
3831whether they got this property from a single call to 3771string object, so they are replaced with one @samp{A}; the fact that
3832@code{put-text-property} or from two different calls. 3772the display property was assigned in two separate calls to
3773@code{put-text-property} is irrelevant. Similarly, the next two
3774characters get a second string (@code{concat} creates a new string
3775object), so they are replaced with one @samp{A}; and so on. Thus, the
3776ten characters appear as five A's.
3833 3777
3834@node Specified Space 3778@node Specified Space
3835@subsection Specified Spaces 3779@subsection Specified Spaces
@@ -4991,29 +4935,24 @@ debugging.
4991@cindex buttons in buffers 4935@cindex buttons in buffers
4992@cindex clickable buttons in buffers 4936@cindex clickable buttons in buffers
4993 4937
4994 The @emph{button} package defines functions for inserting and 4938 The Button package defines functions for inserting and manipulating
4995manipulating clickable (with the mouse, or via keyboard commands) 4939@dfn{buttons} that can be activated with the mouse or via keyboard
4996buttons in Emacs buffers, such as might be used for help hyper-links, 4940commands. These buttons are typically used for various kinds of
4997etc. Emacs uses buttons for the hyper-links in help text and the like. 4941hyperlinks.
4998 4942
4999 A button is essentially a set of properties attached (via text 4943 A button is essentially a set of text or overlay properties,
5000properties or overlays) to a region of text in an Emacs buffer. These 4944attached to a stretch of text in a buffer. These properties are
5001properties are called @dfn{button properties}. 4945called @dfn{button properties}. One of these properties, the
5002 4946@dfn{action property}, specifies a function which is called when the
5003 One of these properties (@code{action}) is a function, which will 4947user invokes the button using the keyboard or the mouse. The action
5004be called when the user invokes it using the keyboard or the mouse. 4948function may examine the button and use its other properties as
5005The invoked function may then examine the button and use its other 4949desired.
5006properties as desired. 4950
5007 4951 In some ways, the Button package duplicates the functionality in the
5008 In some ways the Emacs button package duplicates functionality offered 4952Widget package. @xref{Top, , Introduction, widget, The Emacs Widget
5009by the widget package (@pxref{Top, , Introduction, widget, The Emacs 4953Library}. The advantage of the Button package is that it is faster,
5010Widget Library}), but the button package has the advantage that it is 4954smaller, and simpler to program. From the point of view of the user,
5011much faster, much smaller, and much simpler to use (for elisp 4955the interfaces produced by the two packages are very similar.
5012programmers---for users, the result is about the same). The extra
5013speed and space savings are useful mainly if you need to create many
5014buttons in a buffer (for instance an @code{*Apropos*} buffer uses
5015buttons to make entries clickable, and may contain many thousands of
5016entries).
5017 4956
5018@menu 4957@menu
5019* Button Properties:: Button properties with special meanings. 4958* Button Properties:: Button properties with special meanings.
@@ -5027,10 +4966,10 @@ entries).
5027@subsection Button Properties 4966@subsection Button Properties
5028@cindex button properties 4967@cindex button properties
5029 4968
5030 Buttons have an associated list of properties defining their 4969 Each button has an associated list of properties defining its
5031appearance and behavior, and other arbitrary properties may be used 4970appearance and behavior, and other arbitrary properties may be used
5032for application specific purposes. Some properties that have special 4971for application specific purposes. The following properties have
5033meaning to the button package include: 4972special meaning to the Button package:
5034 4973
5035@table @code 4974@table @code
5036@item action 4975@item action
@@ -5066,9 +5005,7 @@ in the variable @code{button-map}, which defines @key{RET} and
5066 5005
5067@item type 5006@item type
5068@kindex type @r{(button property)} 5007@kindex type @r{(button property)}
5069The button-type of the button. When creating a button, this is 5008The button type. @xref{Button Types}.
5070usually specified using the @code{:type} keyword argument.
5071@xref{Button Types}.
5072 5009
5073@item help-echo 5010@item help-echo
5074@kindex help-index @r{(button property)} 5011@kindex help-index @r{(button property)}
@@ -5094,7 +5031,7 @@ button, but these are not generally interesting for typical uses.
5094@subsection Button Types 5031@subsection Button Types
5095@cindex button types 5032@cindex button types
5096 5033
5097 Every button has a button @emph{type}, which defines default values 5034 Every button has a @dfn{button type}, which defines default values
5098for the button's properties. Button types are arranged in a 5035for the button's properties. Button types are arranged in a
5099hierarchy, with specialized types inheriting from more general types, 5036hierarchy, with specialized types inheriting from more general types,
5100so that it's easy to define special-purpose types of buttons for 5037so that it's easy to define special-purpose types of buttons for
@@ -5159,18 +5096,17 @@ This insert a button with the label @var{label} at point,
5159and returns it. 5096and returns it.
5160@end defun 5097@end defun
5161 5098
5162 The following functions are similar, but use Emacs text properties 5099 The following functions are similar, but using text properties
5163(@pxref{Text Properties}) to hold the button properties, making the 5100(@pxref{Text Properties}) to hold the button properties. Such buttons
5164button actually part of the text instead of being a property of the 5101do not add markers to the buffer, so editing in the buffer does not
5165buffer. Buttons using text properties do not create markers into the 5102slow down if there is an extremely large numbers of buttons. However,
5166buffer, which is important for speed when you use extremely large 5103if there is an existing face text property on the text (e.g.@: a face
5167numbers of buttons. (However, if there is an existing face text 5104assigned by Font Lock mode), the button face may not be visible. Both
5168property at the site of the button, the button face may not be visible.) 5105of these functions return the starting position of the new button.
5169Both functions return the position of the start of the new button:
5170 5106
5171@defun make-text-button beg end &rest properties 5107@defun make-text-button beg end &rest properties
5172This makes a button from @var{beg} to @var{end} in the current buffer, using 5108This makes a button from @var{beg} to @var{end} in the current buffer,
5173text properties. 5109using text properties.
5174@end defun 5110@end defun
5175 5111
5176@defun insert-text-button label &rest properties 5112@defun insert-text-button label &rest properties
@@ -5229,7 +5165,9 @@ Return @code{t} if @var{button} has button-type @var{type}, or one of
5229@end defun 5165@end defun
5230 5166
5231@defun button-at pos 5167@defun button-at pos
5232Return the button at position @var{pos} in the current buffer, or @code{nil}. 5168Return the button at position @var{pos} in the current buffer, or
5169@code{nil}. If the button at @var{pos} is a text property button, the
5170return value is a marker pointing to @var{pos}.
5233@end defun 5171@end defun
5234 5172
5235@defun button-type-put type prop val 5173@defun button-type-put type prop val
@@ -5253,12 +5191,12 @@ buttons in an Emacs buffer.
5253 5191
5254@code{push-button} is the command that a user uses to actually `push' 5192@code{push-button} is the command that a user uses to actually `push'
5255a button, and is bound by default in the button itself to @key{RET} 5193a button, and is bound by default in the button itself to @key{RET}
5256and to @key{mouse-2} using a region-specific keymap. Commands 5194and to @key{mouse-2} using a local keymap in the button's overlay or
5257that are useful outside the buttons itself, such as 5195text properties. Commands that are useful outside the buttons itself,
5258@code{forward-button} and @code{backward-button} are additionally 5196such as @code{forward-button} and @code{backward-button} are
5259available in the keymap stored in @code{button-buffer-map}; a mode 5197additionally available in the keymap stored in
5260which uses buttons may want to use @code{button-buffer-map} as a 5198@code{button-buffer-map}; a mode which uses buttons may want to use
5261parent keymap for its keymap. 5199@code{button-buffer-map} as a parent keymap for its keymap.
5262 5200
5263If the button has a non-@code{nil} @code{follow-link} property, and 5201If the button has a non-@code{nil} @code{follow-link} property, and
5264@var{mouse-1-click-follows-link} is set, a quick @key{Mouse-1} click 5202@var{mouse-1-click-follows-link} is set, a quick @key{Mouse-1} click
@@ -5701,70 +5639,111 @@ Here is an example of calling this function explicitly.
5701@end smallexample 5639@end smallexample
5702@end deffn 5640@end deffn
5703 5641
5642@node Character Display
5643@section Character Display
5644
5645@cindex glyph
5646This section describes how characters are actually displayed by Emacs.
5647Typically, a character is displayed as a @dfn{glyph} (a graphical
5648symbol which occupies one character position on the screen), whose
5649appearance corresponds to the character itself. For example, the
5650character @samp{a} (character code 97) is displayed as @samp{a}. Some
5651characters, however, are displayed specially. For example, the
5652formfeed character (character code 12) is usually displayed as a
5653sequence of two glyphs, @samp{^L}, while the newline character
5654(character code 10) starts a new screen line.
5655
5656 You can modify how each character is displayed by defining a
5657@dfn{display table}, which maps each character code into a sequence of
5658glyphs. @xref{Display Tables}. A related feature, called the
5659@dfn{glyph table}, allows you to control how each character is
5660displayed on a text terminal. @xref{Glyphs}.
5661
5662
5663@menu
5664* Usual Display:: The usual conventions for displaying characters.
5665* Display Tables:: What a display table consists of.
5666* Active Display Table:: How Emacs selects a display table to use.
5667* Glyphs:: How to define a glyph, and what glyphs mean.
5668* Glyphless Chars:: How glyphless characters are drawn.
5669@end menu
5670
5704@node Usual Display 5671@node Usual Display
5705@section Usual Display Conventions 5672@subsection Usual Display Conventions
5706 5673
5707 The usual display conventions define how to display each character 5674 Here are the usual conventions for display each character code (in
5708code. You can override these conventions by setting up a display table 5675the absence of a display table, which can override these
5709(@pxref{Display Tables}). Here are the usual display conventions: 5676@iftex
5677conventions).
5678@end iftex
5679@ifnottex
5680conventions; @pxref{Display Tables}).
5681@end ifnottex
5710 5682
5683@cindex printable ASCII characters
5711@itemize @bullet 5684@itemize @bullet
5712@item 5685@item
5713Character codes 32 through 126 map to glyph codes 32 through 126. 5686The @dfn{printable @acronym{ASCII} characters}, character codes 32
5714Normally this means they display as themselves, but a display table 5687through 126 (consisting of numerals, English letters, and symbols like
5715can change that. 5688@samp{#}) are displayed literally, i.e.@: they map onto glyph codes 32
5689through 126.
5716 5690
5717@item 5691@item
5718Character code 9 is a horizontal tab. It displays as whitespace 5692The tab character (character code 9) displays as whitespace stretching
5719up to a position determined by @code{tab-width}. 5693up to the next tab stop column. @xref{Text Display,,, emacs, The GNU
5694Emacs Manual}. The variable @code{tab-width} controls the number of
5695spaces per tab stop (see below).
5720 5696
5721@item 5697@item
5722Character code 10 is a newline. It is normally invisible on display, 5698The newline character (character code 10) has the effect of ending the
5723and has the effect of ending the preceding line and starting a new 5699preceding line and starting a new line.
5724line.
5725 5700
5701@cindex ASCII control characters
5726@item 5702@item
5727All other codes in the range 0 through 31 display in one of two ways 5703The non-printable @dfn{@acronym{ASCII} control characters}---character
5728according to the value of @code{ctl-arrow}. If it is non-@code{nil}, 5704codes 0 through 31, as well as the @key{DEL} character (character code
5729these codes map to sequences of two glyphs, where the first glyph is 5705127)---display in one of two ways according to the variable
5730the @acronym{ASCII} code for @samp{^}. (A display table can specify a 5706@code{ctl-arrow}. If this variable is non-@code{nil} (the default),
5731glyph to use instead of @samp{^}.) Otherwise, these codes map just 5707these characters are displayed as sequences of two glyphs, where the
5732like the raw bytes in the range 128 to 255 (described below). 5708first glyph is @samp{^} (a display table can specify a glyph to use
5709instead of @samp{^}); e.g.@: the @key{DEL} character is displayed as
5710@samp{^?}.
5711
5712If @code{ctl-arrow} is @code{nil}, these characters are displayed as
5713octal escapes (see below).
5714
5715This rule also applies to carriage return (character code 13), if that
5716character appears in the buffer. But carriage returns usually do not
5717appear in buffer text; they are eliminated as part of end-of-line
5718conversion (@pxref{Coding System Basics}).
5733 5719
5734@cindex octal escapes 5720@cindex octal escapes
5735@item 5721@item
5736Raw bytes (@pxref{Text Representations}) with codes 128 through 255, 5722@dfn{Raw bytes} are non-@acronym{ASCII} characters with codes 128
5737and the @acronym{ASCII} control character with code 127, display as 5723through 255 (@pxref{Text Representations}). These characters display
5738sequences of four glyphs, where the first glyph is the @acronym{ASCII} 5724as @dfn{octal escapes}: sequences of four glyphs, where the first
5739code for @samp{\}, and the others are digit characters representing 5725glyph is the @acronym{ASCII} code for @samp{\}, and the others are
5740the character code in octal. (A display table can specify a glyph to 5726digit characters representing the character code in octal. (A display
5741use instead of @samp{\}.) This is known as the @dfn{octal escape} 5727table can specify a glyph to use instead of @samp{\}.)
5742display.
5743 5728
5744@item 5729@item
5745Non-@acronym{ASCII} character codes above 127 are displayed as 5730Each non-@acronym{ASCII} character with code above 255 is displayed
5746themselves, if the terminal and the available fonts support them. 5731literally, if the terminal supports it. If the terminal does not
5747Characters that are not supported by the terminal, or (on window 5732support it, the character is said to be @dfn{glyphless}, and it is
5748systems) have no fonts available for them, are displayed as a question 5733usually displayed using a placeholder glyph. For example, if a
5749mark or a hex code or an empty box. @xref{Glyphless Chars}, for how 5734graphical terminal has no font for a character, Emacs usually displays
5750to control display of the characters not supported by the terminal or 5735a box containing the character code in hexadecimal. @xref{Glyphless
5751fonts. Display tables can change how a character is displayed, even 5736Chars}.
5752if it is supported.
5753@end itemize 5737@end itemize
5754 5738
5755 The usual display conventions apply even when there is a display 5739 The above display conventions apply even when there is a display
5756table, for any character whose entry in the active display table is 5740table, for any character whose entry in the active display table is
5757@code{nil}. Thus, when you set up a display table, you need only 5741@code{nil}. Thus, when you set up a display table, you need only
5758specify the characters for which you want special behavior. 5742specify the characters for which you want special behavior.
5759 5743
5760 These display rules apply to carriage return (character code 13), when 5744 The following variables affect how certain characters are displayed
5761it appears in the buffer. But that character may not appear in the 5745on the screen. Since they change the number of columns the characters
5762buffer where you expect it, if it was eliminated as part of end-of-line 5746occupy, they also affect the indentation functions. They also affect
5763conversion (@pxref{Coding System Basics}).
5764
5765 These variables affect the way certain characters are displayed on the
5766screen. Since they change the number of columns the characters occupy,
5767they also affect the indentation functions. These variables also affect
5768how the mode line is displayed; if you want to force redisplay of the 5747how the mode line is displayed; if you want to force redisplay of the
5769mode line using the new values, call the function 5748mode line using the new values, call the function
5770@code{force-mode-line-update} (@pxref{Mode Line Format}). 5749@code{force-mode-line-update} (@pxref{Mode Line Format}).
@@ -5787,34 +5766,14 @@ command @code{tab-to-tab-stop}. @xref{Indent Tabs}.
5787@end defopt 5766@end defopt
5788 5767
5789@node Display Tables 5768@node Display Tables
5790@section Display Tables 5769@subsection Display Tables
5791 5770
5792@cindex display table 5771@cindex display table
5793You can use the @dfn{display table} feature to control how all possible 5772 A display table is a special-purpose char-table
5794character codes display on the screen. This is useful for displaying 5773(@pxref{Char-Tables}), with @code{display-table} as its subtype, which
5795European languages that have letters not in the @acronym{ASCII} character 5774is used to override the usual character display conventions. This
5796set. 5775section describes how to make, inspect, and assign elements to a
5797 5776display table object.
5798The display table maps each character code into a sequence of
5799@dfn{glyphs}, each glyph being a graphic that takes up one character
5800position on the screen. You can also define how to display each glyph
5801on your terminal, using the @dfn{glyph table}.
5802
5803Display tables affect how the mode line is displayed; if you want to
5804force redisplay of the mode line using a new display table, call
5805@code{force-mode-line-update} (@pxref{Mode Line Format}).
5806
5807@menu
5808* Display Table Format:: What a display table consists of.
5809* Active Display Table:: How Emacs selects a display table to use.
5810* Glyphs:: How to define a glyph, and what glyphs mean.
5811@end menu
5812
5813@node Display Table Format
5814@subsection Display Table Format
5815
5816 A display table is actually a char-table (@pxref{Char-Tables}) with
5817@code{display-table} as its subtype.
5818 5777
5819@defun make-display-table 5778@defun make-display-table
5820This creates and returns a display table. The table initially has 5779This creates and returns a display table. The table initially has
@@ -5823,10 +5782,10 @@ This creates and returns a display table. The table initially has
5823 5782
5824 The ordinary elements of the display table are indexed by character 5783 The ordinary elements of the display table are indexed by character
5825codes; the element at index @var{c} says how to display the character 5784codes; the element at index @var{c} says how to display the character
5826code @var{c}. The value should be @code{nil} or a vector of the 5785code @var{c}. The value should be @code{nil} (which means to display
5827glyphs to be output (@pxref{Glyphs}). @code{nil} says to display the 5786the character @var{c} according to the usual display conventions;
5828character @var{c} according to the usual display conventions 5787@pxref{Usual Display}), or a vector of glyph codes (which means to
5829(@pxref{Usual Display}). 5788display the character @var{c} as those glyphs; @pxref{Glyphs}).
5830 5789
5831 @strong{Warning:} if you use the display table to change the display 5790 @strong{Warning:} if you use the display table to change the display
5832of newline characters, the whole buffer will be displayed as one long 5791of newline characters, the whole buffer will be displayed as one long
@@ -5871,12 +5830,11 @@ effect of setting @code{ctl-arrow} to a non-@code{nil} value:
5871 5830
5872@example 5831@example
5873(setq disptab (make-display-table)) 5832(setq disptab (make-display-table))
5874(let ((i 0)) 5833(dotimes (i 32)
5875 (while (< i 32) 5834 (or (= i ?\t)
5876 (or (= i ?\t) (= i ?\n) 5835 (= i ?\n)
5877 (aset disptab i (vector ?^ (+ i 64)))) 5836 (aset disptab i (vector ?^ (+ i 64)))))
5878 (setq i (1+ i))) 5837(aset disptab 127 (vector ?^ ??))
5879 (aset disptab 127 (vector ?^ ??)))
5880@end example 5838@end example
5881 5839
5882@defun display-table-slot display-table slot 5840@defun display-table-slot display-table slot
@@ -5909,17 +5867,19 @@ help buffer.
5909@subsection Active Display Table 5867@subsection Active Display Table
5910@cindex active display table 5868@cindex active display table
5911 5869
5912 Each window can specify a display table, and so can each buffer. When 5870 Each window can specify a display table, and so can each buffer.
5913a buffer @var{b} is displayed in window @var{w}, display uses the 5871The window's display table, if there is one, takes precedence over the
5914display table for window @var{w} if it has one; otherwise, the display 5872buffer's display table. If neither exists, Emacs tries to use the
5915table for buffer @var{b} if it has one; otherwise, the standard display 5873standard display table; if that is @code{nil}, Emacs uses the usual
5916table if any. The display table chosen is called the @dfn{active} 5874character display conventions (@pxref{Usual Display}).
5917display table. 5875
5876 Note that display tables affect how the mode line is displayed, so
5877if you want to force redisplay of the mode line using a new display
5878table, call @code{force-mode-line-update} (@pxref{Mode Line Format}).
5918 5879
5919@defun window-display-table &optional window 5880@defun window-display-table &optional window
5920This function returns @var{window}'s display table, or @code{nil} 5881This function returns @var{window}'s display table, or @code{nil} if
5921if @var{window} does not have an assigned display table. The default 5882there is none. The default for @var{window} is the selected window.
5922for @var{window} is the selected window.
5923@end defun 5883@end defun
5924 5884
5925@defun set-window-display-table window table 5885@defun set-window-display-table window table
@@ -5929,39 +5889,29 @@ The argument @var{table} should be either a display table or
5929@end defun 5889@end defun
5930 5890
5931@defvar buffer-display-table 5891@defvar buffer-display-table
5932This variable is automatically buffer-local in all buffers; its value in 5892This variable is automatically buffer-local in all buffers; its value
5933a particular buffer specifies the display table for that buffer. If it 5893specifies the buffer's display table. If it is @code{nil}, there is
5934is @code{nil}, that means the buffer does not have an assigned display 5894no buffer display table.
5935table.
5936@end defvar 5895@end defvar
5937 5896
5938@defvar standard-display-table 5897@defvar standard-display-table
5939This variable's value is the default display table, used whenever a 5898The value of this variable is the standard display table, which is
5940window has no display table and neither does the buffer displayed in 5899used when Emacs is displaying a buffer in a window with neither a
5941that window. This variable is @code{nil} by default. 5900window display table nor a buffer display table defined. Its default
5901is @code{nil}.
5942@end defvar 5902@end defvar
5943 5903
5944 If there is no display table to use for a particular window---that is, 5904The @file{disp-table} library defines several functions for changing
5945if the window specifies none, its buffer specifies none, and 5905the standard display table.
5946@code{standard-display-table} is @code{nil}---then Emacs uses the usual
5947display conventions for all character codes in that window. @xref{Usual
5948Display}.
5949
5950A number of functions for changing the standard display table
5951are defined in the library @file{disp-table}.
5952 5906
5953@node Glyphs 5907@node Glyphs
5954@subsection Glyphs 5908@subsection Glyphs
5955 5909
5956@cindex glyph 5910 A @dfn{glyph} is a graphical symbol which occupies a single
5957 A @dfn{glyph} is a generalization of a character; it stands for an 5911character position on the screen. Each glyph is represented in Lisp
5958image that takes up a single character position on the screen. Normally 5912as a @dfn{glyph code}. A glyph code can be @dfn{simple}, or it can be
5959glyphs come from vectors in the display table (@pxref{Display Tables}). 5913defined by the @dfn{glyph table}. A simple glyph code is just a way
5960 5914of specifying a character and a face to output it in. @xref{Faces}.
5961 A glyph is represented in Lisp as a @dfn{glyph code}. A glyph code
5962can be @dfn{simple} or it can be defined by the @dfn{glyph table}. A
5963simple glyph code is just a way of specifying a character and a face
5964to output it in. @xref{Faces}.
5965 5915
5966 The following functions are used to manipulate simple glyph codes: 5916 The following functions are used to manipulate simple glyph codes:
5967 5917
@@ -6054,6 +6004,99 @@ non-@code{nil}, it takes precedence over the @code{visible-bell}
6054variable. 6004variable.
6055@end defvar 6005@end defvar
6056 6006
6007@node Glyphless Chars
6008@subsection Glyphless Character Display
6009@cindex glyphless characters
6010
6011 @dfn{Glyphless characters} are not displayed in the usual way when
6012they appear in a buffer, but in some special way (e.g. as a box
6013containing a hexadecimal code). These include characters that cannot
6014be displayed with any available font (on a graphical display), or that
6015cannot be encoded by the terminal's coding system (on a text
6016terminal). Specific characters can also be defined to be glyphless.
6017
6018@defvar glyphless-char-display
6019The value of this variable is a char-table that defines glyphless
6020characters and how they are displayed. If an entry is @code{nil}, the
6021corresponding character is displayed in its usual way. Otherwise, an
6022entry should be one of the following display methods:
6023
6024@table @asis
6025@item @code{zero-width}
6026Don't display the character.
6027
6028@item @code{thin-space}
6029Display a thin space, 1-pixel wide on graphical displays, or
60301-character wide on text terminals.
6031
6032@item @code{empty-box}
6033Display an empty box.
6034
6035@item @code{hex-code}
6036Display a box containing the Unicode codepoint of the character, in
6037hexadecimal notation.
6038
6039@item an @acronym{ASCII} string
6040Display a box containing that string.
6041@end table
6042
6043@noindent
6044Except for @code{zero-width}, these methods display using the
6045@code{glyphless-char} face.
6046
6047An entry can also be a cons cell @code{(@var{graphical}
6048. @var{text})}, where @var{graphical} and @var{text} are the display
6049methods on graphical displays and text terminals respectively.
6050
6051The char-table has one extra slot, which determines how to display any
6052character that cannot be displayed with any available font, or cannot
6053be encoded by the terminal's coding system. Its value should be one
6054of the above display methods, except @code{zero-width} or a cons cell.
6055@end defvar
6056
6057@defopt glyphless-char-display-control
6058This user option provides a convenient way to set
6059@code{glyphless-char-display} for groups of similar characters. It
6060takes effect via a custom @code{:set} function (@pxref{Variable
6061Definitions}), which update @code{glyphless-char-display}.
6062
6063Its value should be an alist of elements @code{(@var{group}
6064. @var{method})}, where @var{group} is a symbol specifying a group of
6065characters, and @var{method} is a symbol specifying how to display
6066them.
6067
6068@var{group} should be one of the following:
6069
6070@table @code
6071@item c0-control
6072@acronym{ASCII} control characters @code{U+0000} to @code{U+001F},
6073excluding the newline and tab characters (normally displayed as escape
6074sequences like @samp{^A}; @pxref{Text Display,, How Text Is Displayed,
6075emacs, The GNU Emacs Manual}).
6076
6077@item c1-control
6078Non-@acronym{ASCII}, non-printing characters @code{U+0080} to
6079@code{U+009F} (normally displayed as octal escape sequences like
6080@samp{\230}).
6081
6082@item format-control
6083Characters of Unicode General Category `Cf', such as @samp{U+200E}
6084(Left-to-Right Mark), but excluding characters that have graphic
6085images, such as @samp{U+00AD} (Soft Hyphen).
6086
6087@item no-font
6088Characters for there is no suitable font, or which cannot be encoded
6089by the terminal's coding system.
6090@end table
6091
6092@c FIXME: this can also be `acronym', but that's not currently
6093@c completely implemented; it applies only to the format-control
6094@c group, and only works if the acronym is in `char-acronym-table'.
6095The @var{method} symbol should be one of @code{zero-width},
6096@code{thin-space}, @code{empty-box}, or @code{hex-code}. These have
6097the same meanings as in @code{glyphless-char-display}, above.
6098@end defopt
6099
6057@node Window Systems 6100@node Window Systems
6058@section Window Systems 6101@section Window Systems
6059 6102
@@ -6329,96 +6372,3 @@ affect all Emacs frames and windows.
6329appropriate mirrored character in the reordered text. Lisp programs 6372appropriate mirrored character in the reordered text. Lisp programs
6330can affect the mirrored display by changing this property. Again, any 6373can affect the mirrored display by changing this property. Again, any
6331such changes affect all of Emacs display. 6374such changes affect all of Emacs display.
6332
6333@node Glyphless Chars
6334@section Glyphless Character Display
6335@cindex glyphless characters
6336
6337 @dfn{Glyphless characters} are not displayed in the usual way when
6338they appear in a buffer, but in some special way (e.g. as a box
6339containing a hexadecimal code). These include characters that cannot
6340be displayed with any available font (on a graphical display), or that
6341cannot be encoded by the terminal's coding system (on a text
6342terminal). Specific characters can also be defined to be glyphless.
6343
6344@defvar glyphless-char-display
6345The value of this variable is a char-table that defines glyphless
6346characters and how they are displayed. If an entry is @code{nil}, the
6347corresponding character is displayed in its usual way. Otherwise, an
6348entry should be one of the following display methods:
6349
6350@table @asis
6351@item @code{zero-width}
6352Don't display the character.
6353
6354@item @code{thin-space}
6355Display a thin space, 1-pixel wide on graphical displays, or
63561-character wide on text terminals.
6357
6358@item @code{empty-box}
6359Display an empty box.
6360
6361@item @code{hex-code}
6362Display a box containing the Unicode codepoint of the character, in
6363hexadecimal notation.
6364
6365@item an @acronym{ASCII} string
6366Display a box containing that string.
6367@end table
6368
6369@noindent
6370Except for @code{zero-width}, these methods display using the
6371@code{glyphless-char} face.
6372
6373An entry can also be a cons cell @code{(@var{graphical}
6374. @var{text})}, where @var{graphical} and @var{text} are the display
6375methods on graphical displays and text terminals respectively.
6376
6377The char-table has one extra slot, which determines how to display any
6378character that cannot be displayed with any available font, or cannot
6379be encoded by the terminal's coding system. Its value should be one
6380of the above display methods, except @code{zero-width} or a cons cell.
6381@end defvar
6382
6383@defopt glyphless-char-display-control
6384This user option provides a convenient way to set
6385@code{glyphless-char-display} for groups of similar characters. It
6386takes effect via a custom @code{:set} function (@pxref{Variable
6387Definitions}), which update @code{glyphless-char-display}.
6388
6389Its value should be an alist of elements @code{(@var{group}
6390. @var{method})}, where @var{group} is a symbol specifying a group of
6391characters, and @var{method} is a symbol specifying how to display
6392them.
6393
6394@var{group} should be one of the following:
6395
6396@table @code
6397@item c0-control
6398@acronym{ASCII} control characters @code{U+0000} to @code{U+001F},
6399excluding the newline and tab characters (normally displayed as escape
6400sequences like @samp{^A}; @pxref{Text Display,, How Text Is Displayed,
6401emacs, The GNU Emacs Manual}).
6402
6403@item c1-control
6404Non-@acronym{ASCII}, non-printing characters @code{U+0080} to
6405@code{U+009F} (normally displayed as octal escape sequences like
6406@samp{\230}).
6407
6408@item format-control
6409Characters of Unicode General Category `Cf', such as @samp{U+200E}
6410(Left-to-Right Mark), but excluding characters that have graphic
6411images, such as @samp{U+00AD} (Soft Hyphen).
6412
6413@item no-font
6414Characters for there is no suitable font, or which cannot be encoded
6415by the terminal's coding system.
6416@end table
6417
6418@c FIXME: this can also be `acronym', but that's not currently
6419@c completely implemented; it applies only to the format-control
6420@c group, and only works if the acronym is in `char-acronym-table'.
6421The @var{method} symbol should be one of @code{zero-width},
6422@code{thin-space}, @code{empty-box}, or @code{hex-code}. These have
6423the same meanings as in @code{glyphless-char-display}, above.
6424@end defopt
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index ea304292497..e3a92d42460 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1265,14 +1265,11 @@ Emacs Display
1265* Buttons:: Adding clickable buttons to Emacs buffers. 1265* Buttons:: Adding clickable buttons to Emacs buffers.
1266* Abstract Display:: Emacs's Widget for Object Collections. 1266* Abstract Display:: Emacs's Widget for Object Collections.
1267* Blinking:: How Emacs shows the matching open parenthesis. 1267* Blinking:: How Emacs shows the matching open parenthesis.
1268* Usual Display:: The usual conventions for displaying 1268* Character Display:: How Emacs displays individual characters.
1269 nonprinting chars.
1270* Display Tables:: How to specify other conventions.
1271* Beeping:: Audible signal to the user. 1269* Beeping:: Audible signal to the user.
1272* Window Systems:: Which window system is being used. 1270* Window Systems:: Which window system is being used.
1273* Bidirectional Display:: Display of bidirectional scripts, such as 1271* Bidirectional Display:: Display of bidirectional scripts, such as
1274 Arabic and Farsi. 1272 Arabic and Farsi.
1275* Glyphless Chars:: How glyphless characters are drawn.
1276 1273
1277The Echo Area 1274The Echo Area
1278 1275
@@ -1361,11 +1358,13 @@ Abstract Display
1361* Abstract Display Functions:: Functions in the Ewoc package. 1358* Abstract Display Functions:: Functions in the Ewoc package.
1362* Abstract Display Example:: Example of using Ewoc. 1359* Abstract Display Example:: Example of using Ewoc.
1363 1360
1364Display Tables 1361Character Display
1365 1362
1366* Display Table Format:: What a display table consists of. 1363* Usual Display:: The usual conventions for displaying characters.
1367* Active Display Table:: How Emacs selects a display table to use. 1364* Display Tables:: What a display table consists of.
1368* Glyphs:: How to define a glyph, and what glyphs mean. 1365* Active Display Table:: How Emacs selects a display table to use.
1366* Glyphs:: How to define a glyph, and what glyphs mean.
1367* Glyphless Chars:: How glyphless characters are drawn.
1369 1368
1370Operating System Interface 1369Operating System Interface
1371 1370
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 64d0986493a..7813283ade5 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -508,6 +508,13 @@ are used.
508@code{string-lessp} is another name for @code{string<}. 508@code{string-lessp} is another name for @code{string<}.
509@end defun 509@end defun
510 510
511@defun string-prefix-p string1 string2 &optional ignore-case
512This function returns non-@code{nil} if @var{string1} is a prefix of
513@var{string2}; i.e., if @var{string2} starts with @var{string1}. If
514the optional argument @var{ignore-case} is non-@code{nil}, the
515comparison ignores case differences.
516@end defun
517
511@defun compare-strings string1 start1 end1 string2 start2 end2 &optional ignore-case 518@defun compare-strings string1 start1 end1 string2 start2 end2 &optional ignore-case
512This function compares the specified part of @var{string1} with the 519This function compares the specified part of @var{string1} with the
513specified part of @var{string2}. The specified part of @var{string1} 520specified part of @var{string2}. The specified part of @var{string1}
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 58092f23157..f2cbb18af1c 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -1287,14 +1287,11 @@ Emacs Display
1287* Buttons:: Adding clickable buttons to Emacs buffers. 1287* Buttons:: Adding clickable buttons to Emacs buffers.
1288* Abstract Display:: Emacs's Widget for Object Collections. 1288* Abstract Display:: Emacs's Widget for Object Collections.
1289* Blinking:: How Emacs shows the matching open parenthesis. 1289* Blinking:: How Emacs shows the matching open parenthesis.
1290* Usual Display:: The usual conventions for displaying 1290* Character Display:: How Emacs displays individual characters.
1291 nonprinting chars.
1292* Display Tables:: How to specify other conventions.
1293* Beeping:: Audible signal to the user. 1291* Beeping:: Audible signal to the user.
1294* Window Systems:: Which window system is being used. 1292* Window Systems:: Which window system is being used.
1295* Bidirectional Display:: Display of bidirectional scripts, such as 1293* Bidirectional Display:: Display of bidirectional scripts, such as
1296 Arabic and Farsi. 1294 Arabic and Farsi.
1297* Glyphless Chars:: How glyphless characters are drawn.
1298 1295
1299The Echo Area 1296The Echo Area
1300 1297
@@ -1383,11 +1380,13 @@ Abstract Display
1383* Abstract Display Functions:: Functions in the Ewoc package. 1380* Abstract Display Functions:: Functions in the Ewoc package.
1384* Abstract Display Example:: Example of using Ewoc. 1381* Abstract Display Example:: Example of using Ewoc.
1385 1382
1386Display Tables 1383Character Display
1387 1384
1388* Display Table Format:: What a display table consists of. 1385* Usual Display:: The usual conventions for displaying characters.
1389* Active Display Table:: How Emacs selects a display table to use. 1386* Display Tables:: What a display table consists of.
1390* Glyphs:: How to define a glyph, and what glyphs mean. 1387* Active Display Table:: How Emacs selects a display table to use.
1388* Glyphs:: How to define a glyph, and what glyphs mean.
1389* Glyphless Chars:: How glyphless characters are drawn.
1391 1390
1392Operating System Interface 1391Operating System Interface
1393 1392
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index a42b70d77a4..837fcbe7f59 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -1286,14 +1286,11 @@ Emacs Display
1286* Buttons:: Adding clickable buttons to Emacs buffers. 1286* Buttons:: Adding clickable buttons to Emacs buffers.
1287* Abstract Display:: Emacs's Widget for Object Collections. 1287* Abstract Display:: Emacs's Widget for Object Collections.
1288* Blinking:: How Emacs shows the matching open parenthesis. 1288* Blinking:: How Emacs shows the matching open parenthesis.
1289* Usual Display:: The usual conventions for displaying 1289* Character Display:: How Emacs displays individual characters.
1290 nonprinting chars.
1291* Display Tables:: How to specify other conventions.
1292* Beeping:: Audible signal to the user. 1290* Beeping:: Audible signal to the user.
1293* Window Systems:: Which window system is being used. 1291* Window Systems:: Which window system is being used.
1294* Bidirectional Display:: Display of bidirectional scripts, such as 1292* Bidirectional Display:: Display of bidirectional scripts, such as
1295 Arabic and Farsi. 1293 Arabic and Farsi.
1296* Glyphless Chars:: How glyphless characters are drawn.
1297 1294
1298The Echo Area 1295The Echo Area
1299 1296
@@ -1382,11 +1379,13 @@ Abstract Display
1382* Abstract Display Functions:: Functions in the Ewoc package. 1379* Abstract Display Functions:: Functions in the Ewoc package.
1383* Abstract Display Example:: Example of using Ewoc. 1380* Abstract Display Example:: Example of using Ewoc.
1384 1381
1385Display Tables 1382Character Display
1386 1383
1387* Display Table Format:: What a display table consists of. 1384* Usual Display:: The usual conventions for displaying characters.
1388* Active Display Table:: How Emacs selects a display table to use. 1385* Display Tables:: What a display table consists of.
1389* Glyphs:: How to define a glyph, and what glyphs mean. 1386* Active Display Table:: How Emacs selects a display table to use.
1387* Glyphs:: How to define a glyph, and what glyphs mean.
1388* Glyphless Chars:: How glyphless characters are drawn.
1390 1389
1391Operating System Interface 1390Operating System Interface
1392 1391
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index c95aaa9b15d..8d40ab5ab15 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12012-03-22 Peder O. Klingenberg <peder@klingenberg.no> (tiny change)
2
3 * gnus.texi (Archived Messages): Update `gnus-message-archive-group' to
4 reflect the new default.
5
12012-03-10 Eli Zaretskii <eliz@gnu.org> 62012-03-10 Eli Zaretskii <eliz@gnu.org>
2 7
3 * info.texi (Expert Info): Move the index entry for "Texinfo" from 8 * info.texi (Expert Info): Move the index entry for "Texinfo" from
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index c3b62f3b791..9e440be6585 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -12526,8 +12526,8 @@ mode buffers.
12526Gnus provides a few different methods for storing the mail and news you 12526Gnus provides a few different methods for storing the mail and news you
12527send. The default method is to use the @dfn{archive virtual server} to 12527send. The default method is to use the @dfn{archive virtual server} to
12528store the messages. If you want to disable this completely, the 12528store the messages. If you want to disable this completely, the
12529@code{gnus-message-archive-group} variable should be @code{nil}, which 12529@code{gnus-message-archive-group} variable should be @code{nil}. The
12530is the default. 12530default is "sent.%Y-%m", which gives you one archive group per month.
12531 12531
12532For archiving interesting messages in a group you read, see the 12532For archiving interesting messages in a group you read, see the
12533@kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail 12533@kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail