Mercurial > emacs
comparison lisp/calendar/calendar.el @ 105450:7e96a7ac3ac0
(calendar-basic-setup): Don't call switch-to-buffer in a dedicated window.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 05 Oct 2009 05:36:11 +0000 |
parents | 3fec4318d760 |
children | e3187820f169 |
comparison
equal
deleted
inserted
replaced
105449:4d75e3e0f1ea | 105450:7e96a7ac3ac0 |
---|---|
1319 ;; | 1319 ;; |
1320 ;; Is this a wide frame? If so, split it horizontally. | 1320 ;; Is this a wide frame? If so, split it horizontally. |
1321 (if (window-splittable-p t) (split-window-horizontally)) | 1321 (if (window-splittable-p t) (split-window-horizontally)) |
1322 (pop-to-buffer calendar-buffer) | 1322 (pop-to-buffer calendar-buffer) |
1323 ;; Has the window already been split vertically? (See bug#4543) | 1323 ;; Has the window already been split vertically? (See bug#4543) |
1324 (when (= (window-height) (window-height (frame-root-window))) | 1324 (when (and (not (window-dedicated-p)) |
1325 (= (window-height) (window-height (frame-root-window)))) | |
1325 (let ((win (split-window-vertically))) | 1326 (let ((win (split-window-vertically))) |
1326 ;; Show something else in the upper window. | 1327 ;; Show something else in the upper window. |
1327 (switch-to-buffer (other-buffer)) | 1328 (switch-to-buffer (other-buffer)) |
1328 ;; Switch to the lower window with the calendar buffer. | 1329 ;; Switch to the lower window with the calendar buffer. |
1329 (select-window win)))) | 1330 (select-window win)))) |