diff options
| author | Eli Zaretskii | 2012-11-13 16:17:18 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-13 16:17:18 +0200 |
| commit | 3c4ca7155293ffc2d04708007131bcbc882d8913 (patch) | |
| tree | 61787be8cd43b6fb3d5159852fbd186eea404de7 /lisp/window.el | |
| parent | 5ade42a5114255c43117065494b96d480c1e1588 (diff) | |
| parent | c708524567662c8911c5ab2695acc7bda0383705 (diff) | |
| download | emacs-3c4ca7155293ffc2d04708007131bcbc882d8913.tar.gz emacs-3c4ca7155293ffc2d04708007131bcbc882d8913.zip | |
Merge from trunk.
Diffstat (limited to 'lisp/window.el')
| -rw-r--r-- | lisp/window.el | 50 |
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. |
| 147 | BUFFER-OR-NAME must specify either a live buffer or the name of a | 147 | BUFFER-OR-NAME must specify either a live buffer, or the name of a |
| 148 | buffer. If no buffer with such a name exists, create one. | 148 | buffer (if it does not exist, this macro creates it). |
| 149 | 149 | ||
| 150 | Make sure the specified buffer is empty before evaluating BODY. | 150 | Make sure the specified buffer is empty before evaluating BODY. |
| 151 | Do not make that buffer current for BODY. Instead, bind | 151 | Do 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 | ||
| 155 | After evaluating BODY, mark the specified buffer unmodified and | 155 | After evaluating BODY, this marks the specified buffer unmodified and |
| 156 | read-only, and display it in a window via `display-buffer'. Pass | 156 | read-only, and displays it in a window via `display-buffer', passing |
| 157 | ACTION as action argument to `display-buffer'. Automatically | 157 | ACTION as the action argument to `display-buffer'. It automatically |
| 158 | shrink the window used if `temp-buffer-resize-mode' is enabled. | 158 | shrinks the relevant window if `temp-buffer-resize-mode' is enabled. |
| 159 | 159 | ||
| 160 | Return the value returned by BODY unless QUIT-FUNCTION specifies | 160 | Returns the value returned by BODY, unless QUIT-FUNCTION specifies |
| 161 | a function. In that case, run the function with two arguments - | 161 | a function. In that case, runs the function with two arguments - |
| 162 | the window showing the specified buffer and the value returned by | 162 | the window showing the specified buffer and the value returned by |
| 163 | BODY - and return the value returned by that function. | 163 | BODY - and returns the value returned by that function. |
| 164 | 164 | ||
| 165 | If the buffer is displayed on a new frame, the window manager may | 165 | If the buffer is displayed on a new frame, the window manager may |
| 166 | decide to select that frame. In that case, it's usually a good | 166 | decide to select that frame. In that case, it's usually a good |
| 167 | strategy if the function specified by QUIT-FUNCTION selects the | 167 | strategy if the function specified by QUIT-FUNCTION selects the |
| 168 | window showing the buffer before reading a value from the | 168 | window showing the buffer before reading a value from the |
| 169 | minibuffer, for example, when asking a `yes-or-no-p' question. | 169 | minibuffer; for example, when asking a `yes-or-no-p' question. |
| 170 | 170 | ||
| 171 | This construct is similar to `with-output-to-temp-buffer' but | 171 | This construct is similar to `with-output-to-temp-buffer', but does |
| 172 | does neither put the buffer in help mode nor does it call | 172 | not put the buffer in help mode, or call `temp-buffer-show-function'. |
| 173 | `temp-buffer-show-function'. It also runs different hooks, | 173 | It also runs different hooks, namely `temp-buffer-window-setup-hook' |
| 174 | namely `temp-buffer-window-setup-hook' (with the specified buffer | 174 | \(with the specified buffer current) and `temp-buffer-window-show-hook' |
| 175 | current) and `temp-buffer-window-show-hook' (with the specified | 175 | \(with the specified buffer current and the window showing it selected). |
| 176 | buffer current and the window showing it selected). | ||
| 177 | 176 | ||
| 178 | Since this macro calls `display-buffer', the window displaying | 177 | Since this macro calls `display-buffer', the window displaying |
| 179 | the buffer is usually not selected and the specified buffer | 178 | the 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. |
| 3092 | If this variable is non-nil, `switch-to-prev-buffer' and | 3091 | If 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 |
| 3094 | provided the buffer was shown in the argument window before. If | 3093 | provided the buffer was shown before in the window specified as |
| 3095 | this variable is nil, `switch-to-prev-buffer' and | 3094 | argument 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 |
| 3097 | that is already visible in another window on the same frame." | 3096 | avoid switching to a buffer that is already visible in another |
| 3097 | window 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 | |||
| 5855 | unconditionally tries to display the buffer at its previous | 5855 | unconditionally tries to display the buffer at its previous |
| 5856 | position in the selected window. | 5856 | position in the selected window. |
| 5857 | 5857 | ||
| 5858 | This variable is ignored if the the buffer is already displayed | 5858 | This variable is ignored if the buffer is already displayed in |
| 5859 | in the selected window or never appeared in it before, or if | 5859 | the 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 | |||
| 6064 | window. The height of the root window is subject to the values | 6064 | window. The height of the root window is subject to the values |
| 6065 | of `fit-frame-to-buffer-max-height' and `window-min-height'." | 6065 | of `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'." | |||
| 6072 | This is the number of lines `fit-frame-to-buffer' leaves free at the | 6072 | This is the number of lines `fit-frame-to-buffer' leaves free at the |
| 6073 | bottom of the display in order to not obscure the system task bar." | 6073 | bottom 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) |