From 38b276d162197a5ca4bd7322ff8a823c3754edb4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 15 Mar 2016 19:46:26 +0200 Subject: [PATCH] Fix startup of "emacs -nw" on systems that CANNOT_DUMP * src/xdisp.c (syms_of_xdisp) : Initialize to nil. * lisp/loadup.el : Set to 'grow-only' after loading window.el. (Bug#22975) --- lisp/loadup.el | 4 ++++ src/xdisp.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/loadup.el b/lisp/loadup.el index bd47bed316..21c64a8c3b 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -117,6 +117,10 @@ (load "format") (load "bindings") (load "window") ; Needed here for `replace-buffer-in-windows'. +;; We are now capable of resizing the mini-windows, so give the +;; variable its advertised default value (it starts as nil, see +;; xdisp.c). +(setq resize-mini-windows 'grow-only) (setq load-source-file-function 'load-with-code-conversion) (load "files") diff --git a/src/xdisp.c b/src/xdisp.c index ce992d4253..edefe3210c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -31598,7 +31598,12 @@ A value of t means resize them to fit the text displayed in them. A value of `grow-only', the default, means let mini-windows grow only; they return to their normal size when the minibuffer is closed, or the echo area becomes empty. */); - Vresize_mini_windows = Qgrow_only; + /* Contrary to the doc string, we initialize this to nil, so that + loading loadup.el won't try to resize windows before loading + window.el, where some functions we need to call for this live. + We assign the 'grow-only' value right after loading window.el + during loadup. */ + Vresize_mini_windows = Qnil; DEFVAR_LISP ("blink-cursor-alist", Vblink_cursor_alist, doc: /* Alist specifying how to blink the cursor off. -- 2.39.2