aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/window.el
diff options
context:
space:
mode:
authorEli Zaretskii2012-11-13 16:17:18 +0200
committerEli Zaretskii2012-11-13 16:17:18 +0200
commit3c4ca7155293ffc2d04708007131bcbc882d8913 (patch)
tree61787be8cd43b6fb3d5159852fbd186eea404de7 /lisp/window.el
parent5ade42a5114255c43117065494b96d480c1e1588 (diff)
parentc708524567662c8911c5ab2695acc7bda0383705 (diff)
downloademacs-3c4ca7155293ffc2d04708007131bcbc882d8913.tar.gz
emacs-3c4ca7155293ffc2d04708007131bcbc882d8913.zip
Merge from trunk.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el50
1 files changed, 25 insertions, 25 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 10f75d44d69..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
@@ -3091,10 +3090,11 @@ before was current this also makes BUFFER the current buffer."
3091 "If non-nil, allow switching to an already visible buffer. 3090 "If non-nil, allow switching to an already visible buffer.
3092If this variable is non-nil, `switch-to-prev-buffer' and 3091If this variable is non-nil, `switch-to-prev-buffer' and
3093`switch-to-next-buffer' may switch to an already visible buffer 3092`switch-to-next-buffer' may switch to an already visible buffer
3094provided the buffer was shown in the argument window before. If 3093provided the buffer was shown before in the window specified as
3095this variable is nil, `switch-to-prev-buffer' and 3094argument to those functions. If this variable is nil,
3096`switch-to-next-buffer' always try to avoid switching to a buffer 3095`switch-to-prev-buffer' and `switch-to-next-buffer' always try to
3097that is already visible in another window on the same frame." 3096avoid switching to a buffer that is already visible in another
3097window on the same frame."
3098 :type 'boolean 3098 :type 'boolean
3099 :version "24.1" 3099 :version "24.1"
3100 :group 'windows) 3100 :group 'windows)
@@ -5855,8 +5855,8 @@ window on any visible or iconified frame. If this is t, it
5855unconditionally tries to display the buffer at its previous 5855unconditionally tries to display the buffer at its previous
5856position in the selected window. 5856position in the selected window.
5857 5857
5858This variable is ignored if the the buffer is already displayed 5858This variable is ignored if the buffer is already displayed in
5859in the selected window or never appeared in it before, or if 5859the selected window or never appeared in it before, or if
5860`switch-to-buffer' calls `pop-to-buffer' to display the buffer." 5860`switch-to-buffer' calls `pop-to-buffer' to display the buffer."
5861 :type '(choice 5861 :type '(choice
5862 (const :tag "Never" nil) 5862 (const :tag "Never" nil)
@@ -6064,7 +6064,7 @@ A frame can be resized if and only if its root window is a live
6064window. The height of the root window is subject to the values 6064window. The height of the root window is subject to the values
6065of `fit-frame-to-buffer-max-height' and `window-min-height'." 6065of `fit-frame-to-buffer-max-height' and `window-min-height'."
6066 :type 'boolean 6066 :type 'boolean
6067 :version "24.2" 6067 :version "24.3"
6068 :group 'help) 6068 :group 'help)
6069 6069
6070(defcustom fit-frame-to-buffer-bottom-margin 4 6070(defcustom fit-frame-to-buffer-bottom-margin 4
@@ -6072,7 +6072,7 @@ of `fit-frame-to-buffer-max-height' and `window-min-height'."
6072This 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
6073bottom 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."
6074 :type 'integer 6074 :type 'integer
6075 :version "24.2" 6075 :version "24.3"
6076 :group 'windows) 6076 :group 'windows)
6077 6077
6078(defun fit-frame-to-buffer (&optional frame max-height min-height) 6078(defun fit-frame-to-buffer (&optional frame max-height min-height)