diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ec0fbc493cb..a26577c20a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-06-15 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (Fline_pixel_height): New function, required for solving | ||
| 4 | bug #14567. | ||
| 5 | |||
| 1 | 2013-06-15 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-06-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * fns.c (Fcopy_sequence): Simplify XTYPE calculation. | 8 | * fns.c (Fcopy_sequence): Simplify XTYPE calculation. |
diff --git a/src/xdisp.c b/src/xdisp.c index e1d6b0c9a27..54ea325f642 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1217,6 +1217,24 @@ line_bottom_y (struct it *it) | |||
| 1217 | return line_top_y + line_height; | 1217 | return line_top_y + line_height; |
| 1218 | } | 1218 | } |
| 1219 | 1219 | ||
| 1220 | DEFUN ("line-pixel-height", Fline_pixel_height, | ||
| 1221 | Sline_pixel_height, 0, 0, 0, | ||
| 1222 | doc: /* Return height in pixels of text line in the selected window. | ||
| 1223 | |||
| 1224 | Value is the height in pixels of the line at point. */) | ||
| 1225 | (void) | ||
| 1226 | { | ||
| 1227 | struct it it; | ||
| 1228 | struct text_pos pt; | ||
| 1229 | struct window *w = XWINDOW (selected_window); | ||
| 1230 | |||
| 1231 | SET_TEXT_POS (pt, PT, PT_BYTE); | ||
| 1232 | start_display (&it, w, pt); | ||
| 1233 | it.vpos = it.current_y = 0; | ||
| 1234 | last_height = 0; | ||
| 1235 | return make_number (line_bottom_y (&it)); | ||
| 1236 | } | ||
| 1237 | |||
| 1220 | /* Subroutine of pos_visible_p below. Extracts a display string, if | 1238 | /* Subroutine of pos_visible_p below. Extracts a display string, if |
| 1221 | any, from the display spec given as its argument. */ | 1239 | any, from the display spec given as its argument. */ |
| 1222 | static Lisp_Object | 1240 | static Lisp_Object |
| @@ -28691,6 +28709,7 @@ syms_of_xdisp (void) | |||
| 28691 | defsubr (&Stool_bar_lines_needed); | 28709 | defsubr (&Stool_bar_lines_needed); |
| 28692 | defsubr (&Slookup_image_map); | 28710 | defsubr (&Slookup_image_map); |
| 28693 | #endif | 28711 | #endif |
| 28712 | defsubr (&Sline_pixel_height); | ||
| 28694 | defsubr (&Sformat_mode_line); | 28713 | defsubr (&Sformat_mode_line); |
| 28695 | defsubr (&Sinvisible_p); | 28714 | defsubr (&Sinvisible_p); |
| 28696 | defsubr (&Scurrent_bidi_paragraph_direction); | 28715 | defsubr (&Scurrent_bidi_paragraph_direction); |