summaryrefslogtreecommitdiff
path: root/lisp/calendar/calendar.el
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2015-10-10 22:23:59 -0400
committerMark Oteiza <mvoteiza@udel.edu>2015-10-10 22:23:59 -0400
commit4cbd0713000c5f0a184e16df3556e8408ea3b894 (patch)
tree32376de797b70151e7103e808e0e3ad208ccf180 /lisp/calendar/calendar.el
parent29dfca23553b9995a8ec3b50090a652a6a0ecb01 (diff)
downloademacs-4cbd0713000c5f0a184e16df3556e8408ea3b894.tar.gz
* 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.
Diffstat (limited to 'lisp/calendar/calendar.el')
-rw-r--r--lisp/calendar/calendar.el4
1 files 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