aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/window.el
diff options
context:
space:
mode:
authorGlenn Morris2012-11-12 18:25:59 -0800
committerGlenn Morris2012-11-12 18:25:59 -0800
commitf78ee6afc094cdfd6162bfd645836e84875dcddf (patch)
tree3a2c4f5d6441e53adadb69ed2af0b64abf3cf239 /lisp/window.el
parentb95a9c0cba301ef8f1920a1d123ccd6873c14a63 (diff)
parentf8705f6e3102454bf1e3213956eb3ac8160ff047 (diff)
downloademacs-f78ee6afc094cdfd6162bfd645836e84875dcddf.tar.gz
emacs-f78ee6afc094cdfd6162bfd645836e84875dcddf.zip
Merge from emacs-24; up to 2012-11-09T14:45:15Z!dmantipov@yandex.ru
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el37
1 files changed, 18 insertions, 19 deletions
diff --git a/lisp/window.el b/lisp/window.el
index be6ddf8ab9e..30ee622cfe6 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -143,37 +143,36 @@ to `display-buffer'."
143 window)))) 143 window))))
144 144
145(defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body) 145(defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body)
146 "Evaluate BODY and display buffer specified by BUFFER-OR-NAME. 146 "Evaluate BODY and display the buffer specified by BUFFER-OR-NAME.
147BUFFER-OR-NAME must specify either a live buffer or the name of a 147BUFFER-OR-NAME must specify either a live buffer, or the name of a
148buffer. If no buffer with such a name exists, create one. 148buffer (if it does not exist, this macro creates it).
149 149
150Make sure the specified buffer is empty before evaluating BODY. 150Make sure the specified buffer is empty before evaluating BODY.
151Do not make that buffer current for BODY. Instead, bind 151Do not make that buffer current for BODY. Instead, bind
152`standard-output' to that buffer, so that output generated with 152`standard-output' to that buffer, so that output generated with
153`prin1' and similar functions in BODY goes into that buffer. 153`prin1' and similar functions in BODY goes into that buffer.
154 154
155After evaluating BODY, mark the specified buffer unmodified and 155After evaluating BODY, this marks the specified buffer unmodified and
156read-only, and display it in a window via `display-buffer'. Pass 156read-only, and displays it in a window via `display-buffer', passing
157ACTION as action argument to `display-buffer'. Automatically 157ACTION as the action argument to `display-buffer'. It automatically
158shrink the window used if `temp-buffer-resize-mode' is enabled. 158shrinks the relevant window if `temp-buffer-resize-mode' is enabled.
159 159
160Return the value returned by BODY unless QUIT-FUNCTION specifies 160Returns the value returned by BODY, unless QUIT-FUNCTION specifies
161a function. In that case, run the function with two arguments - 161a function. In that case, runs the function with two arguments -
162the window showing the specified buffer and the value returned by 162the window showing the specified buffer and the value returned by
163BODY - and return the value returned by that function. 163BODY - and returns the value returned by that function.
164 164
165If the buffer is displayed on a new frame, the window manager may 165If the buffer is displayed on a new frame, the window manager may
166decide to select that frame. In that case, it's usually a good 166decide to select that frame. In that case, it's usually a good
167strategy if the function specified by QUIT-FUNCTION selects the 167strategy if the function specified by QUIT-FUNCTION selects the
168window showing the buffer before reading a value from the 168window showing the buffer before reading a value from the
169minibuffer, for example, when asking a `yes-or-no-p' question. 169minibuffer; for example, when asking a `yes-or-no-p' question.
170 170
171This construct is similar to `with-output-to-temp-buffer' but 171This construct is similar to `with-output-to-temp-buffer', but does
172does neither put the buffer in help mode nor does it call 172not put the buffer in help mode, or call `temp-buffer-show-function'.
173`temp-buffer-show-function'. It also runs different hooks, 173It also runs different hooks, namely `temp-buffer-window-setup-hook'
174namely `temp-buffer-window-setup-hook' (with the specified buffer 174\(with the specified buffer current) and `temp-buffer-window-show-hook'
175current) and `temp-buffer-window-show-hook' (with the specified 175\(with the specified buffer current and the window showing it selected).
176buffer current and the window showing it selected).
177 176
178Since this macro calls `display-buffer', the window displaying 177Since this macro calls `display-buffer', the window displaying
179the buffer is usually not selected and the specified buffer 178the buffer is usually not selected and the specified buffer
@@ -6065,7 +6064,7 @@ A frame can be resized if and only if its root window is a live
6065window. The height of the root window is subject to the values 6064window. The height of the root window is subject to the values
6066of `fit-frame-to-buffer-max-height' and `window-min-height'." 6065of `fit-frame-to-buffer-max-height' and `window-min-height'."
6067 :type 'boolean 6066 :type 'boolean
6068 :version "24.2" 6067 :version "24.3"
6069 :group 'help) 6068 :group 'help)
6070 6069
6071(defcustom fit-frame-to-buffer-bottom-margin 4 6070(defcustom fit-frame-to-buffer-bottom-margin 4
@@ -6073,7 +6072,7 @@ of `fit-frame-to-buffer-max-height' and `window-min-height'."
6073This is the number of lines `fit-frame-to-buffer' leaves free at the 6072This is the number of lines `fit-frame-to-buffer' leaves free at the
6074bottom of the display in order to not obscure the system task bar." 6073bottom of the display in order to not obscure the system task bar."
6075 :type 'integer 6074 :type 'integer
6076 :version "24.2" 6075 :version "24.3"
6077 :group 'windows) 6076 :group 'windows)
6078 6077
6079(defun fit-frame-to-buffer (&optional frame max-height min-height) 6078(defun fit-frame-to-buffer (&optional frame max-height min-height)