\f
* Changes in Emacs 28.1
+*** New var 'redisplay-skip-initial-frame' to enable batch redisplay tests.
+Setting it to nil forces the redisplay to do its job even in the
+initial frame used in batch mode.
+
---
** Support for the 'strike-through' face attribute on TTY frames.
If your terminal's termcap or terminfo database entry has the 'smxx'
/* Don't forget the buffer for decode_mode_spec. */
adjust_decode_mode_spec_buffer (f);
- f->glyphs_initialized_p = 1;
+ f->glyphs_initialized_p = true;
unblock_input ();
}
/* Block interrupt input so that we don't get surprised by an X
event while we're in an inconsistent state. */
block_input ();
- f->glyphs_initialized_p = 0;
+ f->glyphs_initialized_p = false;
/* Release window sub-matrices. */
if (!NILP (f->root_window))
build_frame_matrix (f);
/* Update the display. */
- update_begin (f);
- paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false);
- update_end (f);
+ if (FRAME_INITIAL_P (f))
+ /* No actual display to update so the "update" is a nop and
+ obviously isn't interrupted by pending input. */
+ paused_p = false;
+ else
+ {
+ update_begin (f);
+ paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false);
+ update_end (f);
+ }
if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
{
wset_frame (rw, frame);
- /* 10 is arbitrary,
+ /* 80/25 is arbitrary,
just so that there is "something there."
Correct size will be set up later with adjust_frame_size. */
- SET_FRAME_COLS (f, 10);
- SET_FRAME_LINES (f, 10);
+ SET_FRAME_COLS (f, 80);
+ SET_FRAME_LINES (f, 25);
SET_FRAME_WIDTH (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f));
SET_FRAME_HEIGHT (f, FRAME_LINES (f) * FRAME_LINE_HEIGHT (f));
- rw->total_cols = 10;
+ rw->total_cols = FRAME_COLS (f);
rw->pixel_width = rw->total_cols * FRAME_COLUMN_WIDTH (f);
- rw->total_lines = mini_p ? 9 : 10;
+ rw->total_lines = FRAME_LINES (f) - (mini_p ? 1 : 0);
rw->pixel_height = rw->total_lines * FRAME_LINE_HEIGHT (f);
if (mini_p)
terminal = init_initial_terminal ();
- f = make_frame (1);
+ f = make_frame (true);
XSETFRAME (frame, f);
Vframe_list = Fcons (frame, Vframe_list);
/* No redisplay if running in batch mode or frame is not yet fully
initialized, or redisplay is explicitly turned off by setting
Vinhibit_redisplay. */
- if (FRAME_INITIAL_P (SELECTED_FRAME ())
+ if ((FRAME_INITIAL_P (SELECTED_FRAME ())
+ && redisplay_skip_initial_frame)
|| !NILP (Vinhibit_redisplay))
return;
mouse stays within the extent of a single glyph (except for images). */);
mouse_fine_grained_tracking = false;
+ DEFVAR_BOOL ("redisplay-skip-initial-frame", redisplay_skip_initial_frame,
+ doc: /* Non-nil to skip redisplay in initial frame.
+The initial frame is not displayed anywhere, so skipping it is
+best except in special circumstances such as running redisplay tests
+in batch mode. */);
+ redisplay_skip_initial_frame = true;
}
{
CHARPOS (this_line_start_pos) = 0;
+ echo_area_window = minibuf_window;
+
if (!noninteractive)
{
struct window *m = XWINDOW (minibuf_window);
struct window *r = XWINDOW (root);
int i;
- echo_area_window = minibuf_window;
-
r->top_line = FRAME_TOP_MARGIN (f);
r->pixel_top = r->top_line * FRAME_LINE_HEIGHT (f);
r->total_cols = FRAME_COLS (f);
(lambda ()
(insert "hello")
(let ((ol (make-overlay (point) (point)))
+ (redisplay-skip-initial-frame nil)
(max-mini-window-height 1)
(text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh"))
- ;; (save-excursion (insert text))
- ;; (sit-for 2)
- ;; (delete-region (point) (point-max))
- (put-text-property 0 1 'cursor t text)
- (overlay-put ol 'after-string text)
- (redisplay 'force)
- (throw 'result
- ;; Make sure we do the see "hello" text.
- (prog1 (equal (window-start) (point-min))
- ;; (list (window-start) (window-end) (window-width))
- (delete-overlay ol)))))
+ ;; (save-excursion (insert text))
+ ;; (sit-for 2)
+ ;; (delete-region (point) (point-max))
+ (put-text-property 0 1 'cursor t text)
+ (overlay-put ol 'after-string text)
+ (let ((executing-kbd-macro nil)) ;Don't skip redisplay
+ (redisplay 'force))
+ (throw 'result
+ ;; Make sure we do the see "hello" text.
+ (prog1 (equal (window-start) (point-min))
+ ;; (list (window-start) (window-end) (window-width))
+ (delete-overlay ol)))))
(let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'.
(read-string "toto: ")))))))