From df171c230cc8a5da73684740ff5cfa364fa8c1c4 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 27 Oct 2012 10:58:30 +0200 Subject: [PATCH] In display-time-world restore fit-window-to-buffer behavior. * window.el (display-buffer): In doc-string describe window-height and window-width alist entries. * time.el (display-time-world): Restore fit-window-to-buffer behavior. --- lisp/ChangeLog | 10 +++++++++- lisp/time.el | 3 ++- lisp/window.el | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3462315fa..defa35f09e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-10-27 Martin Rudalics + + * window.el (display-buffer): In doc-string describe + window-height and window-width alist entries. + + * time.el (display-time-world): Restore fit-window-to-buffer + behavior. + 2012-10-27 Chong Yidong * subr.el (insert-buffer-substring-as-yank): Doc fix. @@ -253,7 +261,7 @@ Recover input meta mode when the new coding system doesn not use 8-bit. Supply TERMINAL arg to set-input-meta-mode. -2012-10-17 Michael Heerdegen (tiny change) +2012-10-17 Michael Heerdegen * wdired.el (wdired-old-marks): New variable. (wdired-change-to-wdired-mode): Locally set wdired-old-marks. diff --git a/lisp/time.el b/lisp/time.el index 7473994ffa..a3bbee0c89 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -557,7 +557,8 @@ To turn off the world time display, go to that window and type `q'." (run-at-time t display-time-world-timer-second 'display-time-world-timer)) (with-current-buffer (get-buffer-create display-time-world-buffer-name) (display-time-world-display display-time-world-list) - (display-buffer display-time-world-buffer-name) + (display-buffer display-time-world-buffer-name + (cons nil '((window-height . fit-window-to-buffer)))) (display-time-world-mode))) (defun display-time-world-timer () diff --git a/lisp/window.el b/lisp/window.el index fa7b08375c..bd043390d9 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5414,6 +5414,22 @@ Recognized alist entries include: parameters to give a new frame, if one is created. + `window-height' -- Value specifies either an integer (the number + of lines of a new window), a floating point number (the + fraction of a new window with respect to the height of the + frame's root window) or a function to be called with one + argument - a new window. The function is supposed to adjust + the height of the window; its return value is ignored. + Suitable functions are `shrink-window-if-larger-than-buffer' + and `fit-window-to-buffer'. + + `window-width' -- Value specifies either an integer (the number + of columns of a new window), a floating point number (the + fraction of a new window with respect to the width of the + frame's root window) or a function to be called with one + argument - a new window. The function is supposed to adjust + the width of the window; its return value is ignored. + The ACTION argument to `display-buffer' can also have a non-nil and non-list value. This means to display the buffer in a window other than the selected one, even if it is already displayed in -- 2.39.2