From 4cbd0713000c5f0a184e16df3556e8408ea3b894 Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Sat, 10 Oct 2015 22:23:59 -0400 Subject: [PATCH] * lisp/calendar/calendar.el: Display buffer before executing body. In each use of this macro, the modeline is derived from a window width calculation, which will be wrong if (display-buffer) splits the window horizontally. --- lisp/calendar/calendar.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index f188b68b050..6c1b4c258e9 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1107,11 +1107,11 @@ with disabled undo. Leaves point at point-min, displays BUFFER." (setq buffer-read-only nil buffer-undo-list t) (erase-buffer) + (display-buffer ,buffer) ,@body (goto-char (point-min)) (set-buffer-modified-p nil) - (setq buffer-read-only t) - (display-buffer ,buffer))) + (setq buffer-read-only t))) ;; The following are in-line for speed; they can be called thousands of times ;; when looking up holidays or processing the diary. Here, for example, are -- 2.39.2