aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorStefan Monnier2020-10-04 22:50:38 -0400
committerStefan Monnier2020-10-04 22:50:38 -0400
commit14a5db2912d9e4e802c1eeddfb3e551f9fb8f753 (patch)
treee22e5a26244e060a680e4f3bd1fa5de0801f6e81 /test/src
parent5ec21155c39aab8a452d190a260e6912d1d9a920 (diff)
downloademacs-14a5db2912d9e4e802c1eeddfb3e551f9fb8f753.tar.gz
emacs-14a5db2912d9e4e802c1eeddfb3e551f9fb8f753.zip
* src/xdisp.c (syms_of_xdisp): New var `redisplay_skip_initial_frame`.
This makes it possible to run most of the redisplay code (tho not the actual drawing since there's nowhere to draw) even when there's no real frame at hand, as is the case in batch mode. This makes `xdisp-tests--minibuffer-resizing` work even in batch. (redisplay_internal): Obey it. (init_xdisp): Set `echo_area_window` even in noninteractive mode. * src/dispnew.c (update_frame): Skip the initial frame. * src/frame.c (make_frame): Use 80x25 as the default initial size. * test/src/xdisp-tests.el (xdisp-tests--minibuffer-resizing): Use the new var and fix use of `executing-kbd-macro`.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/xdisp-tests.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/src/xdisp-tests.el b/test/src/xdisp-tests.el
index 3d0d0f58302..95c39dacc3e 100644
--- a/test/src/xdisp-tests.el
+++ b/test/src/xdisp-tests.el
@@ -33,19 +33,21 @@
33 (lambda () 33 (lambda ()
34 (insert "hello") 34 (insert "hello")
35 (let ((ol (make-overlay (point) (point))) 35 (let ((ol (make-overlay (point) (point)))
36 (redisplay-skip-initial-frame nil)
36 (max-mini-window-height 1) 37 (max-mini-window-height 1)
37 (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh")) 38 (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh"))
38 ;; (save-excursion (insert text)) 39 ;; (save-excursion (insert text))
39 ;; (sit-for 2) 40 ;; (sit-for 2)
40 ;; (delete-region (point) (point-max)) 41 ;; (delete-region (point) (point-max))
41 (put-text-property 0 1 'cursor t text) 42 (put-text-property 0 1 'cursor t text)
42 (overlay-put ol 'after-string text) 43 (overlay-put ol 'after-string text)
43 (redisplay 'force) 44 (let ((executing-kbd-macro nil)) ;Don't skip redisplay
44 (throw 'result 45 (redisplay 'force))
45 ;; Make sure we do the see "hello" text. 46 (throw 'result
46 (prog1 (equal (window-start) (point-min)) 47 ;; Make sure we do the see "hello" text.
47 ;; (list (window-start) (window-end) (window-width)) 48 (prog1 (equal (window-start) (point-min))
48 (delete-overlay ol))))) 49 ;; (list (window-start) (window-end) (window-width))
50 (delete-overlay ol)))))
49 (let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'. 51 (let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'.
50 (read-string "toto: "))))))) 52 (read-string "toto: ")))))))
51 53