aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-03-21 15:02:13 +0800
committerChong Yidong2012-03-21 15:02:13 +0800
commitfb5b8aca9928223c3fef042f1de4b50cd08fde43 (patch)
treeb1da6f261d64e95a4bbdf0566157c3919185adb2
parentdc9924b8bd30e0f3f43b552070f6cac5c11942f7 (diff)
downloademacs-fb5b8aca9928223c3fef042f1de4b50cd08fde43.tar.gz
emacs-fb5b8aca9928223c3fef042f1de4b50cd08fde43.zip
Updates to Display chapter of Lisp manual.
* doc/lispref/display.texi (The Echo Area): Add xref to Output Streams. (Displaying Messages): Improve doc of message. (Echo Area Customization, Invisible Text): Copyedits. (Invisible Text): Mention that spec comparison is done with eq. (Width): Improve doc of char-width. (Faces): Recommend using symbol instead of string for face name. Minor clarifications. (Defining Faces): Copyedits. Update face example. (Attribute Functions): Mark set-face-foreground etc as commands. (Face Remapping): Mention text-scale-adjust. Clarify face-remapping-alist and related docs. (Face Functions): Don't document make-face or copy-face. * lisp/faces.el (make-face, make-empty-face, copy-face): * lisp/face-remap.el (face-remap-add-relative, face-remap-set-base): Doc fixes. * src/xfaces.c (Vface_remapping_alist): Doc fix.
-rw-r--r--doc/lispref/ChangeLog15
-rw-r--r--doc/lispref/display.texi407
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/face-remap.el42
-rw-r--r--lisp/faces.el47
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xfaces.c36
8 files changed, 276 insertions, 283 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 43ae349cb4c..77468f562c6 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,18 @@
12012-03-21 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (The Echo Area): Add xref to Output Streams.
4 (Displaying Messages): Improve doc of message.
5 (Echo Area Customization, Invisible Text): Copyedits.
6 (Invisible Text): Mention that spec comparison is done with eq.
7 (Width): Improve doc of char-width.
8 (Faces): Recommend using symbol instead of string for face name.
9 Minor clarifications.
10 (Defining Faces): Copyedits. Update face example.
11 (Attribute Functions): Mark set-face-foreground etc as commands.
12 (Face Remapping): Mention text-scale-adjust. Clarify
13 face-remapping-alist and related docs.
14 (Face Functions): Don't document make-face or copy-face.
15
12012-03-20 Chong Yidong <cyd@gnu.org> 162012-03-20 Chong Yidong <cyd@gnu.org>
2 17
3 * display.texi (Forcing Redisplay): Various rewrites to reflect 18 * display.texi (Forcing Redisplay): Various rewrites to reflect
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b68b0697936..dbcc1d1190b 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -243,14 +243,12 @@ This variable is automatically buffer-local in every buffer.
243(@pxref{Errors}), for messages made with the @code{message} primitive, 243(@pxref{Errors}), for messages made with the @code{message} primitive,
244and for echoing keystrokes. It is not the same as the minibuffer, 244and for echoing keystrokes. It is not the same as the minibuffer,
245despite the fact that the minibuffer appears (when active) in the same 245despite the fact that the minibuffer appears (when active) in the same
246place on the screen as the echo area. The @cite{GNU Emacs Manual} 246place on the screen as the echo area. @xref{Minibuffer,, The
247specifies the rules for resolving conflicts between the echo area and 247Minibuffer, emacs, The GNU Emacs Manual}.
248the minibuffer for use of that screen space (@pxref{Minibuffer,, The
249Minibuffer, emacs, The GNU Emacs Manual}).
250 248
251 You can write output in the echo area by using the Lisp printing 249 Apart from the functions documented in this section, you can print
252functions with @code{t} as the stream (@pxref{Output Functions}), or 250Lisp objects to the echo area by specifying @code{t} as the output
253explicitly. 251stream. @xref{Output Streams}.
254 252
255@menu 253@menu
256* Displaying Messages:: Explicitly displaying text in the echo area. 254* Displaying Messages:: Explicitly displaying text in the echo area.
@@ -263,27 +261,26 @@ explicitly.
263@subsection Displaying Messages in the Echo Area 261@subsection Displaying Messages in the Echo Area
264@cindex display message in echo area 262@cindex display message in echo area
265 263
266 This section describes the functions for explicitly producing echo 264 This section describes the standard functions for displaying
267area messages. Many other Emacs features display messages there, too. 265messages in the echo area.
268 266
269@defun message format-string &rest arguments 267@defun message format-string &rest arguments
270This function displays a message in the echo area. The argument 268This function displays a message in the echo area.
271@var{format-string} is similar to a C language @code{printf} format 269@var{format-string} is a format string, and @var{arguments} are the
272string. See @code{format} in @ref{Formatting Strings}, for the details 270objects for its format specifications, like in the @code{format}
273on the conversion specifications. @code{message} returns the 271function (@pxref{Formatting Strings}). The resulting formatted string
274constructed string. 272is displayed in the echo area; if it contains @code{face} text
273properties, it is displayed with the specified faces (@pxref{Faces}).
274The string is also added to the @samp{*Messages*} buffer, but without
275text properties (@pxref{Logging Messages}).
276
277In batch mode, the message is printed to the standard error stream,
278followed by a newline.
275 279
276In batch mode, @code{message} prints the message text on the standard
277error stream, followed by a newline.
278
279If @var{format-string}, or strings among the @var{arguments}, have
280@code{face} text properties, these affect the way the message is displayed.
281
282@c Emacs 19 feature
283If @var{format-string} is @code{nil} or the empty string, 280If @var{format-string} is @code{nil} or the empty string,
284@code{message} clears the echo area; if the echo area has been 281@code{message} clears the echo area; if the echo area has been
285expanded automatically, this brings it back to its normal size. 282expanded automatically, this brings it back to its normal size. If
286If the minibuffer is active, this brings the minibuffer contents back 283the minibuffer is active, this brings the minibuffer contents back
287onto the screen immediately. 284onto the screen immediately.
288 285
289@example 286@example
@@ -559,13 +556,13 @@ If the value is zero, then command input is not echoed.
559Normally, displaying a long message resizes the echo area to display 556Normally, displaying a long message resizes the echo area to display
560the entire message. But if the variable @code{message-truncate-lines} 557the entire message. But if the variable @code{message-truncate-lines}
561is non-@code{nil}, the echo area does not resize, and the message is 558is non-@code{nil}, the echo area does not resize, and the message is
562truncated to fit it, as in Emacs 20 and before. 559truncated to fit it.
563@end defvar 560@end defvar
564 561
565 The variable @code{max-mini-window-height}, which specifies the 562 The variable @code{max-mini-window-height}, which specifies the
566maximum height for resizing minibuffer windows, also applies to the 563maximum height for resizing minibuffer windows, also applies to the
567echo area (which is really a special use of the minibuffer window. 564echo area (which is really a special use of the minibuffer window;
568@xref{Minibuffer Misc}.). 565@pxref{Minibuffer Misc}).
569 566
570@node Warnings 567@node Warnings
571@section Reporting Warnings 568@section Reporting Warnings
@@ -762,10 +759,11 @@ that warning is not logged.
762@cindex invisible text 759@cindex invisible text
763You can make characters @dfn{invisible}, so that they do not appear on 760You can make characters @dfn{invisible}, so that they do not appear on
764the screen, with the @code{invisible} property. This can be either a 761the screen, with the @code{invisible} property. This can be either a
765text property (@pxref{Text Properties}) or a property of an overlay 762text property (@pxref{Text Properties}) or an overlay property
766(@pxref{Overlays}). Cursor motion also partly ignores these 763(@pxref{Overlays}). Cursor motion also partly ignores these
767characters; if the command loop finds point within them, it moves 764characters; if the command loop finds that point is inside a range of
768point to the other side of them. 765invisible text after a command, it relocates point to the other side
766of the text.
769 767
770In the simplest case, any non-@code{nil} @code{invisible} property makes 768In the simplest case, any non-@code{nil} @code{invisible} property makes
771a character invisible. This is the default case---if you don't alter 769a character invisible. This is the default case---if you don't alter
@@ -805,13 +803,15 @@ the character is invisible. The list can have two kinds of elements:
805 803
806@table @code 804@table @code
807@item @var{atom} 805@item @var{atom}
808A character is invisible if its @code{invisible} property value 806A 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. 807@var{atom} or if it is a list with @var{atom} as a member; comparison
808is done with @code{eq}.
810 809
811@item (@var{atom} . t) 810@item (@var{atom} . t)
812A character is invisible if its @code{invisible} property value is 811A 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, 812@var{atom} or if it is a list with @var{atom} as a member; comparison
814a sequence of such characters displays as an ellipsis. 813is done with @code{eq}. Moreover, a sequence of such characters
814displays as an ellipsis.
815@end table 815@end table
816@end table 816@end table
817@end defvar 817@end defvar
@@ -846,7 +846,7 @@ major mode should use the mode's own name as an element of
846(overlay-put (make-overlay beginning end) 846(overlay-put (make-overlay beginning end)
847 'invisible 'my-symbol) 847 'invisible 'my-symbol)
848 848
849;; @r{When done with the overlays:} 849;; @r{When done with the invisibility:}
850(remove-from-invisibility-spec '(my-symbol . t)) 850(remove-from-invisibility-spec '(my-symbol . t))
851;; @r{Or respectively:} 851;; @r{Or respectively:}
852(remove-from-invisibility-spec 'my-symbol) 852(remove-from-invisibility-spec 'my-symbol)
@@ -872,15 +872,16 @@ ignore invisible newlines if @code{line-move-ignore-invisible} is
872non-@code{nil} (the default), but only because they are explicitly 872non-@code{nil} (the default), but only because they are explicitly
873programmed to do so. 873programmed to do so.
874 874
875 However, if a command ends with point inside or at the boundary of invisible 875 However, if a command ends with point inside or at the boundary of
876text, the main editing loop moves point to one of the two ends of the invisible 876invisible text, the main editing loop relocates point to one of the
877text. Which end to move to is chosen based on the following factors: make sure 877two ends of the invisible text. Emacs chooses the direction of
878that the overall movement of the command is still in the same direction, and 878relocation so that it is the same as the overall movement direction of
879prefer a position where an inserted char would not inherit the @code{invisible} 879the command; if in doubt, it prefers a position where an inserted char
880property. Additionally, if the text is not replaced by an ellipsis and the 880would not inherit the @code{invisible} property. Additionally, if the
881command only moved within the invisible text, then point is moved one extra 881text is not replaced by an ellipsis and the command only moved within
882character so as to try and reflect the command's movement by a visible movement 882the invisible text, then point is moved one extra character so as to
883of the cursor. 883try and reflect the command's movement by a visible movement of the
884cursor.
884 885
885 Thus, if the command moved point back to an invisible range (with the usual 886 Thus, if the command moved point back to an invisible range (with the usual
886stickiness), Emacs moves point back to the beginning of that range. If the 887stickiness), Emacs moves point back to the beginning of that range. If the
@@ -1666,8 +1667,11 @@ check the width of a character. @xref{Primitive Indent}, and
1666@ref{Screen Lines}, for related functions. 1667@ref{Screen Lines}, for related functions.
1667 1668
1668@defun char-width char 1669@defun char-width char
1669This function returns the width in columns of the character @var{char}, 1670This function returns the width in columns of the character
1670if it were displayed in the current buffer and the selected window. 1671@var{char}, if it were displayed in the current buffer (i.e.@: taking
1672into account the buffer's display table, if any; @pxref{Display
1673Tables}). The width of a tab character is usually @code{tab-width}
1674(@pxref{Usual Display}).
1671@end defun 1675@end defun
1672 1676
1673@defun string-width string 1677@defun string-width string
@@ -1813,26 +1817,27 @@ height.
1813@section Faces 1817@section Faces
1814@cindex faces 1818@cindex faces
1815 1819
1816 A @dfn{face} is a collection of graphical attributes for displaying 1820 A @dfn{face} is a collection of graphical @dfn{attributes} for
1817text: font, foreground color, background color, optional underlining, 1821displaying text: font, foreground color, background color, optional
1818and so on. Faces control how buffer text is displayed, and how some 1822underlining, and so on. Faces control how Emacs displays text in
1819parts of the frame, such as the mode-line, are displayed. 1823buffers, 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 1824@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of
1821faces Emacs normally comes with. 1825faces Emacs normally comes with.
1822 1826
1823@cindex face id 1827@cindex face id
1824 For most purposes, you refer to a face in Lisp programs using its 1828 For most purposes, you refer to a face in Lisp programs using its
1825@dfn{face name}. This is either a string or (equivalently) a Lisp 1829@dfn{face name}, which is usually a Lisp symbol. For backward
1826symbol whose name is equal to that string. 1830compatibility, a face name can also be a string, which is equivalent
1831to a Lisp symbol of the same name.
1827 1832
1828@defun facep object 1833@defun facep object
1829This function returns a non-@code{nil} value if @var{object} is a Lisp 1834This function returns a non-@code{nil} value if @var{object} is a Lisp
1830symbol or string that names a face. Otherwise, it returns @code{nil}. 1835symbol or string that names a face. Otherwise, it returns @code{nil}.
1831@end defun 1836@end defun
1832 1837
1833 Each face name is meaningful for all frames, and by default it has 1838 By default, each face name corresponds to the same set of attributes
1834the same meaning in all frames. But you can arrange to give a 1839in all frames. But you can also assign a face name a special set of
1835particular face name a special meaning in one frame if you wish. 1840attributes in one frame (@pxref{Attribute Functions}).
1836 1841
1837@menu 1842@menu
1838* Defining Faces:: How to define a face with @code{defface}. 1843* Defining Faces:: How to define a face with @code{defface}.
@@ -1855,9 +1860,8 @@ particular face name a special meaning in one frame if you wish.
1855@subsection Defining Faces 1860@subsection Defining Faces
1856 1861
1857 The way to define a new face is with @code{defface}. This creates a 1862 The way to define a new face is with @code{defface}. This creates a
1858kind of customization item (@pxref{Customization}) which the user can 1863kind of customization item which the user can customize using the
1859customize using the Customization buffer (@pxref{Easy Customization,,, 1864Customization buffer (@pxref{Customization}).
1860emacs, The GNU Emacs Manual}).
1861 1865
1862 People are sometimes tempted to create variables whose values specify 1866 People are sometimes tempted to create variables whose values specify
1863which faces to use (for example, Font-Lock does this). In the vast 1867which faces to use (for example, Font-Lock does this). In the vast
@@ -1883,14 +1887,16 @@ exactly what the @code{defface} says.
1883 1887
1884The purpose of @var{spec} is to specify how the face should appear on 1888The purpose of @var{spec} is to specify how the face should appear on
1885different kinds of terminals. It should be an alist whose elements 1889different kinds of terminals. It should be an alist whose elements
1886have the form @code{(@var{display} @var{atts})}. Each element's 1890have the form @code{(@var{display} @var{atts})}. @var{display}
1887@sc{car}, @var{display}, specifies a class of terminals. (The first 1891specifies a class of terminals (see below), while @var{atts} is a
1888element, if its @sc{car} is @code{default}, is special---it specifies 1892property list of face attributes and their values, specifying the
1889defaults for the remaining elements). The element's @sc{cadr}, 1893appearance of the face on matching terminals
1890@var{atts}, is a list of face attributes and their values; it 1894@iftex
1891specifies what the face should look like on that kind of terminal. 1895(see the next section for details about face attributes).
1892The possible attributes are defined in the value of 1896@end iftex
1893@code{custom-face-attributes}. 1897@ifnottex
1898(@pxref{Face Attributes}, for details about face attributes).
1899@end ifnottex
1894 1900
1895The @var{display} part of an element of @var{spec} determines which 1901The @var{display} part of an element of @var{spec} determines which
1896frames the element matches. If more than one element of @var{spec} 1902frames the element matches. If more than one element of @var{spec}
@@ -1952,29 +1958,23 @@ frame must match one of the @var{value}s specified for it in
1952@end table 1958@end table
1953@end defmac 1959@end defmac
1954 1960
1955 Here's how the standard face @code{region} is defined: 1961 Here's how the standard face @code{highlight} is defined:
1956 1962
1957@example 1963@example
1958@group 1964(defface highlight
1959(defface region 1965 '((((class color) (min-colors 88) (background light))
1960 '((((class color) (min-colors 88) (background dark)) 1966 :background "darkseagreen2")
1961 :background "blue3") 1967 (((class color) (min-colors 88) (background dark))
1962@end group 1968 :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)) 1969 (((class color) (min-colors 16) (background light))
1968 :background "lightgoldenrod2") 1970 :background "darkseagreen2")
1971 (((class color) (min-colors 16) (background dark))
1972 :background "darkolivegreen")
1969 (((class color) (min-colors 8)) 1973 (((class color) (min-colors 8))
1970 :background "blue" :foreground "white") 1974 :background "green" :foreground "black")
1971 (((type tty) (class mono)) 1975 (t :inverse-video t))
1972 :inverse-video t) 1976 "Basic face for highlighting."
1973 (t :background "gray"))
1974@group
1975 "Basic face for highlighting the region."
1976 :group 'basic-faces) 1977 :group 'basic-faces)
1977@end group
1978@end example 1978@end example
1979 1979
1980 Internally, @code{defface} uses the symbol property 1980 Internally, @code{defface} uses the symbol property
@@ -2010,8 +2010,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. 2010fails to specify a particular attribute, the next face gets a chance.
2011However, the @code{default} face must specify all attributes. 2011However, the @code{default} face must specify all attributes.
2012 2012
2013 Some of these font attributes are meaningful only on certain kinds 2013 Some of these attributes are meaningful only on certain kinds of
2014of displays. If your display cannot handle a certain attribute, the 2014displays. If your display cannot handle a certain attribute, the
2015attribute is ignored. 2015attribute is ignored.
2016 2016
2017@table @code 2017@table @code
@@ -2216,20 +2216,18 @@ This function sets one or more attributes of @var{face} for
2216the @code{defface} says. 2216the @code{defface} says.
2217 2217
2218The extra arguments @var{arguments} specify the attributes to set, and 2218The extra arguments @var{arguments} specify the attributes to set, and
2219the values for them. They should consist of alternating attribute names 2219the values for them. They should consist of alternating attribute
2220(such as @code{:family} or @code{:underline}) and corresponding values. 2220names (such as @code{:family} or @code{:underline}) and values. Thus,
2221Thus,
2222 2221
2223@example 2222@example
2224(set-face-attribute 'foo nil 2223(set-face-attribute 'foo nil
2225 :width 'extended 2224 :width 'extended
2226 :weight 'bold 2225 :weight 'bold)
2227 :underline "red")
2228@end example 2226@end example
2229 2227
2230@noindent 2228@noindent
2231sets the attributes @code{:width}, @code{:weight} and @code{:underline} 2229sets the attribute @code{:width} to @code{extended} and the attribute
2232to the corresponding values. 2230@code{:weight} to @code{bold}.
2233 2231
2234If @var{frame} is @code{t}, this function sets the default attributes 2232If @var{frame} is @code{t}, this function sets the default attributes
2235for new frames. Default attribute values specified this way override 2233for new frames. Default attribute values specified this way override
@@ -2306,54 +2304,51 @@ If @var{value1} is a relative value for the face attribute
2306face attribute @var{attribute}, returns @var{value1} unchanged. 2304face attribute @var{attribute}, returns @var{value1} unchanged.
2307@end defun 2305@end defun
2308 2306
2309 The following functions provide compatibility with Emacs 20 and 2307 The following commands and functions mostly provide compatibility
2310below. They work by calling @code{set-face-attribute}. Values of 2308with old versions of Emacs. They work by calling
2311@code{t} and @code{nil} for their @var{frame} argument are handled 2309@code{set-face-attribute}. Values of @code{t} and @code{nil} for
2312just like @code{set-face-attribute} and @code{face-attribute}. 2310their @var{frame} argument are handled just like
2311@code{set-face-attribute} and @code{face-attribute}. The commands
2312read their arguments using the minibuffer, if called interactively.
2313 2313
2314@defun set-face-foreground face color &optional frame 2314@deffn Command set-face-foreground face color &optional frame
2315@defunx set-face-background face color &optional frame 2315@deffnx Command set-face-background face color &optional frame
2316These functions set the @code{:foreground} attribute (or 2316These set the @code{:foreground} attribute (or @code{:background}
2317@code{:background} attribute, respectively) of @var{face} to 2317attribute, respectively) of @var{face} to @var{color}.
2318@var{color}. 2318@end deffn
2319@end defun
2320 2319
2321@defun set-face-stipple face pattern &optional frame 2320@deffn Command set-face-stipple face pattern &optional frame
2322This function sets the @code{:stipple} attribute of @var{face} to 2321This sets the @code{:stipple} attribute of @var{face} to
2323@var{pattern}. 2322@var{pattern}.
2324@end defun 2323@end deffn
2325 2324
2326@defun set-face-font face font &optional frame 2325@deffn Command set-face-font face font &optional frame
2327This function sets the @code{:font} attribute of @var{face} to 2326This sets the @code{:font} attribute of @var{face} to @var{font}.
2328@var{font}. 2327@end deffn
2329@end defun
2330 2328
2331@defun set-face-bold-p face bold-p &optional frame 2329@defun set-face-bold-p face bold-p &optional frame
2332This function sets the @code{:weight} attribute of @var{face} to 2330This 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} 2331if @var{bold-p} is @code{nil}, and to @var{bold} otherwise.
2334otherwise.
2335@end defun 2332@end defun
2336 2333
2337@defun set-face-italic-p face italic-p &optional frame 2334@defun set-face-italic-p face italic-p &optional frame
2338This function sets the @code{:slant} attribute of @var{face} to 2335This 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} 2336@var{italic-p} is @code{nil}, and to @var{italic} otherwise.
2340otherwise.
2341@end defun 2337@end defun
2342 2338
2343@defun set-face-underline-p face underline &optional frame 2339@defun set-face-underline-p face underline &optional frame
2344This function sets the @code{:underline} attribute of @var{face} to 2340This sets the @code{:underline} attribute of @var{face} to
2345@var{underline}. 2341@var{underline}.
2346@end defun 2342@end defun
2347 2343
2348@defun set-face-inverse-video-p face inverse-video-p &optional frame 2344@defun set-face-inverse-video-p face inverse-video-p &optional frame
2349This function sets the @code{:inverse-video} attribute of @var{face} 2345This sets the @code{:inverse-video} attribute of @var{face} to
2350to @var{inverse-video-p}. 2346@var{inverse-video-p}.
2351@end defun 2347@end defun
2352 2348
2353@defun invert-face face &optional frame 2349@deffn Command invert-face face &optional frame
2354This function swaps the foreground and background colors of face 2350This swaps the foreground and background colors of face @var{face}.
2355@var{face}. 2351@end deffn
2356@end defun
2357 2352
2358 The following functions examine the attributes of a face. If you 2353 The following functions examine the attributes of a face. If you
2359don't specify @var{frame}, they refer to the selected frame; @code{t} 2354don't specify @var{frame}, they refer to the selected frame; @code{t}
@@ -2459,27 +2454,26 @@ steps, Emacs applies the attribute of the @code{default} face.
2459 If these various sources together specify more than one face for a 2454 If these various sources together specify more than one face for a
2460particular character, Emacs merges the attributes of the various faces 2455particular character, Emacs merges the attributes of the various faces
2461specified. For each attribute, Emacs tries using the above order 2456specified. For each attribute, Emacs tries using the above order
2462(i.e., first the face of any special glyph; then the face for region 2457(i.e.@: first the face of any special glyph; then the face for region
2463highlighting, if appropriate; then faces specified by overlays, then 2458highlighting, 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 2459
2468@node Face Remapping 2460@node Face Remapping
2469@subsection Face Remapping 2461@subsection Face Remapping
2470 2462
2471 The variable @code{face-remapping-alist} is used for buffer-local or 2463 The variable @code{face-remapping-alist} is used for buffer-local or
2472global changes in the appearance of a face. For instance, it can be 2464global changes in the appearance of a face. For instance, it is used
2473used to make the @code{default} face a variable-pitch face within a 2465to implement the @code{text-scale-adjust} command (@pxref{Text
2474particular buffer. 2466Scale,,, emacs, The GNU Emacs Manual}).
2475 2467
2476@defvar face-remapping-alist 2468@defvar face-remapping-alist
2477An alist whose elements have the form @code{(@var{face} 2469The value of this variable is an alist whose elements have the form
2478@var{remapping...})}. This causes Emacs to display text using the 2470@code{(@var{face} . @var{remapping})}. This causes Emacs to display
2479face @var{face} using @var{remapping...} instead of @var{face}'s 2471any text having the face @var{face} with @var{remapping}, rather than
2480ordinary definition. @var{remapping...} may be any face specification 2472the ordinary definition of @var{face}. @var{remapping} may be any
2481suitable for a @code{face} text property: either a face name, or a 2473face specification suitable for a @code{face} text property: either a
2482property list of attribute/value pairs. @xref{Special Properties}. 2474face name, or a property list of attribute/value pairs, or a list in
2475which each element is either a face name or a property list
2476(@pxref{Special Properties}).
2483 2477
2484If @code{face-remapping-alist} is buffer-local, its local value takes 2478If @code{face-remapping-alist} is buffer-local, its local value takes
2485effect only within that buffer. 2479effect only within that buffer.
@@ -2488,17 +2482,15 @@ Two points bear emphasizing:
2488 2482
2489@enumerate 2483@enumerate
2490@item 2484@item
2491The new definition @var{remapping...} is the complete 2485@var{remapping} serves as the complete specification for the remapped
2492specification of how to display @var{face}---it entirely replaces, 2486face---it replaces the normal definition of @var{face}, instead of
2493rather than augmenting or modifying, the normal definition of that 2487modifying it.
2494face.
2495 2488
2496@item 2489@item
2497If @var{remapping...} recursively references the same face name 2490If @var{remapping} references the same face name @var{face}, either
2498@var{face}, either directly remapping entry, or via the 2491directly or via the @code{:inherit} attribute of some other face in
2499@code{:inherit} attribute of some other face in @var{remapping...}, 2492@var{remapping}, that reference uses the normal definition of
2500then that reference uses the normal definition of @var{face} in the 2493@var{face}. In other words, the remapping cannot be recursive.
2501selected frame, instead of the ``remapped'' definition.
2502 2494
2503For instance, if the @code{mode-line} face is remapped using this 2495For instance, if the @code{mode-line} face is remapped using this
2504entry in @code{face-remapping-alist}: 2496entry in @code{face-remapping-alist}:
@@ -2512,82 +2504,72 @@ then the new definition of the @code{mode-line} face inherits from the
2512@end enumerate 2504@end enumerate
2513@end defvar 2505@end defvar
2514 2506
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 2507 The following functions implement a higher-level interface to
2526@code{face-remapping-alist}, making it easier to use 2508@code{face-remapping-alist}. Most Lisp code should use these
2527``cooperatively''. They are mainly intended for buffer-local use, and 2509functions instead of setting @code{face-remapping-alist} directly, to
2528so all make @code{face-remapping-alist} variable buffer-local as a 2510avoid trampling on remappings applied elsewhere. These functions are
2529side-effect. They use entries in @code{face-remapping-alist} which 2511intended for buffer-local remappings, so they all make
2530have the general form: 2512@code{face-remapping-alist} buffer-local as a side-effect. They manage
2513@code{face-remapping-alist} entries of the form
2531 2514
2532@example 2515@example
2533 (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs}) 2516 (@var{face} @var{relative-spec-1} @var{relative-spec-2} @var{...} @var{base-spec})
2534@end example 2517@end example
2535 2518
2536Everything except @var{face} is a ``face spec'': a list of face names 2519@noindent
2537or face attribute-value pairs. All face specs are merged together, 2520where, as explained above, each of the @var{relative-spec-N} and
2538with earlier values taking precedence. 2521@var{base-spec} is either a face name, or a property list of
2539 2522attribute/value pairs. Each of the @dfn{relative remapping} entries,
2540The @var{relative_specs_}n values are ``relative specs'', and are 2523@var{relative-spec-N}, is managed by the
2541added by @code{face-remap-add-relative} (and removed by 2524@code{face-remap-add-relative} and @code{face-remap-remove-relative}
2542@code{face-remap-remove-relative}. These are intended for face 2525functions; these are intended for simple modifications like changing
2543modifications (such as increasing the size). Typical users of these 2526the text size. The @dfn{base remapping} entry, @var{base-spec}, has
2544relative specs would be minor modes. 2527the lowest priority and is managed by the @code{face-remap-set-base}
2545 2528and @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 2529modes 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 2530
2558@defun face-remap-add-relative face &rest specs 2531@defun face-remap-add-relative face &rest specs
2559This functions adds a face remapping entry of @var{face} to @var{specs} 2532This functions adds the face specifications in @var{specs} as relative
2560in the current buffer. 2533remappings for face @var{face} in the current buffer. The remaining
2534arguments, @var{specs}, should form either a list of face names, or a
2535property list of attribute/value pairs.
2536
2537The return value is a Lisp object that serves as a ``cookie''; you can
2538pass this object as an argument to @code{face-remap-remove-relative}
2539if you need to remove the remapping later.
2561 2540
2562It returns a ``cookie'' which can be used to later delete the remapping with 2541@example
2563@code{face-remap-remove-relative}. 2542;; Remap the `escape-glyph' face into a combination
2543;; of the `highlight' and `italic' faces:
2544(face-remap-add-relative 'escape-glyph 'highlight 'italic)
2564 2545
2565@var{specs} can be any value suitable for the @code{face} text 2546;; Increase the size of the `default' face by 50%:
2566property, including a face name, a list of face names, or a 2547(face-remap-add-relative 'default :height 1.5)
2567face-attribute property list. The attributes given by @var{specs} 2548@end example
2568will be merged with any other currently active face remappings of
2569@var{face}, and with the global definition of @var{face} (by default;
2570this may be changed using @code{face-remap-set-base}), with the most
2571recently added relative remapping taking precedence.
2572@end defun 2549@end defun
2573 2550
2574@defun face-remap-remove-relative cookie 2551@defun face-remap-remove-relative cookie
2575This function removes a face remapping previously added by 2552This function removes a relative remapping previously added by
2576@code{face-remap-add-relative}. @var{cookie} should be a return value 2553@code{face-remap-add-relative}. @var{cookie} should be the Lisp
2577from that function. 2554object returned by @code{face-remap-add-relative} when the remapping
2555was added.
2578@end defun 2556@end defun
2579 2557
2580@defun face-remap-set-base face &rest specs 2558@defun face-remap-set-base face &rest specs
2581This function sets the ``base remapping'' of @var{face} in the current 2559This function sets the base remapping of @var{face} in the current
2582buffer to @var{specs}. If @var{specs} is empty, the default base 2560buffer to @var{specs}. If @var{specs} is empty, the default base
2583remapping is restored, which inherits from the global definition of 2561remapping is restored, similar to calling @code{face-remap-reset-base}
2584@var{face}; note that this is different from @var{specs} containing a 2562(see below); note that this is different from @var{specs} containing a
2585single value @code{nil}, which has the opposite result (the global 2563single value @code{nil}, which has the opposite result (the global
2586definition of @var{face} is ignored). 2564definition of @var{face} is ignored).
2565
2566This overwrites the default @var{base-spec}, which inherits the global
2567face definition, so it is up to the caller to add such inheritance if
2568so desired.
2587@end defun 2569@end defun
2588 2570
2589@defun face-remap-reset-base face 2571@defun face-remap-reset-base face
2590This function sets the ``base remapping'' of @var{face} to its default 2572This function sets the base remapping of @var{face} to its default
2591value, which inherits from @var{face}'s global definition. 2573value, which inherits from @var{face}'s global definition.
2592@end defun 2574@end defun
2593 2575
@@ -2596,29 +2578,8 @@ value, which inherits from @var{face}'s global definition.
2596 2578
2597 Here are additional functions for creating and working with faces. 2579 Here are additional functions for creating and working with faces.
2598 2580
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 2581@defun face-list
2606This function returns a list of all defined faces. 2582This 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 2583@end defun
2623 2584
2624@defun face-id face 2585@defun face-id face
@@ -2752,7 +2713,7 @@ these are used for messages in @samp{*Compilation*} buffers.
2752@node Font Selection 2713@node Font Selection
2753@subsection Font Selection 2714@subsection Font Selection
2754 2715
2755 Before Emacs can draw a character on a particular display, it must 2716 Before Emacs can draw a character on a graphical display, it must
2756select a @dfn{font} for that character@footnote{In this context, the 2717select a @dfn{font} for that character@footnote{In this context, the
2757term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock 2718term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock
2758Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally, 2719Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally,
diff --git a/etc/NEWS b/etc/NEWS
index 78b306f057e..de5b865a54b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -123,6 +123,8 @@ and pops down the *Completions* buffer accordingly.
123*** Completion style can be set per-category `completion-category-overrides'. 123*** Completion style can be set per-category `completion-category-overrides'.
124+++ 124+++
125*** Completion of buffers now uses substring completion by default. 125*** Completion of buffers now uses substring completion by default.
126---
127*** The `widget-complete-field' option has been removed.
126 128
127** Mail changes 129** Mail changes
128 130
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3699bb0f5bd..ea7d81bb969 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-03-21 Chong Yidong <cyd@gnu.org>
2
3 * faces.el (make-face, make-empty-face, copy-face):
4 * face-remap.el (face-remap-add-relative, face-remap-set-base):
5 Doc fixes.
6
12012-03-21 Stefan Monnier <monnier@iro.umontreal.ca> 72012-03-21 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * wid-edit.el (widget-complete-field): Remove (bug#11051). 9 * wid-edit.el (widget-complete-field): Remove (bug#11051).
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 3af9e31a6f7..ca7a28328f9 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -106,21 +106,20 @@ The list structure of ENTRY may be destructively modified."
106;;;###autoload 106;;;###autoload
107(defun face-remap-add-relative (face &rest specs) 107(defun face-remap-add-relative (face &rest specs)
108 "Add a face remapping entry of FACE to SPECS in the current buffer. 108 "Add a face remapping entry of FACE to SPECS in the current buffer.
109 109Return a cookie which can be used to delete this remapping with
110Return a cookie which can be used to delete the remapping with
111`face-remap-remove-relative'. 110`face-remap-remove-relative'.
112 111
113SPECS can be any value suitable for the `face' text property, 112The remaining arguments, SPECS, should be either a list of face
114including a face name, a list of face names, or a face-attribute 113names, or a property list of face attribute/value pairs. The
115property list. The attributes given by SPECS will be merged with 114remapping specified by SPECS takes effect alongside the
116any other currently active face remappings of FACE, and with the 115remappings from other calls to `face-remap-add-relative', as well
117global definition of FACE. An attempt is made to sort multiple 116as the normal definition of FACE (at lowest priority). This
118entries so that entries with relative face-attributes are applied 117function tries to sort multiple remappings for the same face, so
119after entries with absolute face-attributes. 118that remappings specifying relative face attributes are applied
120 119after remappings specifying absolute face attributes.
121The base (lowest priority) remapping may be set to a specific 120
122value, instead of the default of the global face definition, 121The base (lowest priority) remapping may be set to something
123using `face-remap-set-base'." 122other than the normal definition of FACE via `face-remap-set-base'."
124 (while (and (consp specs) (null (cdr specs))) 123 (while (and (consp specs) (null (cdr specs)))
125 (setq specs (car specs))) 124 (setq specs (car specs)))
126 (make-local-variable 'face-remapping-alist) 125 (make-local-variable 'face-remapping-alist)
@@ -148,7 +147,9 @@ COOKIE should be the return value from that function."
148 147
149;;;###autoload 148;;;###autoload
150(defun face-remap-reset-base (face) 149(defun face-remap-reset-base (face)
151 "Set the base remapping of FACE to inherit from FACE's global definition." 150 "Set the base remapping of FACE to the normal definition of FACE.
151This causes the remappings specified by `face-remap-add-relative'
152to apply on top of the normal definition of FACE."
152 (let ((entry (assq face face-remapping-alist))) 153 (let ((entry (assq face face-remapping-alist)))
153 (when entry 154 (when entry
154 ;; If there's nothing except a base remapping, we simply remove 155 ;; If there's nothing except a base remapping, we simply remove
@@ -163,10 +164,15 @@ COOKIE should be the return value from that function."
163;;;###autoload 164;;;###autoload
164(defun face-remap-set-base (face &rest specs) 165(defun face-remap-set-base (face &rest specs)
165 "Set the base remapping of FACE in the current buffer to SPECS. 166 "Set the base remapping of FACE in the current buffer to SPECS.
166If SPECS is empty, the default base remapping is restored, which 167This causes the remappings specified by `face-remap-add-relative'
167inherits from the global definition of FACE; note that this is 168to apply on top of the face specification given by SPECS. SPECS
168different from SPECS containing a single value `nil', which does 169should be either a list of face names, or a property list of face
169not inherit from the global definition of FACE." 170attribute/value pairs.
171
172If SPECS is empty, call `face-remap-reset-base' to use the normal
173definition of FACE as the base remapping; note that this is
174different from SPECS containing a single value `nil', which means
175not to inherit from the global definition of FACE at all."
170 (while (and (consp specs) (not (null (car specs))) (null (cdr specs))) 176 (while (and (consp specs) (not (null (car specs))) (null (cdr specs)))
171 (setq specs (car specs))) 177 (setq specs (car specs)))
172 (if (or (null specs) 178 (if (or (null specs)
diff --git a/lisp/faces.el b/lisp/faces.el
index 34fad66ce27..0256f8d951a 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -122,15 +122,13 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
122 "Return a list of all defined faces." 122 "Return a list of all defined faces."
123 (mapcar #'car face-new-frame-defaults)) 123 (mapcar #'car face-new-frame-defaults))
124 124
125
126;;; ### If not frame-local initialize by what X resources?
127
128(defun make-face (face &optional no-init-from-resources) 125(defun make-face (face &optional no-init-from-resources)
129 "Define a new face with name FACE, a symbol. 126 "Define a new face with name FACE, a symbol.
130NO-INIT-FROM-RESOURCES non-nil means don't initialize frame-local 127Do not call this directly from Lisp code; use `defface' instead.
131variants of FACE from X resources. (X resources recognized are found 128
132in the global variable `face-x-resources'.) If FACE is already known 129If NO-INIT-FROM-RESOURCES is non-nil, don't initialize face
133as a face, leave it unmodified. Value is FACE." 130attributes from X resources. If FACE is already known as a face,
131leave it unmodified. Return FACE."
134 (interactive (list (read-from-minibuffer 132 (interactive (list (read-from-minibuffer
135 "Make face: " nil nil t 'face-name-history))) 133 "Make face: " nil nil t 'face-name-history)))
136 (unless (facep face) 134 (unless (facep face)
@@ -145,31 +143,30 @@ as a face, leave it unmodified. Value is FACE."
145 (make-face-x-resource-internal face))) 143 (make-face-x-resource-internal face)))
146 face) 144 face)
147 145
148
149(defun make-empty-face (face) 146(defun make-empty-face (face)
150 "Define a new, empty face with name FACE. 147 "Define a new, empty face with name FACE.
151If the face already exists, it is left unmodified. Value is FACE." 148Do not call this directly from Lisp code; use `defface' instead."
152 (interactive (list (read-from-minibuffer 149 (interactive (list (read-from-minibuffer
153 "Make empty face: " nil nil t 'face-name-history))) 150 "Make empty face: " nil nil t 'face-name-history)))
154 (make-face face 'no-init-from-resources)) 151 (make-face face 'no-init-from-resources))
155 152
156
157(defun copy-face (old-face new-face &optional frame new-frame) 153(defun copy-face (old-face new-face &optional frame new-frame)
158 "Define a face just like OLD-FACE, with name NEW-FACE. 154 "Define a face named NEW-FACE, which is a copy of OLD-FACE.
159 155This function does not copy face customization data, so NEW-FACE
160If NEW-FACE already exists as a face, it is modified to be like 156will not be made customizable. Most Lisp code should not call
161OLD-FACE. If it doesn't already exist, it is created. 157this function; use `defface' with :inherit instead.
162 158
163If the optional argument FRAME is given as a frame, NEW-FACE is 159If NEW-FACE already exists as a face, modify it to be like
164changed on FRAME only. 160OLD-FACE. If NEW-FACE doesn't already exist, create it.
165If FRAME is t, the frame-independent default specification for OLD-FACE 161
166is copied to NEW-FACE. 162If the optional argument FRAME is a frame, change NEW-FACE on
167If FRAME is nil, copying is done for the frame-independent defaults 163FRAME only. If FRAME is t, copy the frame-independent default
168and for each existing frame. 164specification for OLD-FACE to NEW-FACE. If FRAME is nil, copy
169 165the defaults as well as the faces on each existing frame.
170If the optional fourth argument NEW-FRAME is given, 166
171copy the information from face OLD-FACE on frame FRAME 167If the optional fourth argument NEW-FRAME is given, copy the
172to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." 168information from face OLD-FACE on frame FRAME to NEW-FACE on
169frame NEW-FRAME. In this case, FRAME must not be nil."
173 (let ((inhibit-quit t)) 170 (let ((inhibit-quit t))
174 (if (null frame) 171 (if (null frame)
175 (progn 172 (progn
diff --git a/src/ChangeLog b/src/ChangeLog
index 4f32309562b..7a97859ba63 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-03-21 Chong Yidong <cyd@gnu.org>
2
3 * xfaces.c (Vface_remapping_alist): Doc fix.
4
12012-03-20 Eli Zaretskii <eliz@gnu.org> 52012-03-20 Eli Zaretskii <eliz@gnu.org>
2 6
3 * w32proc.c (Fw32_set_console_codepage) 7 * w32proc.c (Fw32_set_console_codepage)
diff --git a/src/xfaces.c b/src/xfaces.c
index bcb04188aeb..476fb1e0366 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6599,20 +6599,22 @@ ignore. */);
6599 doc: /* Alist of face remappings. 6599 doc: /* Alist of face remappings.
6600Each element is of the form: 6600Each element is of the form:
6601 6601
6602 (FACE REPLACEMENT...), 6602 (FACE . REPLACEMENT),
6603 6603
6604which causes display of the face FACE to use REPLACEMENT... instead. 6604which causes display of the face FACE to use REPLACEMENT instead.
6605REPLACEMENT... is interpreted the same way as the value of a `face' 6605REPLACEMENT is a face specification, i.e. one of the following:
6606text property: it may be (1) A face name, (2) A list of face names,
6607(3) A property-list of face attribute/value pairs, or (4) A list of
6608face names or lists containing face attribute/value pairs.
6609 6606
6610Multiple entries in REPLACEMENT... are merged together to form the final 6607 (1) a face name
6611result, with faces or attributes earlier in the list taking precedence 6608 (2) a property list of attribute/value pairs, or
6612over those that are later. 6609 (3) a list in which each element has the form of (1) or (2).
6613 6610
6614Face-name remapping cycles are suppressed; recursive references use the 6611List values for REPLACEMENT are merged to form the final face
6615underlying face instead of the remapped face. So a remapping of the form: 6612specification, with earlier entries taking precedence, in the same as
6613as in the `face' text property.
6614
6615Face-name remapping cycles are suppressed; recursive references use
6616the underlying face instead of the remapped face. So a remapping of
6617the form:
6616 6618
6617 (FACE EXTRA-FACE... FACE) 6619 (FACE EXTRA-FACE... FACE)
6618 6620
@@ -6620,13 +6622,13 @@ or:
6620 6622
6621 (FACE (FACE-ATTR VAL ...) FACE) 6623 (FACE (FACE-ATTR VAL ...) FACE)
6622 6624
6623will cause EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the 6625causes EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the
6624existing definition of FACE. Note that for the default face, this isn't 6626existing definition of FACE. Note that this isn't necessary for the
6625necessary, as every face inherits from the default face. 6627default face, since every face inherits from the default face.
6626 6628
6627Making this variable buffer-local is a good way to allow buffer-specific 6629If this variable is made buffer-local, the face remapping takes effect
6628face definitions. For instance, the mode my-mode could define a face 6630only in that buffer. For instance, the mode my-mode could define a
6629`my-mode-default', and then in the mode setup function, do: 6631face `my-mode-default', and then in the mode setup function, do:
6630 6632
6631 (set (make-local-variable 'face-remapping-alist) 6633 (set (make-local-variable 'face-remapping-alist)
6632 '((default my-mode-default)))). 6634 '((default my-mode-default)))).