diff options
| author | Kenichi Handa | 2012-03-21 16:43:58 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-03-21 16:43:58 +0900 |
| commit | 136220349968063bef3f249baddba30a24b52ec2 (patch) | |
| tree | c9da83473ae16e2d2226523d16dfc5555d56b95c | |
| parent | 26090a2783518afc82bb907a28e32749542fead6 (diff) | |
| parent | fb5b8aca9928223c3fef042f1de4b50cd08fde43 (diff) | |
| download | emacs-136220349968063bef3f249baddba30a24b52ec2.tar.gz emacs-136220349968063bef3f249baddba30a24b52ec2.zip | |
merge trunk
| -rw-r--r-- | doc/lispref/ChangeLog | 26 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 529 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 43 | ||||
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 54 | ||||
| -rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 9 | ||||
| -rw-r--r-- | lisp/face-remap.el | 42 | ||||
| -rw-r--r-- | lisp/faces.el | 47 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/shr.el | 1 | ||||
| -rw-r--r-- | lisp/textmodes/artist.el | 3 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 10 | ||||
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/dispnew.c | 29 | ||||
| -rw-r--r-- | src/w32proc.c | 10 | ||||
| -rw-r--r-- | src/xfaces.c | 36 |
16 files changed, 460 insertions, 401 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index af0cb306245..77468f562c6 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,29 @@ | |||
| 1 | 2012-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 | |||
| 16 | 2012-03-20 Chong Yidong <cyd@gnu.org> | ||
| 17 | |||
| 18 | * display.texi (Forcing Redisplay): Various rewrites to reflect | ||
| 19 | new value of redisplay-dont-pause. | ||
| 20 | (Truncation): Copyedits. | ||
| 21 | |||
| 22 | 2012-03-20 Glenn Morris <rgm@gnu.org> | ||
| 23 | |||
| 24 | * os.texi (Startup Summary): Don't mention initial-buffer-choice = t. | ||
| 25 | Add summary table of some relevant command-line options. | ||
| 26 | |||
| 1 | 2012-03-18 Chong Yidong <cyd@gnu.org> | 27 | 2012-03-18 Chong Yidong <cyd@gnu.org> |
| 2 | 28 | ||
| 3 | * internals.texi (Building Emacs, Garbage Collection): Copyedits. | 29 | * internals.texi (Building Emacs, Garbage Collection): Copyedits. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index c70418be52b..dbcc1d1190b 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -86,59 +86,57 @@ attempt to redisplay, in the middle of Lisp code, without actually | |||
| 86 | waiting for input. | 86 | waiting for input. |
| 87 | 87 | ||
| 88 | @defun redisplay &optional force | 88 | @defun redisplay &optional force |
| 89 | This function tries immediately to redisplay, provided there are no | 89 | This function tries immediately to redisplay. The optional argument |
| 90 | pending input events. | 90 | @var{force}, if non-@code{nil}, forces the redisplay to be performed, |
| 91 | 91 | instead of being preempted, even if input is pending and the variable | |
| 92 | If the optional argument @var{force} is non-@code{nil}, it does all | 92 | @code{redisplay-dont-pause} is @code{nil} (see below). If |
| 93 | pending redisplay work even if input is available, with no | 93 | @code{redisplay-dont-pause} is non-@code{nil} (the default), this |
| 94 | pre-emption. | 94 | function redisplays in any case, i.e.@: @var{force} does nothing. |
| 95 | 95 | ||
| 96 | The function returns @code{t} if it actually tried to redisplay, and | 96 | The function returns @code{t} if it actually tried to redisplay, and |
| 97 | @code{nil} otherwise. A value of @code{t} does not mean that | 97 | @code{nil} otherwise. A value of @code{t} does not mean that |
| 98 | redisplay proceeded to completion; it could have been pre-empted by | 98 | redisplay proceeded to completion; it could have been preempted by |
| 99 | newly arriving terminal input. | 99 | newly arriving input. |
| 100 | @end defun | ||
| 101 | |||
| 102 | @code{redisplay} with no argument tries immediately to redisplay, | ||
| 103 | but has no effect on the usual rules for what parts of the screen to | ||
| 104 | redisplay. By contrast, the following function adds certain windows | ||
| 105 | to the pending redisplay work (as if their contents had completely | ||
| 106 | changed), but doesn't immediately try to do any redisplay work. | ||
| 107 | |||
| 108 | @defun force-window-update &optional object | ||
| 109 | This function forces some or all windows to be updated on next | ||
| 110 | redisplay. If @var{object} is a window, it requires eventual | ||
| 111 | redisplay of that window. If @var{object} is a buffer or buffer name, | ||
| 112 | it requires eventual redisplay of all windows displaying that buffer. | ||
| 113 | If @var{object} is @code{nil} (or omitted), it requires eventual | ||
| 114 | redisplay of all windows. | ||
| 115 | @end defun | 100 | @end defun |
| 116 | 101 | ||
| 117 | @code{force-window-update} does not do a redisplay immediately. | ||
| 118 | (Emacs will do that when it waits for input.) Rather, its effect is | ||
| 119 | to put more work on the queue to be done by redisplay whenever there | ||
| 120 | is a chance. | ||
| 121 | |||
| 122 | @defvar redisplay-dont-pause | 102 | @defvar redisplay-dont-pause |
| 123 | If this variable is non-@code{nil}, pending input does not prevent or | 103 | If this variable is @code{nil}, arriving input events preempt |
| 124 | halt redisplay; redisplay occurs, and finishes, regardless of whether | 104 | redisplay; Emacs avoids starting a redisplay, and stops any redisplay |
| 125 | input is available. If it is @code{nil}, Emacs redisplay stops if | 105 | that is in progress, until the input has been processed. In |
| 126 | input arrives, and does not happen at all if input is available before | 106 | particular, @code{(redisplay)} returns @code{nil} without actually |
| 127 | it starts. The default is @code{t}. | 107 | redisplaying, if there is pending input. |
| 108 | |||
| 109 | The default value is @code{t}, which means that pending input does not | ||
| 110 | preempt redisplay. | ||
| 128 | @end defvar | 111 | @end defvar |
| 129 | 112 | ||
| 130 | @defvar redisplay-preemption-period | 113 | @defvar redisplay-preemption-period |
| 131 | This variable specifies how many seconds Emacs waits between checks | 114 | If @code{redisplay-dont-pause} is @code{nil}, this variable specifies |
| 132 | for new input during redisplay. (The default is 0.1 seconds.) If | 115 | how many seconds Emacs waits between checks for new input during |
| 133 | input has arrived when Emacs checks, it pre-empts redisplay and | 116 | redisplay; if input arrives during this interval, redisplay stops and |
| 134 | processes the available input before trying again to redisplay. | 117 | the input is processed. The default value is 0.1; if the value is |
| 118 | @code{nil}, Emacs does not check for input during redisplay. | ||
| 119 | |||
| 120 | This variable has no effect when @code{redisplay-dont-pause} is | ||
| 121 | non-@code{nil} (the default). | ||
| 122 | @end defvar | ||
| 135 | 123 | ||
| 136 | If this variable is @code{nil}, Emacs does not check for input during | 124 | Although @code{redisplay} tries immediately to redisplay, it does |
| 137 | redisplay, and redisplay cannot be preempted by input. | 125 | not change how Emacs decides which parts of its frame(s) to redisplay. |
| 126 | By contrast, the following function adds certain windows to the | ||
| 127 | pending redisplay work (as if their contents had completely changed), | ||
| 128 | but does not immediately try to perform redisplay. | ||
| 138 | 129 | ||
| 139 | This variable is only obeyed on graphical terminals. For | 130 | @defun force-window-update &optional object |
| 140 | text terminals, see @ref{Terminal Output}. | 131 | This function forces some or all windows to be updated the next time |
| 141 | @end defvar | 132 | Emacs does a redisplay. If @var{object} is a window, that window is |
| 133 | to be updated. If @var{object} is a buffer or buffer name, all | ||
| 134 | windows displaying that buffer are to be updated. If @var{object} is | ||
| 135 | @code{nil} (or omitted), all windows are to be updated. | ||
| 136 | |||
| 137 | This function does not do a redisplay immediately; Emacs does that as | ||
| 138 | it waits for input, or when the function @code{redisplay} is called. | ||
| 139 | @end defun | ||
| 142 | 140 | ||
| 143 | @node Truncation | 141 | @node Truncation |
| 144 | @section Truncation | 142 | @section Truncation |
| @@ -169,7 +167,7 @@ If this buffer-local variable is non-@code{nil}, lines that extend | |||
| 169 | beyond the right edge of the window are truncated; otherwise, they are | 167 | beyond the right edge of the window are truncated; otherwise, they are |
| 170 | continued. As a special exception, the variable | 168 | continued. As a special exception, the variable |
| 171 | @code{truncate-partial-width-windows} takes precedence in | 169 | @code{truncate-partial-width-windows} takes precedence in |
| 172 | @dfn{partial-width} windows (i.e., windows that do not occupy the | 170 | @dfn{partial-width} windows (i.e.@: windows that do not occupy the |
| 173 | entire frame width). | 171 | entire frame width). |
| 174 | @end defopt | 172 | @end defopt |
| 175 | 173 | ||
| @@ -192,37 +190,37 @@ a window, that forces truncation. | |||
| 192 | 190 | ||
| 193 | @defvar wrap-prefix | 191 | @defvar wrap-prefix |
| 194 | If this buffer-local variable is non-@code{nil}, it defines a | 192 | If this buffer-local variable is non-@code{nil}, it defines a |
| 195 | ``prefix'' that is prepended to every continuation line at | 193 | @dfn{wrap prefix} which Emacs displays at the start of every |
| 196 | display time. (If lines are truncated, the wrap-prefix is never | 194 | continuation line. (If lines are truncated, @code{wrap-prefix} is |
| 197 | used.) It may be a string or an image (@pxref{Other Display Specs}), | 195 | never used.) Its value may be a string or an image (@pxref{Other |
| 198 | or a stretch of whitespace such as specified by the @code{:width} or | 196 | Display Specs}), or a stretch of whitespace such as specified by the |
| 199 | @code{:align-to} display properties (@pxref{Specified Space}). The | 197 | @code{:width} or @code{:align-to} display properties (@pxref{Specified |
| 200 | value is interpreted in the same way as a @code{display} text | 198 | Space}). The value is interpreted in the same way as a @code{display} |
| 201 | property. @xref{Display Property}. | 199 | text property. @xref{Display Property}. |
| 202 | 200 | ||
| 203 | A wrap-prefix may also be specified for regions of text, using the | 201 | A wrap prefix may also be specified for regions of text, using the |
| 204 | @code{wrap-prefix} text or overlay property. This takes precedence | 202 | @code{wrap-prefix} text or overlay property. This takes precedence |
| 205 | over the @code{wrap-prefix} variable. @xref{Special Properties}. | 203 | over the @code{wrap-prefix} variable. @xref{Special Properties}. |
| 206 | @end defvar | 204 | @end defvar |
| 207 | 205 | ||
| 208 | @defvar line-prefix | 206 | @defvar line-prefix |
| 209 | If this buffer-local variable is non-@code{nil}, it defines a | 207 | If this buffer-local variable is non-@code{nil}, it defines a |
| 210 | ``prefix'' that is prepended to every non-continuation line at | 208 | @dfn{line prefix} which Emacs displays at the start of every |
| 211 | display time. It may be a string or an image (@pxref{Other Display | 209 | non-continuation line. Its value may be a string or an image |
| 212 | Specs}), or a stretch of whitespace such as specified by the | 210 | (@pxref{Other Display Specs}), or a stretch of whitespace such as |
| 213 | @code{:width} or @code{:align-to} display properties (@pxref{Specified | 211 | specified by the @code{:width} or @code{:align-to} display properties |
| 214 | Space}). The value is interpreted in the same way as a @code{display} | 212 | (@pxref{Specified Space}). The value is interpreted in the same way |
| 215 | text property. @xref{Display Property}. | 213 | as a @code{display} text property. @xref{Display Property}. |
| 216 | 214 | ||
| 217 | A line-prefix may also be specified for regions of text using the | 215 | A line prefix may also be specified for regions of text using the |
| 218 | @code{line-prefix} text or overlay property. This takes precedence | 216 | @code{line-prefix} text or overlay property. This takes precedence |
| 219 | over the @code{line-prefix} variable. @xref{Special Properties}. | 217 | over the @code{line-prefix} variable. @xref{Special Properties}. |
| 220 | @end defvar | 218 | @end defvar |
| 221 | 219 | ||
| 222 | If your buffer contains @emph{very} long lines, and you use | 220 | If your buffer contains @emph{very} long lines, and you use |
| 223 | continuation to display them, computing the continuation lines can | 221 | continuation to display them, computing the continuation lines can |
| 224 | make Emacs redisplay slow. The column computation and indentation | 222 | make redisplay slow. The column computation and indentation functions |
| 225 | functions also become slow. Then you might find it advisable to set | 223 | also become slow. Then you might find it advisable to set |
| 226 | @code{cache-long-line-scans} to @code{t}. | 224 | @code{cache-long-line-scans} to @code{t}. |
| 227 | 225 | ||
| 228 | @defvar cache-long-line-scans | 226 | @defvar cache-long-line-scans |
| @@ -245,14 +243,12 @@ This variable is automatically buffer-local in every buffer. | |||
| 245 | (@pxref{Errors}), for messages made with the @code{message} primitive, | 243 | (@pxref{Errors}), for messages made with the @code{message} primitive, |
| 246 | and for echoing keystrokes. It is not the same as the minibuffer, | 244 | and for echoing keystrokes. It is not the same as the minibuffer, |
| 247 | despite the fact that the minibuffer appears (when active) in the same | 245 | despite the fact that the minibuffer appears (when active) in the same |
| 248 | place on the screen as the echo area. The @cite{GNU Emacs Manual} | 246 | place on the screen as the echo area. @xref{Minibuffer,, The |
| 249 | specifies the rules for resolving conflicts between the echo area and | 247 | Minibuffer, emacs, The GNU Emacs Manual}. |
| 250 | the minibuffer for use of that screen space (@pxref{Minibuffer,, The | ||
| 251 | Minibuffer, emacs, The GNU Emacs Manual}). | ||
| 252 | 248 | ||
| 253 | You can write output in the echo area by using the Lisp printing | 249 | Apart from the functions documented in this section, you can print |
| 254 | functions with @code{t} as the stream (@pxref{Output Functions}), or | 250 | Lisp objects to the echo area by specifying @code{t} as the output |
| 255 | explicitly. | 251 | stream. @xref{Output Streams}. |
| 256 | 252 | ||
| 257 | @menu | 253 | @menu |
| 258 | * Displaying Messages:: Explicitly displaying text in the echo area. | 254 | * Displaying Messages:: Explicitly displaying text in the echo area. |
| @@ -265,27 +261,26 @@ explicitly. | |||
| 265 | @subsection Displaying Messages in the Echo Area | 261 | @subsection Displaying Messages in the Echo Area |
| 266 | @cindex display message in echo area | 262 | @cindex display message in echo area |
| 267 | 263 | ||
| 268 | This section describes the functions for explicitly producing echo | 264 | This section describes the standard functions for displaying |
| 269 | area messages. Many other Emacs features display messages there, too. | 265 | messages in the echo area. |
| 270 | 266 | ||
| 271 | @defun message format-string &rest arguments | 267 | @defun message format-string &rest arguments |
| 272 | This function displays a message in the echo area. The argument | 268 | This function displays a message in the echo area. |
| 273 | @var{format-string} is similar to a C language @code{printf} format | 269 | @var{format-string} is a format string, and @var{arguments} are the |
| 274 | string. See @code{format} in @ref{Formatting Strings}, for the details | 270 | objects for its format specifications, like in the @code{format} |
| 275 | on the conversion specifications. @code{message} returns the | 271 | function (@pxref{Formatting Strings}). The resulting formatted string |
| 276 | constructed string. | 272 | is displayed in the echo area; if it contains @code{face} text |
| 277 | 273 | properties, it is displayed with the specified faces (@pxref{Faces}). | |
| 278 | In batch mode, @code{message} prints the message text on the standard | 274 | The string is also added to the @samp{*Messages*} buffer, but without |
| 279 | error stream, followed by a newline. | 275 | text properties (@pxref{Logging Messages}). |
| 276 | |||
| 277 | In batch mode, the message is printed to the standard error stream, | ||
| 278 | followed by a newline. | ||
| 280 | 279 | ||
| 281 | If @var{format-string}, or strings among the @var{arguments}, have | ||
| 282 | @code{face} text properties, these affect the way the message is displayed. | ||
| 283 | |||
| 284 | @c Emacs 19 feature | ||
| 285 | If @var{format-string} is @code{nil} or the empty string, | 280 | If @var{format-string} is @code{nil} or the empty string, |
| 286 | @code{message} clears the echo area; if the echo area has been | 281 | @code{message} clears the echo area; if the echo area has been |
| 287 | expanded automatically, this brings it back to its normal size. | 282 | expanded automatically, this brings it back to its normal size. If |
| 288 | If the minibuffer is active, this brings the minibuffer contents back | 283 | the minibuffer is active, this brings the minibuffer contents back |
| 289 | onto the screen immediately. | 284 | onto the screen immediately. |
| 290 | 285 | ||
| 291 | @example | 286 | @example |
| @@ -561,13 +556,13 @@ If the value is zero, then command input is not echoed. | |||
| 561 | Normally, displaying a long message resizes the echo area to display | 556 | Normally, displaying a long message resizes the echo area to display |
| 562 | the entire message. But if the variable @code{message-truncate-lines} | 557 | the entire message. But if the variable @code{message-truncate-lines} |
| 563 | is non-@code{nil}, the echo area does not resize, and the message is | 558 | is non-@code{nil}, the echo area does not resize, and the message is |
| 564 | truncated to fit it, as in Emacs 20 and before. | 559 | truncated to fit it. |
| 565 | @end defvar | 560 | @end defvar |
| 566 | 561 | ||
| 567 | The variable @code{max-mini-window-height}, which specifies the | 562 | The variable @code{max-mini-window-height}, which specifies the |
| 568 | maximum height for resizing minibuffer windows, also applies to the | 563 | maximum height for resizing minibuffer windows, also applies to the |
| 569 | echo area (which is really a special use of the minibuffer window. | 564 | echo area (which is really a special use of the minibuffer window; |
| 570 | @xref{Minibuffer Misc}.). | 565 | @pxref{Minibuffer Misc}). |
| 571 | 566 | ||
| 572 | @node Warnings | 567 | @node Warnings |
| 573 | @section Reporting Warnings | 568 | @section Reporting Warnings |
| @@ -764,10 +759,11 @@ that warning is not logged. | |||
| 764 | @cindex invisible text | 759 | @cindex invisible text |
| 765 | You can make characters @dfn{invisible}, so that they do not appear on | 760 | You can make characters @dfn{invisible}, so that they do not appear on |
| 766 | the screen, with the @code{invisible} property. This can be either a | 761 | the screen, with the @code{invisible} property. This can be either a |
| 767 | text property (@pxref{Text Properties}) or a property of an overlay | 762 | text property (@pxref{Text Properties}) or an overlay property |
| 768 | (@pxref{Overlays}). Cursor motion also partly ignores these | 763 | (@pxref{Overlays}). Cursor motion also partly ignores these |
| 769 | characters; if the command loop finds point within them, it moves | 764 | characters; if the command loop finds that point is inside a range of |
| 770 | point to the other side of them. | 765 | invisible text after a command, it relocates point to the other side |
| 766 | of the text. | ||
| 771 | 767 | ||
| 772 | In the simplest case, any non-@code{nil} @code{invisible} property makes | 768 | In the simplest case, any non-@code{nil} @code{invisible} property makes |
| 773 | a character invisible. This is the default case---if you don't alter | 769 | a character invisible. This is the default case---if you don't alter |
| @@ -807,13 +803,15 @@ the character is invisible. The list can have two kinds of elements: | |||
| 807 | 803 | ||
| 808 | @table @code | 804 | @table @code |
| 809 | @item @var{atom} | 805 | @item @var{atom} |
| 810 | A character is invisible if its @code{invisible} property value | 806 | A character is invisible if its @code{invisible} property value is |
| 811 | is @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 |
| 808 | is done with @code{eq}. | ||
| 812 | 809 | ||
| 813 | @item (@var{atom} . t) | 810 | @item (@var{atom} . t) |
| 814 | A character is invisible if its @code{invisible} property value is | 811 | A character is invisible if its @code{invisible} property value is |
| 815 | @var{atom} or if it is a list with @var{atom} as a member. Moreover, | 812 | @var{atom} or if it is a list with @var{atom} as a member; comparison |
| 816 | a sequence of such characters displays as an ellipsis. | 813 | is done with @code{eq}. Moreover, a sequence of such characters |
| 814 | displays as an ellipsis. | ||
| 817 | @end table | 815 | @end table |
| 818 | @end table | 816 | @end table |
| 819 | @end defvar | 817 | @end defvar |
| @@ -848,7 +846,7 @@ major mode should use the mode's own name as an element of | |||
| 848 | (overlay-put (make-overlay beginning end) | 846 | (overlay-put (make-overlay beginning end) |
| 849 | 'invisible 'my-symbol) | 847 | 'invisible 'my-symbol) |
| 850 | 848 | ||
| 851 | ;; @r{When done with the overlays:} | 849 | ;; @r{When done with the invisibility:} |
| 852 | (remove-from-invisibility-spec '(my-symbol . t)) | 850 | (remove-from-invisibility-spec '(my-symbol . t)) |
| 853 | ;; @r{Or respectively:} | 851 | ;; @r{Or respectively:} |
| 854 | (remove-from-invisibility-spec 'my-symbol) | 852 | (remove-from-invisibility-spec 'my-symbol) |
| @@ -874,15 +872,16 @@ ignore invisible newlines if @code{line-move-ignore-invisible} is | |||
| 874 | non-@code{nil} (the default), but only because they are explicitly | 872 | non-@code{nil} (the default), but only because they are explicitly |
| 875 | programmed to do so. | 873 | programmed to do so. |
| 876 | 874 | ||
| 877 | However, if a command ends with point inside or at the boundary of invisible | 875 | However, if a command ends with point inside or at the boundary of |
| 878 | text, the main editing loop moves point to one of the two ends of the invisible | 876 | invisible text, the main editing loop relocates point to one of the |
| 879 | text. Which end to move to is chosen based on the following factors: make sure | 877 | two ends of the invisible text. Emacs chooses the direction of |
| 880 | that the overall movement of the command is still in the same direction, and | 878 | relocation so that it is the same as the overall movement direction of |
| 881 | prefer a position where an inserted char would not inherit the @code{invisible} | 879 | the command; if in doubt, it prefers a position where an inserted char |
| 882 | property. Additionally, if the text is not replaced by an ellipsis and the | 880 | would not inherit the @code{invisible} property. Additionally, if the |
| 883 | command only moved within the invisible text, then point is moved one extra | 881 | text is not replaced by an ellipsis and the command only moved within |
| 884 | character so as to try and reflect the command's movement by a visible movement | 882 | the invisible text, then point is moved one extra character so as to |
| 885 | of the cursor. | 883 | try and reflect the command's movement by a visible movement of the |
| 884 | cursor. | ||
| 886 | 885 | ||
| 887 | Thus, if the command moved point back to an invisible range (with the usual | 886 | Thus, if the command moved point back to an invisible range (with the usual |
| 888 | stickiness), Emacs moves point back to the beginning of that range. If the | 887 | stickiness), Emacs moves point back to the beginning of that range. If the |
| @@ -1668,8 +1667,11 @@ check the width of a character. @xref{Primitive Indent}, and | |||
| 1668 | @ref{Screen Lines}, for related functions. | 1667 | @ref{Screen Lines}, for related functions. |
| 1669 | 1668 | ||
| 1670 | @defun char-width char | 1669 | @defun char-width char |
| 1671 | This function returns the width in columns of the character @var{char}, | 1670 | This function returns the width in columns of the character |
| 1672 | if 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 |
| 1672 | into account the buffer's display table, if any; @pxref{Display | ||
| 1673 | Tables}). The width of a tab character is usually @code{tab-width} | ||
| 1674 | (@pxref{Usual Display}). | ||
| 1673 | @end defun | 1675 | @end defun |
| 1674 | 1676 | ||
| 1675 | @defun string-width string | 1677 | @defun string-width string |
| @@ -1815,26 +1817,27 @@ height. | |||
| 1815 | @section Faces | 1817 | @section Faces |
| 1816 | @cindex faces | 1818 | @cindex faces |
| 1817 | 1819 | ||
| 1818 | A @dfn{face} is a collection of graphical attributes for displaying | 1820 | A @dfn{face} is a collection of graphical @dfn{attributes} for |
| 1819 | text: font, foreground color, background color, optional underlining, | 1821 | displaying text: font, foreground color, background color, optional |
| 1820 | and so on. Faces control how buffer text is displayed, and how some | 1822 | underlining, and so on. Faces control how Emacs displays text in |
| 1821 | parts of the frame, such as the mode-line, are displayed. | 1823 | buffers, as well as other parts of the frame such as the mode line. |
| 1822 | @xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of | 1824 | @xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of |
| 1823 | faces Emacs normally comes with. | 1825 | faces Emacs normally comes with. |
| 1824 | 1826 | ||
| 1825 | @cindex face id | 1827 | @cindex face id |
| 1826 | For most purposes, you refer to a face in Lisp programs using its | 1828 | For most purposes, you refer to a face in Lisp programs using its |
| 1827 | @dfn{face name}. This is either a string or (equivalently) a Lisp | 1829 | @dfn{face name}, which is usually a Lisp symbol. For backward |
| 1828 | symbol whose name is equal to that string. | 1830 | compatibility, a face name can also be a string, which is equivalent |
| 1831 | to a Lisp symbol of the same name. | ||
| 1829 | 1832 | ||
| 1830 | @defun facep object | 1833 | @defun facep object |
| 1831 | This function returns a non-@code{nil} value if @var{object} is a Lisp | 1834 | This function returns a non-@code{nil} value if @var{object} is a Lisp |
| 1832 | symbol or string that names a face. Otherwise, it returns @code{nil}. | 1835 | symbol or string that names a face. Otherwise, it returns @code{nil}. |
| 1833 | @end defun | 1836 | @end defun |
| 1834 | 1837 | ||
| 1835 | Each face name is meaningful for all frames, and by default it has | 1838 | By default, each face name corresponds to the same set of attributes |
| 1836 | the same meaning in all frames. But you can arrange to give a | 1839 | in all frames. But you can also assign a face name a special set of |
| 1837 | particular face name a special meaning in one frame if you wish. | 1840 | attributes in one frame (@pxref{Attribute Functions}). |
| 1838 | 1841 | ||
| 1839 | @menu | 1842 | @menu |
| 1840 | * Defining Faces:: How to define a face with @code{defface}. | 1843 | * Defining Faces:: How to define a face with @code{defface}. |
| @@ -1857,9 +1860,8 @@ particular face name a special meaning in one frame if you wish. | |||
| 1857 | @subsection Defining Faces | 1860 | @subsection Defining Faces |
| 1858 | 1861 | ||
| 1859 | The way to define a new face is with @code{defface}. This creates a | 1862 | The way to define a new face is with @code{defface}. This creates a |
| 1860 | kind of customization item (@pxref{Customization}) which the user can | 1863 | kind of customization item which the user can customize using the |
| 1861 | customize using the Customization buffer (@pxref{Easy Customization,,, | 1864 | Customization buffer (@pxref{Customization}). |
| 1862 | emacs, The GNU Emacs Manual}). | ||
| 1863 | 1865 | ||
| 1864 | People are sometimes tempted to create variables whose values specify | 1866 | People are sometimes tempted to create variables whose values specify |
| 1865 | which faces to use (for example, Font-Lock does this). In the vast | 1867 | which faces to use (for example, Font-Lock does this). In the vast |
| @@ -1885,14 +1887,16 @@ exactly what the @code{defface} says. | |||
| 1885 | 1887 | ||
| 1886 | The purpose of @var{spec} is to specify how the face should appear on | 1888 | The purpose of @var{spec} is to specify how the face should appear on |
| 1887 | different kinds of terminals. It should be an alist whose elements | 1889 | different kinds of terminals. It should be an alist whose elements |
| 1888 | have the form @code{(@var{display} @var{atts})}. Each element's | 1890 | have the form @code{(@var{display} @var{atts})}. @var{display} |
| 1889 | @sc{car}, @var{display}, specifies a class of terminals. (The first | 1891 | specifies a class of terminals (see below), while @var{atts} is a |
| 1890 | element, if its @sc{car} is @code{default}, is special---it specifies | 1892 | property list of face attributes and their values, specifying the |
| 1891 | defaults for the remaining elements). The element's @sc{cadr}, | 1893 | appearance of the face on matching terminals |
| 1892 | @var{atts}, is a list of face attributes and their values; it | 1894 | @iftex |
| 1893 | specifies what the face should look like on that kind of terminal. | 1895 | (see the next section for details about face attributes). |
| 1894 | The possible attributes are defined in the value of | 1896 | @end iftex |
| 1895 | @code{custom-face-attributes}. | 1897 | @ifnottex |
| 1898 | (@pxref{Face Attributes}, for details about face attributes). | ||
| 1899 | @end ifnottex | ||
| 1896 | 1900 | ||
| 1897 | The @var{display} part of an element of @var{spec} determines which | 1901 | The @var{display} part of an element of @var{spec} determines which |
| 1898 | frames the element matches. If more than one element of @var{spec} | 1902 | frames the element matches. If more than one element of @var{spec} |
| @@ -1954,29 +1958,23 @@ frame must match one of the @var{value}s specified for it in | |||
| 1954 | @end table | 1958 | @end table |
| 1955 | @end defmac | 1959 | @end defmac |
| 1956 | 1960 | ||
| 1957 | Here's how the standard face @code{region} is defined: | 1961 | Here's how the standard face @code{highlight} is defined: |
| 1958 | 1962 | ||
| 1959 | @example | 1963 | @example |
| 1960 | @group | 1964 | (defface highlight |
| 1961 | (defface region | 1965 | '((((class color) (min-colors 88) (background light)) |
| 1962 | '((((class color) (min-colors 88) (background dark)) | 1966 | :background "darkseagreen2") |
| 1963 | :background "blue3") | 1967 | (((class color) (min-colors 88) (background dark)) |
| 1964 | @end group | 1968 | :background "darkolivegreen") |
| 1965 | (((class color) (min-colors 88) (background light)) | ||
| 1966 | :background "lightgoldenrod2") | ||
| 1967 | (((class color) (min-colors 16) (background dark)) | ||
| 1968 | :background "blue3") | ||
| 1969 | (((class color) (min-colors 16) (background light)) | 1969 | (((class color) (min-colors 16) (background light)) |
| 1970 | :background "lightgoldenrod2") | 1970 | :background "darkseagreen2") |
| 1971 | (((class color) (min-colors 16) (background dark)) | ||
| 1972 | :background "darkolivegreen") | ||
| 1971 | (((class color) (min-colors 8)) | 1973 | (((class color) (min-colors 8)) |
| 1972 | :background "blue" :foreground "white") | 1974 | :background "green" :foreground "black") |
| 1973 | (((type tty) (class mono)) | 1975 | (t :inverse-video t)) |
| 1974 | :inverse-video t) | 1976 | "Basic face for highlighting." |
| 1975 | (t :background "gray")) | ||
| 1976 | @group | ||
| 1977 | "Basic face for highlighting the region." | ||
| 1978 | :group 'basic-faces) | 1977 | :group 'basic-faces) |
| 1979 | @end group | ||
| 1980 | @end example | 1978 | @end example |
| 1981 | 1979 | ||
| 1982 | Internally, @code{defface} uses the symbol property | 1980 | Internally, @code{defface} uses the symbol property |
| @@ -2012,8 +2010,8 @@ doesn't specify that attribute. In face merging, when the first face | |||
| 2012 | fails to specify a particular attribute, the next face gets a chance. | 2010 | fails to specify a particular attribute, the next face gets a chance. |
| 2013 | However, the @code{default} face must specify all attributes. | 2011 | However, the @code{default} face must specify all attributes. |
| 2014 | 2012 | ||
| 2015 | Some of these font attributes are meaningful only on certain kinds | 2013 | Some of these attributes are meaningful only on certain kinds of |
| 2016 | of displays. If your display cannot handle a certain attribute, the | 2014 | displays. If your display cannot handle a certain attribute, the |
| 2017 | attribute is ignored. | 2015 | attribute is ignored. |
| 2018 | 2016 | ||
| 2019 | @table @code | 2017 | @table @code |
| @@ -2218,20 +2216,18 @@ This function sets one or more attributes of @var{face} for | |||
| 2218 | the @code{defface} says. | 2216 | the @code{defface} says. |
| 2219 | 2217 | ||
| 2220 | The extra arguments @var{arguments} specify the attributes to set, and | 2218 | The extra arguments @var{arguments} specify the attributes to set, and |
| 2221 | the values for them. They should consist of alternating attribute names | 2219 | the values for them. They should consist of alternating attribute |
| 2222 | (such as @code{:family} or @code{:underline}) and corresponding values. | 2220 | names (such as @code{:family} or @code{:underline}) and values. Thus, |
| 2223 | Thus, | ||
| 2224 | 2221 | ||
| 2225 | @example | 2222 | @example |
| 2226 | (set-face-attribute 'foo nil | 2223 | (set-face-attribute 'foo nil |
| 2227 | :width 'extended | 2224 | :width 'extended |
| 2228 | :weight 'bold | 2225 | :weight 'bold) |
| 2229 | :underline "red") | ||
| 2230 | @end example | 2226 | @end example |
| 2231 | 2227 | ||
| 2232 | @noindent | 2228 | @noindent |
| 2233 | sets the attributes @code{:width}, @code{:weight} and @code{:underline} | 2229 | sets the attribute @code{:width} to @code{extended} and the attribute |
| 2234 | to the corresponding values. | 2230 | @code{:weight} to @code{bold}. |
| 2235 | 2231 | ||
| 2236 | If @var{frame} is @code{t}, this function sets the default attributes | 2232 | If @var{frame} is @code{t}, this function sets the default attributes |
| 2237 | for new frames. Default attribute values specified this way override | 2233 | for new frames. Default attribute values specified this way override |
| @@ -2308,54 +2304,51 @@ If @var{value1} is a relative value for the face attribute | |||
| 2308 | face attribute @var{attribute}, returns @var{value1} unchanged. | 2304 | face attribute @var{attribute}, returns @var{value1} unchanged. |
| 2309 | @end defun | 2305 | @end defun |
| 2310 | 2306 | ||
| 2311 | The following functions provide compatibility with Emacs 20 and | 2307 | The following commands and functions mostly provide compatibility |
| 2312 | below. They work by calling @code{set-face-attribute}. Values of | 2308 | with old versions of Emacs. They work by calling |
| 2313 | @code{t} and @code{nil} for their @var{frame} argument are handled | 2309 | @code{set-face-attribute}. Values of @code{t} and @code{nil} for |
| 2314 | just like @code{set-face-attribute} and @code{face-attribute}. | 2310 | their @var{frame} argument are handled just like |
| 2311 | @code{set-face-attribute} and @code{face-attribute}. The commands | ||
| 2312 | read their arguments using the minibuffer, if called interactively. | ||
| 2315 | 2313 | ||
| 2316 | @defun set-face-foreground face color &optional frame | 2314 | @deffn Command set-face-foreground face color &optional frame |
| 2317 | @defunx set-face-background face color &optional frame | 2315 | @deffnx Command set-face-background face color &optional frame |
| 2318 | These functions set the @code{:foreground} attribute (or | 2316 | These set the @code{:foreground} attribute (or @code{:background} |
| 2319 | @code{:background} attribute, respectively) of @var{face} to | 2317 | attribute, respectively) of @var{face} to @var{color}. |
| 2320 | @var{color}. | 2318 | @end deffn |
| 2321 | @end defun | ||
| 2322 | 2319 | ||
| 2323 | @defun set-face-stipple face pattern &optional frame | 2320 | @deffn Command set-face-stipple face pattern &optional frame |
| 2324 | This function sets the @code{:stipple} attribute of @var{face} to | 2321 | This sets the @code{:stipple} attribute of @var{face} to |
| 2325 | @var{pattern}. | 2322 | @var{pattern}. |
| 2326 | @end defun | 2323 | @end deffn |
| 2327 | 2324 | ||
| 2328 | @defun set-face-font face font &optional frame | 2325 | @deffn Command set-face-font face font &optional frame |
| 2329 | This function sets the @code{:font} attribute of @var{face} to | 2326 | This sets the @code{:font} attribute of @var{face} to @var{font}. |
| 2330 | @var{font}. | 2327 | @end deffn |
| 2331 | @end defun | ||
| 2332 | 2328 | ||
| 2333 | @defun set-face-bold-p face bold-p &optional frame | 2329 | @defun set-face-bold-p face bold-p &optional frame |
| 2334 | This function sets the @code{:weight} attribute of @var{face} to | 2330 | This sets the @code{:weight} attribute of @var{face} to @var{normal} |
| 2335 | @var{normal} if @var{bold-p} is @code{nil}, and to @var{bold} | 2331 | if @var{bold-p} is @code{nil}, and to @var{bold} otherwise. |
| 2336 | otherwise. | ||
| 2337 | @end defun | 2332 | @end defun |
| 2338 | 2333 | ||
| 2339 | @defun set-face-italic-p face italic-p &optional frame | 2334 | @defun set-face-italic-p face italic-p &optional frame |
| 2340 | This function sets the @code{:slant} attribute of @var{face} to | 2335 | This sets the @code{:slant} attribute of @var{face} to @var{normal} if |
| 2341 | @var{normal} if @var{italic-p} is @code{nil}, and to @var{italic} | 2336 | @var{italic-p} is @code{nil}, and to @var{italic} otherwise. |
| 2342 | otherwise. | ||
| 2343 | @end defun | 2337 | @end defun |
| 2344 | 2338 | ||
| 2345 | @defun set-face-underline-p face underline &optional frame | 2339 | @defun set-face-underline-p face underline &optional frame |
| 2346 | This function sets the @code{:underline} attribute of @var{face} to | 2340 | This sets the @code{:underline} attribute of @var{face} to |
| 2347 | @var{underline}. | 2341 | @var{underline}. |
| 2348 | @end defun | 2342 | @end defun |
| 2349 | 2343 | ||
| 2350 | @defun set-face-inverse-video-p face inverse-video-p &optional frame | 2344 | @defun set-face-inverse-video-p face inverse-video-p &optional frame |
| 2351 | This function sets the @code{:inverse-video} attribute of @var{face} | 2345 | This sets the @code{:inverse-video} attribute of @var{face} to |
| 2352 | to @var{inverse-video-p}. | 2346 | @var{inverse-video-p}. |
| 2353 | @end defun | 2347 | @end defun |
| 2354 | 2348 | ||
| 2355 | @defun invert-face face &optional frame | 2349 | @deffn Command invert-face face &optional frame |
| 2356 | This function swaps the foreground and background colors of face | 2350 | This swaps the foreground and background colors of face @var{face}. |
| 2357 | @var{face}. | 2351 | @end deffn |
| 2358 | @end defun | ||
| 2359 | 2352 | ||
| 2360 | The following functions examine the attributes of a face. If you | 2353 | The following functions examine the attributes of a face. If you |
| 2361 | don't specify @var{frame}, they refer to the selected frame; @code{t} | 2354 | don't specify @var{frame}, they refer to the selected frame; @code{t} |
| @@ -2461,27 +2454,26 @@ steps, Emacs applies the attribute of the @code{default} face. | |||
| 2461 | If these various sources together specify more than one face for a | 2454 | If these various sources together specify more than one face for a |
| 2462 | particular character, Emacs merges the attributes of the various faces | 2455 | particular character, Emacs merges the attributes of the various faces |
| 2463 | specified. For each attribute, Emacs tries using the above order | 2456 | specified. For each attribute, Emacs tries using the above order |
| 2464 | (i.e., first the face of any special glyph; then the face for region | 2457 | (i.e.@: first the face of any special glyph; then the face for region |
| 2465 | highlighting, if appropriate; then faces specified by overlays, then | 2458 | highlighting, if appropriate; and so on). |
| 2466 | faces specified by text properties, then the @code{mode-line} or | ||
| 2467 | @code{mode-line-inactive} or @code{header-line} face, if appropriate, | ||
| 2468 | and finally the @code{default} face). | ||
| 2469 | 2459 | ||
| 2470 | @node Face Remapping | 2460 | @node Face Remapping |
| 2471 | @subsection Face Remapping | 2461 | @subsection Face Remapping |
| 2472 | 2462 | ||
| 2473 | The variable @code{face-remapping-alist} is used for buffer-local or | 2463 | The variable @code{face-remapping-alist} is used for buffer-local or |
| 2474 | global changes in the appearance of a face. For instance, it can be | 2464 | global changes in the appearance of a face. For instance, it is used |
| 2475 | used to make the @code{default} face a variable-pitch face within a | 2465 | to implement the @code{text-scale-adjust} command (@pxref{Text |
| 2476 | particular buffer. | 2466 | Scale,,, emacs, The GNU Emacs Manual}). |
| 2477 | 2467 | ||
| 2478 | @defvar face-remapping-alist | 2468 | @defvar face-remapping-alist |
| 2479 | An alist whose elements have the form @code{(@var{face} | 2469 | The value of this variable is an alist whose elements have the form |
| 2480 | @var{remapping...})}. This causes Emacs to display text using the | 2470 | @code{(@var{face} . @var{remapping})}. This causes Emacs to display |
| 2481 | face @var{face} using @var{remapping...} instead of @var{face}'s | 2471 | any text having the face @var{face} with @var{remapping}, rather than |
| 2482 | ordinary definition. @var{remapping...} may be any face specification | 2472 | the ordinary definition of @var{face}. @var{remapping} may be any |
| 2483 | suitable for a @code{face} text property: either a face name, or a | 2473 | face specification suitable for a @code{face} text property: either a |
| 2484 | property list of attribute/value pairs. @xref{Special Properties}. | 2474 | face name, or a property list of attribute/value pairs, or a list in |
| 2475 | which each element is either a face name or a property list | ||
| 2476 | (@pxref{Special Properties}). | ||
| 2485 | 2477 | ||
| 2486 | If @code{face-remapping-alist} is buffer-local, its local value takes | 2478 | If @code{face-remapping-alist} is buffer-local, its local value takes |
| 2487 | effect only within that buffer. | 2479 | effect only within that buffer. |
| @@ -2490,17 +2482,15 @@ Two points bear emphasizing: | |||
| 2490 | 2482 | ||
| 2491 | @enumerate | 2483 | @enumerate |
| 2492 | @item | 2484 | @item |
| 2493 | The new definition @var{remapping...} is the complete | 2485 | @var{remapping} serves as the complete specification for the remapped |
| 2494 | specification of how to display @var{face}---it entirely replaces, | 2486 | face---it replaces the normal definition of @var{face}, instead of |
| 2495 | rather than augmenting or modifying, the normal definition of that | 2487 | modifying it. |
| 2496 | face. | ||
| 2497 | 2488 | ||
| 2498 | @item | 2489 | @item |
| 2499 | If @var{remapping...} recursively references the same face name | 2490 | If @var{remapping} references the same face name @var{face}, either |
| 2500 | @var{face}, either directly remapping entry, or via the | 2491 | directly or via the @code{:inherit} attribute of some other face in |
| 2501 | @code{:inherit} attribute of some other face in @var{remapping...}, | 2492 | @var{remapping}, that reference uses the normal definition of |
| 2502 | then that reference uses the normal definition of @var{face} in the | 2493 | @var{face}. In other words, the remapping cannot be recursive. |
| 2503 | selected frame, instead of the ``remapped'' definition. | ||
| 2504 | 2494 | ||
| 2505 | For instance, if the @code{mode-line} face is remapped using this | 2495 | For instance, if the @code{mode-line} face is remapped using this |
| 2506 | entry in @code{face-remapping-alist}: | 2496 | entry in @code{face-remapping-alist}: |
| @@ -2514,82 +2504,72 @@ then the new definition of the @code{mode-line} face inherits from the | |||
| 2514 | @end enumerate | 2504 | @end enumerate |
| 2515 | @end defvar | 2505 | @end defvar |
| 2516 | 2506 | ||
| 2517 | A typical use of the @code{face-remapping-alist} is to change a | ||
| 2518 | buffer's @code{default} face; for example, the following changes a | ||
| 2519 | buffer's @code{default} face to use the @code{variable-pitch} face, | ||
| 2520 | with the height doubled: | ||
| 2521 | |||
| 2522 | @example | ||
| 2523 | (set (make-local-variable 'face-remapping-alist) | ||
| 2524 | '((default variable-pitch :height 2.0))) | ||
| 2525 | @end example | ||
| 2526 | |||
| 2527 | The following functions implement a higher-level interface to | 2507 | The following functions implement a higher-level interface to |
| 2528 | @code{face-remapping-alist}, making it easier to use | 2508 | @code{face-remapping-alist}. Most Lisp code should use these |
| 2529 | ``cooperatively''. They are mainly intended for buffer-local use, and | 2509 | functions instead of setting @code{face-remapping-alist} directly, to |
| 2530 | so all make @code{face-remapping-alist} variable buffer-local as a | 2510 | avoid trampling on remappings applied elsewhere. These functions are |
| 2531 | side-effect. They use entries in @code{face-remapping-alist} which | 2511 | intended for buffer-local remappings, so they all make |
| 2532 | have the general form: | 2512 | @code{face-remapping-alist} buffer-local as a side-effect. They manage |
| 2513 | @code{face-remapping-alist} entries of the form | ||
| 2533 | 2514 | ||
| 2534 | @example | 2515 | @example |
| 2535 | (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs}) | 2516 | (@var{face} @var{relative-spec-1} @var{relative-spec-2} @var{...} @var{base-spec}) |
| 2536 | @end example | 2517 | @end example |
| 2537 | 2518 | ||
| 2538 | Everything except @var{face} is a ``face spec'': a list of face names | 2519 | @noindent |
| 2539 | or face attribute-value pairs. All face specs are merged together, | 2520 | where, as explained above, each of the @var{relative-spec-N} and |
| 2540 | with earlier values taking precedence. | 2521 | @var{base-spec} is either a face name, or a property list of |
| 2541 | 2522 | attribute/value pairs. Each of the @dfn{relative remapping} entries, | |
| 2542 | The @var{relative_specs_}n values are ``relative specs'', and are | 2523 | @var{relative-spec-N}, is managed by the |
| 2543 | added by @code{face-remap-add-relative} (and removed by | 2524 | @code{face-remap-add-relative} and @code{face-remap-remove-relative} |
| 2544 | @code{face-remap-remove-relative}. These are intended for face | 2525 | functions; these are intended for simple modifications like changing |
| 2545 | modifications (such as increasing the size). Typical users of these | 2526 | the text size. The @dfn{base remapping} entry, @var{base-spec}, has |
| 2546 | relative specs would be minor modes. | 2527 | the lowest priority and is managed by the @code{face-remap-set-base} |
| 2547 | 2528 | and @code{face-remap-reset-base} functions; it is intended for major | |
| 2548 | @var{base_specs} is the lowest-priority value, and by default is just the | 2529 | modes to remap faces in the buffers they control. |
| 2549 | face name, which causes the global definition of that face to be used. | ||
| 2550 | |||
| 2551 | A non-default value of @var{base_specs} may also be set using | ||
| 2552 | @code{face-remap-set-base}. Because this @emph{overwrites} the | ||
| 2553 | default base-spec value (which inherits the global face definition), | ||
| 2554 | it is up to the caller of @code{face-remap-set-base} to add such | ||
| 2555 | inheritance if it is desired. A typical use of | ||
| 2556 | @code{face-remap-set-base} would be a major mode adding a face | ||
| 2557 | remappings, e.g., of the default face. | ||
| 2558 | |||
| 2559 | 2530 | ||
| 2560 | @defun face-remap-add-relative face &rest specs | 2531 | @defun face-remap-add-relative face &rest specs |
| 2561 | This functions adds a face remapping entry of @var{face} to @var{specs} | 2532 | This functions adds the face specifications in @var{specs} as relative |
| 2562 | in the current buffer. | 2533 | remappings for face @var{face} in the current buffer. The remaining |
| 2534 | arguments, @var{specs}, should form either a list of face names, or a | ||
| 2535 | property list of attribute/value pairs. | ||
| 2536 | |||
| 2537 | The return value is a Lisp object that serves as a ``cookie''; you can | ||
| 2538 | pass this object as an argument to @code{face-remap-remove-relative} | ||
| 2539 | if you need to remove the remapping later. | ||
| 2563 | 2540 | ||
| 2564 | It returns a ``cookie'' which can be used to later delete the remapping with | 2541 | @example |
| 2565 | @code{face-remap-remove-relative}. | 2542 | ;; Remap the `escape-glyph' face into a combination |
| 2543 | ;; of the `highlight' and `italic' faces: | ||
| 2544 | (face-remap-add-relative 'escape-glyph 'highlight 'italic) | ||
| 2566 | 2545 | ||
| 2567 | @var{specs} can be any value suitable for the @code{face} text | 2546 | ;; Increase the size of the `default' face by 50%: |
| 2568 | property, including a face name, a list of face names, or a | 2547 | (face-remap-add-relative 'default :height 1.5) |
| 2569 | face-attribute property list. The attributes given by @var{specs} | 2548 | @end example |
| 2570 | will be merged with any other currently active face remappings of | ||
| 2571 | @var{face}, and with the global definition of @var{face} (by default; | ||
| 2572 | this may be changed using @code{face-remap-set-base}), with the most | ||
| 2573 | recently added relative remapping taking precedence. | ||
| 2574 | @end defun | 2549 | @end defun |
| 2575 | 2550 | ||
| 2576 | @defun face-remap-remove-relative cookie | 2551 | @defun face-remap-remove-relative cookie |
| 2577 | This function removes a face remapping previously added by | 2552 | This function removes a relative remapping previously added by |
| 2578 | @code{face-remap-add-relative}. @var{cookie} should be a return value | 2553 | @code{face-remap-add-relative}. @var{cookie} should be the Lisp |
| 2579 | from that function. | 2554 | object returned by @code{face-remap-add-relative} when the remapping |
| 2555 | was added. | ||
| 2580 | @end defun | 2556 | @end defun |
| 2581 | 2557 | ||
| 2582 | @defun face-remap-set-base face &rest specs | 2558 | @defun face-remap-set-base face &rest specs |
| 2583 | This function sets the ``base remapping'' of @var{face} in the current | 2559 | This function sets the base remapping of @var{face} in the current |
| 2584 | buffer to @var{specs}. If @var{specs} is empty, the default base | 2560 | buffer to @var{specs}. If @var{specs} is empty, the default base |
| 2585 | remapping is restored, which inherits from the global definition of | 2561 | remapping is restored, similar to calling @code{face-remap-reset-base} |
| 2586 | @var{face}; note that this is different from @var{specs} containing a | 2562 | (see below); note that this is different from @var{specs} containing a |
| 2587 | single value @code{nil}, which has the opposite result (the global | 2563 | single value @code{nil}, which has the opposite result (the global |
| 2588 | definition of @var{face} is ignored). | 2564 | definition of @var{face} is ignored). |
| 2565 | |||
| 2566 | This overwrites the default @var{base-spec}, which inherits the global | ||
| 2567 | face definition, so it is up to the caller to add such inheritance if | ||
| 2568 | so desired. | ||
| 2589 | @end defun | 2569 | @end defun |
| 2590 | 2570 | ||
| 2591 | @defun face-remap-reset-base face | 2571 | @defun face-remap-reset-base face |
| 2592 | This function sets the ``base remapping'' of @var{face} to its default | 2572 | This function sets the base remapping of @var{face} to its default |
| 2593 | value, which inherits from @var{face}'s global definition. | 2573 | value, which inherits from @var{face}'s global definition. |
| 2594 | @end defun | 2574 | @end defun |
| 2595 | 2575 | ||
| @@ -2598,29 +2578,8 @@ value, which inherits from @var{face}'s global definition. | |||
| 2598 | 2578 | ||
| 2599 | Here are additional functions for creating and working with faces. | 2579 | Here are additional functions for creating and working with faces. |
| 2600 | 2580 | ||
| 2601 | @defun make-face name | ||
| 2602 | This function defines a new face named @var{name}, initially with all | ||
| 2603 | attributes @code{nil}. It does nothing if there is already a face named | ||
| 2604 | @var{name}. | ||
| 2605 | @end defun | ||
| 2606 | |||
| 2607 | @defun face-list | 2581 | @defun face-list |
| 2608 | This function returns a list of all defined faces. | 2582 | This function returns a list of all defined face names. |
| 2609 | @end defun | ||
| 2610 | |||
| 2611 | @defun copy-face old-face new-name &optional frame new-frame | ||
| 2612 | This function defines a face named @var{new-name} as a copy of the existing | ||
| 2613 | face named @var{old-face}. It creates the face @var{new-name} if that | ||
| 2614 | doesn't already exist. | ||
| 2615 | |||
| 2616 | If the optional argument @var{frame} is given, this function applies | ||
| 2617 | only to that frame. Otherwise it applies to each frame individually, | ||
| 2618 | copying attributes from @var{old-face} in each frame to @var{new-face} | ||
| 2619 | in the same frame. | ||
| 2620 | |||
| 2621 | If the optional argument @var{new-frame} is given, then @code{copy-face} | ||
| 2622 | copies the attributes of @var{old-face} in @var{frame} to @var{new-name} | ||
| 2623 | in @var{new-frame}. | ||
| 2624 | @end defun | 2583 | @end defun |
| 2625 | 2584 | ||
| 2626 | @defun face-id face | 2585 | @defun face-id face |
| @@ -2754,7 +2713,7 @@ these are used for messages in @samp{*Compilation*} buffers. | |||
| 2754 | @node Font Selection | 2713 | @node Font Selection |
| 2755 | @subsection Font Selection | 2714 | @subsection Font Selection |
| 2756 | 2715 | ||
| 2757 | Before Emacs can draw a character on a particular display, it must | 2716 | Before Emacs can draw a character on a graphical display, it must |
| 2758 | select a @dfn{font} for that character@footnote{In this context, the | 2717 | select a @dfn{font} for that character@footnote{In this context, the |
| 2759 | term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock | 2718 | term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock |
| 2760 | Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally, | 2719 | Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally, |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 1021787a0f4..2563bc57aef 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -248,6 +248,9 @@ previous session. @xref{Session Management}. | |||
| 248 | 248 | ||
| 249 | @end enumerate | 249 | @end enumerate |
| 250 | 250 | ||
| 251 | @noindent | ||
| 252 | The following options affect some aspects of the startup sequence. | ||
| 253 | |||
| 251 | @defopt inhibit-startup-screen | 254 | @defopt inhibit-startup-screen |
| 252 | This variable, if non-@code{nil}, inhibits the startup screen. In | 255 | This variable, if non-@code{nil}, inhibits the startup screen. In |
| 253 | that case, Emacs typically displays the @samp{*scratch*} buffer; but | 256 | that case, Emacs typically displays the @samp{*scratch*} buffer; but |
| @@ -265,9 +268,13 @@ aliases for this variable. | |||
| 265 | 268 | ||
| 266 | @defopt initial-buffer-choice | 269 | @defopt initial-buffer-choice |
| 267 | This variable, if non-@code{nil}, determines a file or buffer for | 270 | This variable, if non-@code{nil}, determines a file or buffer for |
| 268 | Emacs to display after starting up, instead of the startup screen. If | 271 | Emacs to display after starting up, instead of the startup screen. |
| 269 | its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. If | 272 | @ignore |
| 270 | its value is a string, that specifies the name of a file for Emacs to | 273 | @c I do not think this should be mentioned. AFAICS it is just a dodge |
| 274 | @c around inhibit-startup-screen not being settable on a site-wide basis. | ||
| 275 | If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. | ||
| 276 | @end ignore | ||
| 277 | If its value is a string, that specifies the name of a file for Emacs to | ||
| 271 | visit. | 278 | visit. |
| 272 | @end defopt | 279 | @end defopt |
| 273 | 280 | ||
| @@ -283,7 +290,7 @@ form to your init file: | |||
| 283 | 290 | ||
| 284 | Emacs explicitly checks for an expression as shown above in your init | 291 | Emacs explicitly checks for an expression as shown above in your init |
| 285 | file; your login name must appear in the expression as a Lisp string | 292 | file; your login name must appear in the expression as a Lisp string |
| 286 | constant. Other methods of setting | 293 | constant. You can also use the Custom interface. Other methods of setting |
| 287 | @code{inhibit-startup-echo-area-message} to the same value do not | 294 | @code{inhibit-startup-echo-area-message} to the same value do not |
| 288 | inhibit the startup message. This way, you can easily inhibit the | 295 | inhibit the startup message. This way, you can easily inhibit the |
| 289 | message for yourself if you wish, but thoughtless copying of your init | 296 | message for yourself if you wish, but thoughtless copying of your init |
| @@ -296,6 +303,34 @@ inserted into the @samp{*scratch*} buffer when Emacs starts up. If it | |||
| 296 | is @code{nil}, the @samp{*scratch*} buffer is empty. | 303 | is @code{nil}, the @samp{*scratch*} buffer is empty. |
| 297 | @end defopt | 304 | @end defopt |
| 298 | 305 | ||
| 306 | @noindent | ||
| 307 | The following command-line options affect some aspects of the startup | ||
| 308 | sequence. @xref{Initial Options,,, emacs, The GNU Emacs Manual}. | ||
| 309 | |||
| 310 | @table @code | ||
| 311 | @item --no-splash | ||
| 312 | Do not display a splash screen. | ||
| 313 | |||
| 314 | @item --batch | ||
| 315 | Run without an interactive terminal. @xref{Batch Mode}. | ||
| 316 | |||
| 317 | @item --daemon | ||
| 318 | Do not initialize any display; just start a server in the background. | ||
| 319 | |||
| 320 | @item --no-init-file | ||
| 321 | @itemx -Q | ||
| 322 | Do not load either the init file, or the @file{default} library. | ||
| 323 | |||
| 324 | @item --no-site-file | ||
| 325 | Do not load the @file{site-start} library. | ||
| 326 | |||
| 327 | @item --quick | ||
| 328 | @itemx -Q | ||
| 329 | Equivalent to @samp{-q --no-site-file --no-splash}. | ||
| 330 | @c and --no-site-lisp, but let's not mention that here. | ||
| 331 | @end table | ||
| 332 | |||
| 333 | |||
| 299 | @node Init File | 334 | @node Init File |
| 300 | @subsection The Init File | 335 | @subsection The Init File |
| 301 | @cindex init file | 336 | @cindex init file |
| @@ -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 a6f5a5fd525..ea7d81bb969 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2012-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 | |||
| 7 | 2012-03-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8 | |||
| 9 | * wid-edit.el (widget-complete-field): Remove (bug#11051). | ||
| 10 | (widget-complete): Remove broken use of it. | ||
| 11 | |||
| 12 | 2012-03-20 Chong Yidong <cyd@gnu.org> | ||
| 13 | |||
| 14 | * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): | ||
| 15 | Use string-width and truncate-string-width to handle arbitrary | ||
| 16 | characters. | ||
| 17 | |||
| 18 | 2012-03-20 Tassilo Horn <tassilo@member.fsf.org> | ||
| 19 | |||
| 20 | * textmodes/artist.el (artist-menu-map): Bind Rectangle menu item | ||
| 21 | to draw rectangles, not squares. (Regression introduced by revno | ||
| 22 | 2011-03-02T03:48:01Z!cyd@stupidchicken.com) | ||
| 23 | |||
| 1 | 2012-03-18 Chong Yidong <cyd@gnu.org> | 24 | 2012-03-18 Chong Yidong <cyd@gnu.org> |
| 2 | 25 | ||
| 3 | * faces.el (face-spec-reset-face): Don't call display-graphic-p if | 26 | * faces.el (face-spec-reset-face): Don't call display-graphic-p if |
| @@ -5,8 +28,7 @@ | |||
| 5 | 28 | ||
| 6 | 2012-03-18 Leo Liu <sdl.web@gmail.com> | 29 | 2012-03-18 Leo Liu <sdl.web@gmail.com> |
| 7 | 30 | ||
| 8 | * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with | 31 | * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with prefix. |
| 9 | prefix. | ||
| 10 | 32 | ||
| 11 | 2012-03-17 Eli Zaretskii <eliz@gnu.org> | 33 | 2012-03-17 Eli Zaretskii <eliz@gnu.org> |
| 12 | 34 | ||
| @@ -36,7 +58,7 @@ | |||
| 36 | (hfy-fontify-buffer): Use above handlers. | 58 | (hfy-fontify-buffer): Use above handlers. |
| 37 | (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. | 59 | (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. |
| 38 | (hfy-face-to-css): Re-defined to be a variable. | 60 | (hfy-face-to-css): Re-defined to be a variable. |
| 39 | (hfy-compile-stylesheet): Modified. Allow stylesheet to be built | 61 | (hfy-compile-stylesheet): Modify. Allow stylesheet to be built |
| 40 | over multiple runs. This is made possible by having the caller let | 62 | over multiple runs. This is made possible by having the caller let |
| 41 | bind a special variable `hfy-user-sheet-assoc'. | 63 | bind a special variable `hfy-user-sheet-assoc'. |
| 42 | (htmlfontify-string): New defun. | 64 | (htmlfontify-string): New defun. |
| @@ -60,10 +82,8 @@ | |||
| 60 | * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use a | 82 | * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use a |
| 61 | limit to a call of `c-literal-limits'. | 83 | limit to a call of `c-literal-limits'. |
| 62 | (c-determine-+ve-limit): New function. | 84 | (c-determine-+ve-limit): New function. |
| 63 | (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an | 85 | (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an `and'. |
| 64 | `and'. | 86 | (c-guess-basic-syntax): In macros, restrict a search limit to 2000. |
| 65 | (c-guess-basic-syntax): In macros, restrict a search limit to | ||
| 66 | 2000. | ||
| 67 | In CASE 5B, restrict a search limit to 500. | 87 | In CASE 5B, restrict a search limit to 500. |
| 68 | (c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'. | 88 | (c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'. |
| 69 | 89 | ||
| @@ -77,7 +97,7 @@ | |||
| 77 | 2012-03-16 Aaron S. Hawley <Aaron.S.Hawley@gmail.com> | 97 | 2012-03-16 Aaron S. Hawley <Aaron.S.Hawley@gmail.com> |
| 78 | 98 | ||
| 79 | * tar-mode.el (tar-mode): Fix saving by conditionally undoing | 99 | * tar-mode.el (tar-mode): Fix saving by conditionally undoing |
| 80 | `special-mode' setting of `buffer-read-only'. (Bug#11010) | 100 | `special-mode' setting of `buffer-read-only'. (Bug#11010) |
| 81 | 101 | ||
| 82 | 2012-03-16 Glenn Morris <rgm@gnu.org> | 102 | 2012-03-16 Glenn Morris <rgm@gnu.org> |
| 83 | 103 | ||
| @@ -144,8 +164,7 @@ | |||
| 144 | 164 | ||
| 145 | 2012-03-12 Leo Liu <sdl.web@gmail.com> | 165 | 2012-03-12 Leo Liu <sdl.web@gmail.com> |
| 146 | 166 | ||
| 147 | * simple.el (kill-new): Use equal-including-properties for | 167 | * simple.el (kill-new): Use equal-including-properties for comparison. |
| 148 | comparison. | ||
| 149 | (kill-do-not-save-duplicates): Doc fix. | 168 | (kill-do-not-save-duplicates): Doc fix. |
| 150 | 169 | ||
| 151 | 2012-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | 170 | 2012-03-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| @@ -227,8 +246,7 @@ | |||
| 227 | 246 | ||
| 228 | * net/mairix.el (mairix-replace-invalid-chars): Rename from | 247 | * net/mairix.el (mairix-replace-invalid-chars): Rename from |
| 229 | mairix-replace-illegal-chars; all callers changed. Don't remove | 248 | mairix-replace-illegal-chars; all callers changed. Don't remove |
| 230 | ^, ~, and = characters: they are meaningful in mairix search | 249 | ^, ~, and = characters: they are meaningful in mairix search specs. |
| 231 | specs. | ||
| 232 | (mairix-widget-create-query): Add usage information about mairix | 250 | (mairix-widget-create-query): Add usage information about mairix |
| 233 | search forms: negating words, searching for substrings, etc. | 251 | search forms: negating words, searching for substrings, etc. |
| 234 | 252 | ||
| @@ -413,8 +431,7 @@ | |||
| 413 | 431 | ||
| 414 | 2012-03-04 Chong Yidong <cyd@gnu.org> | 432 | 2012-03-04 Chong Yidong <cyd@gnu.org> |
| 415 | 433 | ||
| 416 | * cus-start.el: Make x-select-enable-clipboard-manager | 434 | * cus-start.el: Make x-select-enable-clipboard-manager customizable. |
| 417 | customizable. | ||
| 418 | 435 | ||
| 419 | 2012-03-04 Glenn Morris <rgm@gnu.org> | 436 | 2012-03-04 Glenn Morris <rgm@gnu.org> |
| 420 | 437 | ||
| @@ -545,7 +562,7 @@ | |||
| 545 | (font-lock-default-function): Move the check for a specification | 562 | (font-lock-default-function): Move the check for a specification |
| 546 | to font-lock-spec-present. | 563 | to font-lock-spec-present. |
| 547 | 564 | ||
| 548 | * font-lock.el (font-lock-initial-fontify): call ... | 565 | * font-lock.el (font-lock-initial-fontify): Call ... |
| 549 | (font-lock-spec-present): New function. | 566 | (font-lock-spec-present): New function. |
| 550 | 567 | ||
| 551 | 2012-02-26 Jim Blandy <jimb@red-bean.com> | 568 | 2012-02-26 Jim Blandy <jimb@red-bean.com> |
| @@ -874,8 +891,7 @@ | |||
| 874 | 891 | ||
| 875 | 2012-02-12 Teodor Zlatanov <tzz@lifelogs.com> | 892 | 2012-02-12 Teodor Zlatanov <tzz@lifelogs.com> |
| 876 | 893 | ||
| 877 | * net/gnutls.el (gnutls-algorithm-priority): Add missing :group | 894 | * net/gnutls.el (gnutls-algorithm-priority): Add missing :group tag. |
| 878 | tag. | ||
| 879 | 895 | ||
| 880 | 2012-02-12 Alan Mackenzie <acm@muc.de> | 896 | 2012-02-12 Alan Mackenzie <acm@muc.de> |
| 881 | 897 | ||
| @@ -1048,8 +1064,8 @@ | |||
| 1048 | * progmodes/cc-guess.el (c-guess-offset-threshold, c-guess-region-max): | 1064 | * progmodes/cc-guess.el (c-guess-offset-threshold, c-guess-region-max): |
| 1049 | Add :version tags. | 1065 | Add :version tags. |
| 1050 | 1066 | ||
| 1051 | * progmodes/compile.el (compilation-first-column) | 1067 | * progmodes/compile.el (compilation-error-screen-columns) |
| 1052 | (compilation-error-screen-columns, compilation-filter-start): Doc fixes. | 1068 | (compilation-first-column, compilation-filter-start): Doc fixes. |
| 1053 | 1069 | ||
| 1054 | * vc/log-view.el (log-view-toggle-entry-display): | 1070 | * vc/log-view.el (log-view-toggle-entry-display): |
| 1055 | * vc/vc.el (vc-merge, vc-pull): Doc fixes. | 1071 | * vc/vc.el (vc-merge, vc-pull): Doc fixes. |
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 8fe514ab551..f17b12da6a0 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el | |||
| @@ -278,11 +278,10 @@ of column descriptors." | |||
| 278 | (width (nth 1 format)) | 278 | (width (nth 1 format)) |
| 279 | (label (if (stringp desc) desc (car desc))) | 279 | (label (if (stringp desc) desc (car desc))) |
| 280 | (help-echo (concat (car format) ": " label))) | 280 | (help-echo (concat (car format) ": " label))) |
| 281 | ;; Truncate labels if necessary. | 281 | ;; Truncate labels if necessary (except last column). |
| 282 | (and (> width 6) | 282 | (and (< (1+ n) len) |
| 283 | (> (length label) width) | 283 | (> (string-width label) width) |
| 284 | (setq label (concat (substring label 0 (- width 3)) | 284 | (setq label (truncate-string-to-width label width nil nil t))) |
| 285 | "..."))) | ||
| 286 | (setq label (bidi-string-mark-left-to-right label)) | 285 | (setq label (bidi-string-mark-left-to-right label)) |
| 287 | (if (stringp desc) | 286 | (if (stringp desc) |
| 288 | (insert (propertize label 'help-echo help-echo)) | 287 | (insert (propertize label 'help-echo help-echo)) |
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 | 109 | Return a cookie which can be used to delete this remapping with | |
| 110 | Return a cookie which can be used to delete the remapping with | ||
| 111 | `face-remap-remove-relative'. | 110 | `face-remap-remove-relative'. |
| 112 | 111 | ||
| 113 | SPECS can be any value suitable for the `face' text property, | 112 | The remaining arguments, SPECS, should be either a list of face |
| 114 | including a face name, a list of face names, or a face-attribute | 113 | names, or a property list of face attribute/value pairs. The |
| 115 | property list. The attributes given by SPECS will be merged with | 114 | remapping specified by SPECS takes effect alongside the |
| 116 | any other currently active face remappings of FACE, and with the | 115 | remappings from other calls to `face-remap-add-relative', as well |
| 117 | global definition of FACE. An attempt is made to sort multiple | 116 | as the normal definition of FACE (at lowest priority). This |
| 118 | entries so that entries with relative face-attributes are applied | 117 | function tries to sort multiple remappings for the same face, so |
| 119 | after entries with absolute face-attributes. | 118 | that remappings specifying relative face attributes are applied |
| 120 | 119 | after remappings specifying absolute face attributes. | |
| 121 | The base (lowest priority) remapping may be set to a specific | 120 | |
| 122 | value, instead of the default of the global face definition, | 121 | The base (lowest priority) remapping may be set to something |
| 123 | using `face-remap-set-base'." | 122 | other 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. |
| 151 | This causes the remappings specified by `face-remap-add-relative' | ||
| 152 | to 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. |
| 166 | If SPECS is empty, the default base remapping is restored, which | 167 | This causes the remappings specified by `face-remap-add-relative' |
| 167 | inherits from the global definition of FACE; note that this is | 168 | to apply on top of the face specification given by SPECS. SPECS |
| 168 | different from SPECS containing a single value `nil', which does | 169 | should be either a list of face names, or a property list of face |
| 169 | not inherit from the global definition of FACE." | 170 | attribute/value pairs. |
| 171 | |||
| 172 | If SPECS is empty, call `face-remap-reset-base' to use the normal | ||
| 173 | definition of FACE as the base remapping; note that this is | ||
| 174 | different from SPECS containing a single value `nil', which means | ||
| 175 | not 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. |
| 130 | NO-INIT-FROM-RESOURCES non-nil means don't initialize frame-local | 127 | Do not call this directly from Lisp code; use `defface' instead. |
| 131 | variants of FACE from X resources. (X resources recognized are found | 128 | |
| 132 | in the global variable `face-x-resources'.) If FACE is already known | 129 | If NO-INIT-FROM-RESOURCES is non-nil, don't initialize face |
| 133 | as a face, leave it unmodified. Value is FACE." | 130 | attributes from X resources. If FACE is already known as a face, |
| 131 | leave 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. |
| 151 | If the face already exists, it is left unmodified. Value is FACE." | 148 | Do 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 | 155 | This function does not copy face customization data, so NEW-FACE | |
| 160 | If NEW-FACE already exists as a face, it is modified to be like | 156 | will not be made customizable. Most Lisp code should not call |
| 161 | OLD-FACE. If it doesn't already exist, it is created. | 157 | this function; use `defface' with :inherit instead. |
| 162 | 158 | ||
| 163 | If the optional argument FRAME is given as a frame, NEW-FACE is | 159 | If NEW-FACE already exists as a face, modify it to be like |
| 164 | changed on FRAME only. | 160 | OLD-FACE. If NEW-FACE doesn't already exist, create it. |
| 165 | If FRAME is t, the frame-independent default specification for OLD-FACE | 161 | |
| 166 | is copied to NEW-FACE. | 162 | If the optional argument FRAME is a frame, change NEW-FACE on |
| 167 | If FRAME is nil, copying is done for the frame-independent defaults | 163 | FRAME only. If FRAME is t, copy the frame-independent default |
| 168 | and for each existing frame. | 164 | specification for OLD-FACE to NEW-FACE. If FRAME is nil, copy |
| 169 | 165 | the defaults as well as the faces on each existing frame. | |
| 170 | If the optional fourth argument NEW-FRAME is given, | 166 | |
| 171 | copy the information from face OLD-FACE on frame FRAME | 167 | If the optional fourth argument NEW-FRAME is given, copy the |
| 172 | to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." | 168 | information from face OLD-FACE on frame FRAME to NEW-FACE on |
| 169 | frame 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/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d0d35407367..878b9b9eb6b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-03-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * shr.el (shr-insert): Update the text state properly to avoid | ||
| 4 | inserting spurious paragraph starts. | ||
| 5 | |||
| 1 | 2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * gnus-sum.el (gnus-update-marks): Don't propagate marks unless | 8 | * gnus-sum.el (gnus-update-marks): Don't propagate marks unless |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 53c0063de2e..c2040a9b8cf 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -332,6 +332,7 @@ the URL of the image to the kill buffer instead." | |||
| 332 | (unless shr-start | 332 | (unless shr-start |
| 333 | (setq shr-start (point))) | 333 | (setq shr-start (point))) |
| 334 | (insert elem) | 334 | (insert elem) |
| 335 | (setq shr-state nil) | ||
| 335 | (let (found) | 336 | (let (found) |
| 336 | (while (and (> (current-column) shr-width) | 337 | (while (and (> (current-column) shr-width) |
| 337 | (progn | 338 | (progn |
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index fdfb1a51ba0..72ae44bb60d 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -535,7 +535,8 @@ This variable is initialized by the `artist-make-prev-next-op-alist' function.") | |||
| 535 | ("Text" artist-select-op-text-overwrite text-ovwrt) | 535 | ("Text" artist-select-op-text-overwrite text-ovwrt) |
| 536 | ("Ellipse" artist-select-op-circle circle) | 536 | ("Ellipse" artist-select-op-circle circle) |
| 537 | ("Poly-line" artist-select-op-straight-poly-line spolyline) | 537 | ("Poly-line" artist-select-op-straight-poly-line spolyline) |
| 538 | ("Rectangle" artist-select-op-square square) | 538 | ("Square" artist-select-op-square square) |
| 539 | ("Rectangle" artist-select-op-rectangle rectangle) | ||
| 539 | ("Line" artist-select-op-straight-line s-line) | 540 | ("Line" artist-select-op-straight-line s-line) |
| 540 | ("Pen" artist-select-op-pen-line pen-line))) | 541 | ("Pen" artist-select-op-pen-line pen-line))) |
| 541 | (define-key map (vector (nth 2 op)) | 542 | (define-key map (vector (nth 2 op)) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 61bb4db558c..b6feecebde5 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -1141,12 +1141,6 @@ the field." | |||
| 1141 | (kill-region (point) end) | 1141 | (kill-region (point) end) |
| 1142 | (call-interactively 'kill-line)))) | 1142 | (call-interactively 'kill-line)))) |
| 1143 | 1143 | ||
| 1144 | (defcustom widget-complete-field (lookup-key global-map "\M-\t") | ||
| 1145 | "Default function to call for completion inside fields." | ||
| 1146 | :options '(ispell-complete-word complete-tag lisp-complete-symbol) | ||
| 1147 | :type 'function | ||
| 1148 | :group 'widgets) | ||
| 1149 | |||
| 1150 | (defun widget-narrow-to-field () | 1144 | (defun widget-narrow-to-field () |
| 1151 | "Narrow to field." | 1145 | "Narrow to field." |
| 1152 | (interactive) | 1146 | (interactive) |
| @@ -1169,10 +1163,6 @@ When not inside a field, signal an error." | |||
| 1169 | (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) | 1163 | (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) |
| 1170 | (plist-get completion-extra-properties | 1164 | (plist-get completion-extra-properties |
| 1171 | :predicate)))) | 1165 | :predicate)))) |
| 1172 | ((widget-field-find (point)) | ||
| 1173 | ;; This defaulting used to be performed in widget-default-complete, but | ||
| 1174 | ;; it seems more appropriate here than in widget-default-completions. | ||
| 1175 | (call-interactively 'widget-complete-field)) | ||
| 1176 | (t | 1166 | (t |
| 1177 | (error "Not in an editable field"))))) | 1167 | (error "Not in an editable field"))))) |
| 1178 | ;; We may want to use widget completion in buffers where the major mode | 1168 | ;; We may want to use widget completion in buffers where the major mode |
diff --git a/src/ChangeLog b/src/ChangeLog index 8b1221ab6d8..7a97859ba63 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2012-03-21 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * xfaces.c (Vface_remapping_alist): Doc fix. | ||
| 4 | |||
| 5 | 2012-03-20 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * w32proc.c (Fw32_set_console_codepage) | ||
| 8 | (Fw32_set_console_output_codepage, Fw32_get_codepage_charset): Doc | ||
| 9 | fixes. | ||
| 10 | |||
| 11 | 2012-03-20 Chong Yidong <cyd@gnu.org> | ||
| 12 | |||
| 13 | * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc | ||
| 14 | to reflect default non-nil value of redisplay-dont-pause. | ||
| 15 | |||
| 1 | 2012-03-19 Kenichi Handa <handa@m17n.org> | 16 | 2012-03-19 Kenichi Handa <handa@m17n.org> |
| 2 | 17 | ||
| 3 | * ftfont.c (ftfont_drive_otf): Mask bits of character code to make | 18 | * ftfont.c (ftfont_drive_otf): Mask bits of character code to make |
diff --git a/src/dispnew.c b/src/dispnew.c index d302e717ec2..02d6de53bbf 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6068,10 +6068,14 @@ sit_for (Lisp_Object timeout, int reading, int do_display) | |||
| 6068 | 6068 | ||
| 6069 | 6069 | ||
| 6070 | DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, | 6070 | DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, |
| 6071 | doc: /* Perform redisplay if no input is available. | 6071 | doc: /* Perform redisplay. |
| 6072 | If optional arg FORCE is non-nil or `redisplay-dont-pause' is non-nil, | 6072 | Optional arg FORCE, if non-nil, prevents redisplay from being |
| 6073 | perform a full redisplay even if input is available. | 6073 | preempted by arriving input, even if `redisplay-dont-pause' is nil. |
| 6074 | Return t if redisplay was performed, nil otherwise. */) | 6074 | If `redisplay-dont-pause' is non-nil (the default), redisplay is never |
| 6075 | preempted by arriving input, so FORCE does nothing. | ||
| 6076 | |||
| 6077 | Return t if redisplay was performed, nil if redisplay was preempted | ||
| 6078 | immediately by pending input. */) | ||
| 6075 | (Lisp_Object force) | 6079 | (Lisp_Object force) |
| 6076 | { | 6080 | { |
| 6077 | int count; | 6081 | int count; |
| @@ -6521,21 +6525,21 @@ syms_of_display (void) | |||
| 6521 | DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); | 6525 | DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); |
| 6522 | 6526 | ||
| 6523 | DEFVAR_INT ("baud-rate", baud_rate, | 6527 | DEFVAR_INT ("baud-rate", baud_rate, |
| 6524 | doc: /* *The output baud rate of the terminal. | 6528 | doc: /* The output baud rate of the terminal. |
| 6525 | On most systems, changing this value will affect the amount of padding | 6529 | On most systems, changing this value will affect the amount of padding |
| 6526 | and the other strategic decisions made during redisplay. */); | 6530 | and the other strategic decisions made during redisplay. */); |
| 6527 | 6531 | ||
| 6528 | DEFVAR_BOOL ("inverse-video", inverse_video, | 6532 | DEFVAR_BOOL ("inverse-video", inverse_video, |
| 6529 | doc: /* *Non-nil means invert the entire frame display. | 6533 | doc: /* Non-nil means invert the entire frame display. |
| 6530 | This means everything is in inverse video which otherwise would not be. */); | 6534 | This means everything is in inverse video which otherwise would not be. */); |
| 6531 | 6535 | ||
| 6532 | DEFVAR_BOOL ("visible-bell", visible_bell, | 6536 | DEFVAR_BOOL ("visible-bell", visible_bell, |
| 6533 | doc: /* *Non-nil means try to flash the frame to represent a bell. | 6537 | doc: /* Non-nil means try to flash the frame to represent a bell. |
| 6534 | 6538 | ||
| 6535 | See also `ring-bell-function'. */); | 6539 | See also `ring-bell-function'. */); |
| 6536 | 6540 | ||
| 6537 | DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter, | 6541 | DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter, |
| 6538 | doc: /* *Non-nil means no need to redraw entire frame after suspending. | 6542 | doc: /* Non-nil means no need to redraw entire frame after suspending. |
| 6539 | A non-nil value is useful if the terminal can automatically preserve | 6543 | A non-nil value is useful if the terminal can automatically preserve |
| 6540 | Emacs's frame display when you reenter Emacs. | 6544 | Emacs's frame display when you reenter Emacs. |
| 6541 | It is up to you to set this variable if your terminal can do that. */); | 6545 | It is up to you to set this variable if your terminal can do that. */); |
| @@ -6590,14 +6594,15 @@ See `buffer-display-table' for more information. */); | |||
| 6590 | Vstandard_display_table = Qnil; | 6594 | Vstandard_display_table = Qnil; |
| 6591 | 6595 | ||
| 6592 | DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, | 6596 | DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, |
| 6593 | doc: /* *Non-nil means display update isn't paused when input is detected. */); | 6597 | doc: /* Non-nil means display update isn't paused when input is detected. */); |
| 6594 | redisplay_dont_pause = 1; | 6598 | redisplay_dont_pause = 1; |
| 6595 | 6599 | ||
| 6596 | #if PERIODIC_PREEMPTION_CHECKING | 6600 | #if PERIODIC_PREEMPTION_CHECKING |
| 6597 | DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, | 6601 | DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, |
| 6598 | doc: /* *The period in seconds between checking for input during redisplay. | 6602 | doc: /* Period in seconds between checking for input during redisplay. |
| 6599 | If input is detected, redisplay is pre-empted, and the input is processed. | 6603 | This has an effect only if `redisplay-dont-pause' is nil; in that |
| 6600 | If nil, never pre-empt redisplay. */); | 6604 | case, arriving input preempts redisplay until the input is processed. |
| 6605 | If the value is nil, redisplay is never preempted. */); | ||
| 6601 | Vredisplay_preemption_period = make_float (0.10); | 6606 | Vredisplay_preemption_period = make_float (0.10); |
| 6602 | #endif | 6607 | #endif |
| 6603 | 6608 | ||
diff --git a/src/w32proc.c b/src/w32proc.c index f7982f36913..28591f90128 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -2067,8 +2067,8 @@ DEFUN ("w32-get-console-codepage", Fw32_get_console_codepage, | |||
| 2067 | 2067 | ||
| 2068 | DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage, | 2068 | DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage, |
| 2069 | Sw32_set_console_codepage, 1, 1, 0, | 2069 | Sw32_set_console_codepage, 1, 1, 0, |
| 2070 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. | 2070 | doc: /* Make Windows codepage CP be the codepage for Emacs tty keyboard input. |
| 2071 | The codepage setting affects keyboard input and display in tty mode. | 2071 | This codepage setting affects keyboard input in tty mode. |
| 2072 | If successful, the new CP is returned, otherwise nil. */) | 2072 | If successful, the new CP is returned, otherwise nil. */) |
| 2073 | (Lisp_Object cp) | 2073 | (Lisp_Object cp) |
| 2074 | { | 2074 | { |
| @@ -2095,8 +2095,8 @@ DEFUN ("w32-get-console-output-codepage", Fw32_get_console_output_codepage, | |||
| 2095 | 2095 | ||
| 2096 | DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage, | 2096 | DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage, |
| 2097 | Sw32_set_console_output_codepage, 1, 1, 0, | 2097 | Sw32_set_console_output_codepage, 1, 1, 0, |
| 2098 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. | 2098 | doc: /* Make Windows codepage CP be the codepage for Emacs console output. |
| 2099 | The codepage setting affects keyboard input and display in tty mode. | 2099 | This codepage setting affects display in tty mode. |
| 2100 | If successful, the new CP is returned, otherwise nil. */) | 2100 | If successful, the new CP is returned, otherwise nil. */) |
| 2101 | (Lisp_Object cp) | 2101 | (Lisp_Object cp) |
| 2102 | { | 2102 | { |
| @@ -2114,7 +2114,7 @@ If successful, the new CP is returned, otherwise nil. */) | |||
| 2114 | 2114 | ||
| 2115 | DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, | 2115 | DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, |
| 2116 | Sw32_get_codepage_charset, 1, 1, 0, | 2116 | Sw32_get_codepage_charset, 1, 1, 0, |
| 2117 | doc: /* Return charset of codepage CP. | 2117 | doc: /* Return charset ID corresponding to codepage CP. |
| 2118 | Returns nil if the codepage is not valid. */) | 2118 | Returns nil if the codepage is not valid. */) |
| 2119 | (Lisp_Object cp) | 2119 | (Lisp_Object cp) |
| 2120 | { | 2120 | { |
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. |
| 6600 | Each element is of the form: | 6600 | Each element is of the form: |
| 6601 | 6601 | ||
| 6602 | (FACE REPLACEMENT...), | 6602 | (FACE . REPLACEMENT), |
| 6603 | 6603 | ||
| 6604 | which causes display of the face FACE to use REPLACEMENT... instead. | 6604 | which causes display of the face FACE to use REPLACEMENT instead. |
| 6605 | REPLACEMENT... is interpreted the same way as the value of a `face' | 6605 | REPLACEMENT is a face specification, i.e. one of the following: |
| 6606 | text 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 | ||
| 6608 | face names or lists containing face attribute/value pairs. | ||
| 6609 | 6606 | ||
| 6610 | Multiple entries in REPLACEMENT... are merged together to form the final | 6607 | (1) a face name |
| 6611 | result, with faces or attributes earlier in the list taking precedence | 6608 | (2) a property list of attribute/value pairs, or |
| 6612 | over those that are later. | 6609 | (3) a list in which each element has the form of (1) or (2). |
| 6613 | 6610 | ||
| 6614 | Face-name remapping cycles are suppressed; recursive references use the | 6611 | List values for REPLACEMENT are merged to form the final face |
| 6615 | underlying face instead of the remapped face. So a remapping of the form: | 6612 | specification, with earlier entries taking precedence, in the same as |
| 6613 | as in the `face' text property. | ||
| 6614 | |||
| 6615 | Face-name remapping cycles are suppressed; recursive references use | ||
| 6616 | the underlying face instead of the remapped face. So a remapping of | ||
| 6617 | the 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 | ||
| 6623 | will cause EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the | 6625 | causes EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the |
| 6624 | existing definition of FACE. Note that for the default face, this isn't | 6626 | existing definition of FACE. Note that this isn't necessary for the |
| 6625 | necessary, as every face inherits from the default face. | 6627 | default face, since every face inherits from the default face. |
| 6626 | 6628 | ||
| 6627 | Making this variable buffer-local is a good way to allow buffer-specific | 6629 | If this variable is made buffer-local, the face remapping takes effect |
| 6628 | face definitions. For instance, the mode my-mode could define a face | 6630 | only in that buffer. For instance, the mode my-mode could define a |
| 6629 | `my-mode-default', and then in the mode setup function, do: | 6631 | face `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)))). |