aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2015-10-10 22:23:59 -0400
committerMark Oteiza2015-10-10 22:23:59 -0400
commit4cbd0713000c5f0a184e16df3556e8408ea3b894 (patch)
tree32376de797b70151e7103e808e0e3ad208ccf180
parent29dfca23553b9995a8ec3b50090a652a6a0ecb01 (diff)
downloademacs-4cbd0713000c5f0a184e16df3556e8408ea3b894.tar.gz
emacs-4cbd0713000c5f0a184e16df3556e8408ea3b894.zip
* 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.
-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."
1107 (setq buffer-read-only nil 1107 (setq buffer-read-only nil
1108 buffer-undo-list t) 1108 buffer-undo-list t)
1109 (erase-buffer) 1109 (erase-buffer)
1110 (display-buffer ,buffer)
1110 ,@body 1111 ,@body
1111 (goto-char (point-min)) 1112 (goto-char (point-min))
1112 (set-buffer-modified-p nil) 1113 (set-buffer-modified-p nil)
1113 (setq buffer-read-only t) 1114 (setq buffer-read-only t)))
1114 (display-buffer ,buffer)))
1115 1115
1116;; The following are in-line for speed; they can be called thousands of times 1116;; The following are in-line for speed; they can be called thousands of times
1117;; when looking up holidays or processing the diary. Here, for example, are 1117;; when looking up holidays or processing the diary. Here, for example, are