diff options
| author | Jan Djärv | 2013-11-01 16:47:10 +0100 |
|---|---|---|
| committer | Jan Djärv | 2013-11-01 16:47:10 +0100 |
| commit | 3c334c1412e708585fddba61b7f91e0902a830f4 (patch) | |
| tree | fb063b9f306719816335d12601735648e4fbba41 /doc | |
| parent | 9bc236c8263bc81f1b540579a9f98d872ab2da46 (diff) | |
| download | emacs-3c334c1412e708585fddba61b7f91e0902a830f4.tar.gz emacs-3c334c1412e708585fddba61b7f91e0902a830f4.zip | |
Add :distant-foreground to faces.
* doc/lispref/display.texi (Face Attributes): Document :distant-foreground.
* etc/NEWS: Mention :distant-foreground.
* lisp/faces.el (face-x-resources): Add :distant-foreground.
(region): Use :distant-foreground for gtk and ns.
* src/dispextern.h (lface_attribute_index): Add
LFACE_DISTANT_FOREGROUND_INDEX.
* src/xfaces.c: Declare color_distance.
(QCdistant_foreground): New variable.
(NEAR_SAME_COLOR_THRESHOLD): New define.
(load_color2): New function.
(load_color): Call load_color2.
(load_face_colors): Call load_color2 and if distant-color is specified
calculate distant and use distant-color if colors are near.
(LFACE_DISTANT_FOREGROUND): New define.
(merge_face_ref, Finternal_set_lisp_face_attribute)
(Finternal_get_lisp_face_attribute)
(x_supports_face_attributes_p): Handle distant-foreground similar to
foreground.
(syms_of_xfaces): DEFSYM QCdistant_foreground.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fa081f1e7aa..cc214aa6dfa 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-11-01 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * display.texi (Face Attributes): Document :distant-foreground. | ||
| 4 | |||
| 1 | 2013-10-30 Xue Fuqiao <xfq.free@gmail.com> | 5 | 2013-10-30 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 6 | ||
| 3 | * display.texi (Abstract Display): Improve indexing. | 7 | * display.texi (Abstract Display): Improve indexing. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 07ab2c6745f..ebb61a76b59 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -2036,6 +2036,15 @@ name, or a hexadecimal color specification. @xref{Color Names}. On | |||
| 2036 | black-and-white displays, certain shades of gray are implemented by | 2036 | black-and-white displays, certain shades of gray are implemented by |
| 2037 | stipple patterns. | 2037 | stipple patterns. |
| 2038 | 2038 | ||
| 2039 | @item :distant-foreground | ||
| 2040 | Alternative foreground color, a string. This is like @code{:foreground} | ||
| 2041 | but the color is only used as a foreground when the background color is | ||
| 2042 | near to the foreground that would have been used. This is useful for | ||
| 2043 | example when marking text (i.e. the region face). If the text has a foreground | ||
| 2044 | that is visible with the region face, that foreground is used. | ||
| 2045 | If the foreground is near the region face background, | ||
| 2046 | @code{:distant-foreground} is used instead so the text is readable. | ||
| 2047 | |||
| 2039 | @item :background | 2048 | @item :background |
| 2040 | Background color, a string. The value can be a system-defined color | 2049 | Background color, a string. The value can be a system-defined color |
| 2041 | name, or a hexadecimal color specification. @xref{Color Names}. | 2050 | name, or a hexadecimal color specification. @xref{Color Names}. |