diff options
| author | Dmitry Antipov | 2013-09-01 20:21:48 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-09-01 20:21:48 +0400 |
| commit | cf91889acb493863b93dc199d2a39e7f3a9b4cd4 (patch) | |
| tree | af972c96d3a1021e9c0d0737f4afa5940b4387b6 /src/dispextern.h | |
| parent | a30edef8a9491ea9b293c3ac792e52260723bd24 (diff) | |
| download | emacs-cf91889acb493863b93dc199d2a39e7f3a9b4cd4.tar.gz emacs-cf91889acb493863b93dc199d2a39e7f3a9b4cd4.zip | |
* dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
(CLIP_TEXT_POS_FROM_MARKER): New macro.
* dispnew.c (buffer_posn_from_coords):
* window.c (Fwindow_end, displayed_window_lines):
* xdisp.c (redisplay_mode_lines): Use it.
Diffstat (limited to 'src/dispextern.h')
| -rw-r--r-- | src/dispextern.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index ce9a34a2e71..947e50fa4dd 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -223,8 +223,16 @@ struct text_pos | |||
| 223 | /* Set text position POS from marker MARKER. */ | 223 | /* Set text position POS from marker MARKER. */ |
| 224 | 224 | ||
| 225 | #define SET_TEXT_POS_FROM_MARKER(POS, MARKER) \ | 225 | #define SET_TEXT_POS_FROM_MARKER(POS, MARKER) \ |
| 226 | (CHARPOS (POS) = marker_position ((MARKER)), \ | 226 | (CHARPOS (POS) = marker_position (MARKER), \ |
| 227 | BYTEPOS (POS) = marker_byte_position ((MARKER))) | 227 | BYTEPOS (POS) = marker_byte_position (MARKER)) |
| 228 | |||
| 229 | /* Like above, but clip POS within accessible range. */ | ||
| 230 | |||
| 231 | #define CLIP_TEXT_POS_FROM_MARKER(POS, MARKER) \ | ||
| 232 | (CHARPOS (POS) = clip_to_bounds \ | ||
| 233 | (BEGV, marker_position (MARKER), ZV), \ | ||
| 234 | BYTEPOS (POS) = clip_to_bounds \ | ||
| 235 | (BEGV_BYTE, marker_byte_position (MARKER), ZV_BYTE)) | ||
| 228 | 236 | ||
| 229 | /* Set marker MARKER from text position POS. */ | 237 | /* Set marker MARKER from text position POS. */ |
| 230 | 238 | ||