I suppose > (setq pop-up-windows nil > pop-up-frames t > special-display-buffer-names '(("*Calendar*" (same-frame . t))) > display-buffer-mark-dedicated 'weak) > > Under this configuration, pop-up-frames are used, with windows dedicated > to their buffers, but the calendar is opened in the current frame, not a > new frame. Calendar-hide-window seems to assume that whenever dedicated > windows are being used, it is okay to delete or iconify a frame: > > (cond > ... > ((and (display-multi-frame-p) (window-dedicated-p window)) > (if calendar-remove-frame-by-deleting > (delete-frame (window-frame window)) > (iconify-frame (window-frame window)))) > ... > ) > > M-x version: > > GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) > of 2012-04-07 on trouble, modified by Debian > > Any thoughts for a solution? The corresponding code has changed on trunk but the bug is still present. Note that you now have to (setq calendar-setup t) in order to reproduce it. I'd propose the attached patch which still has the deficiency that KILL is not respected when the buffer appears on a separate frame. This is, however, a general problem shared, for example, by `debug' which kills the *Backtrace* buffer when it appears on the same frame and retains it when on another. martin