diff options
| author | Richard M. Stallman | 1994-08-10 20:32:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-08-10 20:32:38 +0000 |
| commit | 8646118f1756c8e40b495a7b6cea5a0d2d6a4934 (patch) | |
| tree | 3201c4fb54d8fcf5e012a8b3c4ea2b95ea7a0a12 /src | |
| parent | 7fa3680263bf0bf54aef9824a4642fc603c9d3aa (diff) | |
| download | emacs-8646118f1756c8e40b495a7b6cea5a0d2d6a4934.tar.gz emacs-8646118f1756c8e40b495a7b6cea5a0d2d6a4934.zip | |
(Fwindow_end): Undo previous change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c index 1401abda32c..22db914d7f6 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -489,12 +489,8 @@ DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0, | |||
| 489 | return Fmarker_position (decode_window (window)->start); | 489 | return Fmarker_position (decode_window (window)->start); |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | DEFUN ("window-end", Fwindow_end, Swindow_end, 0, 1, 0, | 492 | /* This is text temporarily removed from the doc string below. |
| 493 | "Return position at which display currently ends in WINDOW.\n\ | 493 | |
| 494 | This is updated by redisplay, when it runs to completion.\n\ | ||
| 495 | Simply changing the buffer text or setting `window-start'\n\ | ||
| 496 | does not update this value.\n\ | ||
| 497 | \n\ | ||
| 498 | This function returns nil if the position is not currently known.\n\ | 494 | This function returns nil if the position is not currently known.\n\ |
| 499 | That happens when redisplay is preempted and doesn't finish.\n\ | 495 | That happens when redisplay is preempted and doesn't finish.\n\ |
| 500 | If in that case you want to compute where the end of the window would\n\ | 496 | If in that case you want to compute where the end of the window would\n\ |
| @@ -502,7 +498,13 @@ have been if redisplay had finished, do this:\n\ | |||
| 502 | (save-excursion\n\ | 498 | (save-excursion\n\ |
| 503 | (goto-char (window-start window))\n\ | 499 | (goto-char (window-start window))\n\ |
| 504 | (vertical-motion (1- (window-height window)) window)\n\ | 500 | (vertical-motion (1- (window-height window)) window)\n\ |
| 505 | (point))") | 501 | (point))") */ |
| 502 | |||
| 503 | DEFUN ("window-end", Fwindow_end, Swindow_end, 0, 1, 0, | ||
| 504 | "Return position at which display currently ends in WINDOW.\n\ | ||
| 505 | This is updated by redisplay, when it runs to completion.\n\ | ||
| 506 | Simply changing the buffer text or setting `window-start'\n\ | ||
| 507 | does not update this value.") | ||
| 506 | (window) | 508 | (window) |
| 507 | Lisp_Object window; | 509 | Lisp_Object window; |
| 508 | { | 510 | { |
| @@ -513,12 +515,14 @@ have been if redisplay had finished, do this:\n\ | |||
| 513 | buf = w->buffer; | 515 | buf = w->buffer; |
| 514 | CHECK_BUFFER (buf, 0); | 516 | CHECK_BUFFER (buf, 0); |
| 515 | 517 | ||
| 518 | #if 0 /* This change broke some things. We should make it later. */ | ||
| 516 | /* If we don't know the end position, return nil. | 519 | /* If we don't know the end position, return nil. |
| 517 | The user can compute it with vertical-motion if he wants to. | 520 | The user can compute it with vertical-motion if he wants to. |
| 518 | It would be nicer to do it automatically, | 521 | It would be nicer to do it automatically, |
| 519 | but that's so slow that it would probably bother people. */ | 522 | but that's so slow that it would probably bother people. */ |
| 520 | if (NILP (w->window_end_valid)) | 523 | if (NILP (w->window_end_valid)) |
| 521 | return Qnil; | 524 | return Qnil; |
| 525 | #endif | ||
| 522 | 526 | ||
| 523 | XSET (value, Lisp_Int, | 527 | XSET (value, Lisp_Int, |
| 524 | BUF_Z (XBUFFER (buf)) - XFASTINT (w->window_end_pos)); | 528 | BUF_Z (XBUFFER (buf)) - XFASTINT (w->window_end_pos)); |