From: Mark Oteiza Date: Sun, 11 Oct 2015 02:23:59 +0000 (-0400) Subject: * lisp/calendar/calendar.el: Display buffer before executing body. X-Git-Tag: emacs-25.0.90~1168 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4cbd0713000c5f0a184e16df3556e8408ea3b894;p=emacs.git * 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. --- 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