]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/calendar/calendar.el: Display buffer before executing body.
authorMark Oteiza <mvoteiza@udel.edu>
Sun, 11 Oct 2015 02:23:59 +0000 (22:23 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Sun, 11 Oct 2015 02:23:59 +0000 (22:23 -0400)
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

index f188b68b0509dc1a85840ffd891cf596d99dabb5..6c1b4c258e9951114f5c95e40f9fa9479d3e6474 100644 (file)
@@ -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