aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAlp Aker2012-06-16 20:32:36 -0400
committerAlp Aker2012-06-16 20:32:36 -0400
commit9b0e3ebaef5aed8097965b14c97a0579763be7fd (patch)
treeeeabc5495c58289454d9c53c9dd409377ec72cf3 /lisp
parent40d8bcb854203237c6ad8327bc1fc0644f8734ec (diff)
downloademacs-9b0e3ebaef5aed8097965b14c97a0579763be7fd.tar.gz
emacs-9b0e3ebaef5aed8097965b14c97a0579763be7fd.zip
Implement wave-style variant of underlining.
* doc/lispref/display.texi: Document new face attribute. * lisp/cus-face.el (custom-face-attributes): Add wave-style underline attribute. * lisp/faces.el (set-face-attribute): Update docstring. * src/dispextern.h (face_underline_type): New enum. (face): Add field for underline type. * src/nsterm.m (ns_draw_underwave): New function. (ns_draw_text_decoration): Use it. * src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave): New functions. (x_draw_glyph_string): Use them. * src/xfaces.c (Qline, Qwave): New Lisp objects. (check_lface_attrs, merge_face_ref) (Finternal_set_lisp_face_attribute, realize_x_face): Handle wave-style underline face attributes. * src/xterm.c (x_draw_underwave): New function. (x_draw_glyph_string): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/cus-face.el9
-rw-r--r--lisp/faces.el19
3 files changed, 29 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ee7f2562185..ddc8f9b5a7e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
2
3 * cus-face.el (custom-face-attributes): Add wave-style underline
4 attribute.
5 * faces.el (set-face-attribute): Update docstring to describe
6 wave-style underline attribute.
7
12012-06-16 Chong Yidong <cyd@gnu.org> 82012-06-16 Chong Yidong <cyd@gnu.org>
2 9
3 * term/xterm.el (terminal-init-xterm): Discard input before 10 * term/xterm.el (terminal-init-xterm): Discard input before
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index d725111b6fd..3680a2648ce 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -135,8 +135,13 @@
135 (choice :tag "Underline" 135 (choice :tag "Underline"
136 :help-echo "Control text underlining." 136 :help-echo "Control text underlining."
137 (const :tag "Off" nil) 137 (const :tag "Off" nil)
138 (const :tag "On" t) 138 (list :tag "On"
139 (color :tag "Colored"))) 139 (const :format "" :value :color)
140 (choice :tag "Color" (const :tag "Foreground Color" foreground-color) color)
141 (const :format "" :value :style)
142 (choice :tag "Style"
143 (const :tag "Line" line)
144 (const :tag "Wave" wave)))))
140 145
141 (:overline 146 (:overline
142 (choice :tag "Overline" 147 (choice :tag "Overline"
diff --git a/lisp/faces.el b/lisp/faces.el
index 0c1eab474c3..40b45187f6c 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -623,10 +623,21 @@ VALUE must be a color name, a string.
623 623
624`:underline' 624`:underline'
625 625
626VALUE specifies whether characters in FACE should be underlined. If 626VALUE specifies whether characters in FACE should be underlined.
627VALUE is t, underline with foreground color of the face. If VALUE is 627If VALUE is t, underline with foreground color of the face.
628a string, underline with that color. If VALUE is nil, explicitly 628If VALUE is a string, underline with that color.
629don't underline. 629If VALUE is nil, explicitly don't underline.
630
631Otherwise, VALUE must be a property list of the form:
632
633`(:color COLOR :style STYLE)'.
634
635COLOR can be a either a color name string or `foreground-color'.
636STYLE can be either `line' or `wave'.
637If a keyword/value pair is missing from the property list, a
638default value will be used for the value.
639The default value of COLOR is the foreground color of the face.
640The default value of STYLE is `line'.
630 641
631`:overline' 642`:overline'
632 643