aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJan Djärv2013-11-01 16:47:10 +0100
committerJan Djärv2013-11-01 16:47:10 +0100
commit3c334c1412e708585fddba61b7f91e0902a830f4 (patch)
treefb063b9f306719816335d12601735648e4fbba41 /doc
parent9bc236c8263bc81f1b540579a9f98d872ab2da46 (diff)
downloademacs-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/ChangeLog4
-rw-r--r--doc/lispref/display.texi9
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 @@
12013-11-01 Jan Djärv <jan.h.d@swipnet.se>
2
3 * display.texi (Face Attributes): Document :distant-foreground.
4
12013-10-30 Xue Fuqiao <xfq.free@gmail.com> 52013-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
2036black-and-white displays, certain shades of gray are implemented by 2036black-and-white displays, certain shades of gray are implemented by
2037stipple patterns. 2037stipple patterns.
2038 2038
2039@item :distant-foreground
2040Alternative foreground color, a string. This is like @code{:foreground}
2041but the color is only used as a foreground when the background color is
2042near to the foreground that would have been used. This is useful for
2043example when marking text (i.e. the region face). If the text has a foreground
2044that is visible with the region face, that foreground is used.
2045If 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
2040Background color, a string. The value can be a system-defined color 2049Background color, a string. The value can be a system-defined color
2041name, or a hexadecimal color specification. @xref{Color Names}. 2050name, or a hexadecimal color specification. @xref{Color Names}.