diff options
| author | Glenn Morris | 2012-11-16 00:31:20 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-11-16 00:31:20 -0800 |
| commit | 7c82753d4cee69bc63cf19daee89b69873559221 (patch) | |
| tree | cc18e7148b60e25fbf943b42dd675f57ec634dd0 | |
| parent | b0634f5d0a5ec5bc97c4d0cc7c8544611cbf0adc (diff) | |
| download | emacs-7c82753d4cee69bc63cf19daee89b69873559221.tar.gz emacs-7c82753d4cee69bc63cf19daee89b69873559221.zip | |
Doc fixes related to fit-frame-to-buffer
* lisp/window.el (fit-frame-to-buffer-bottom-margin)
(fit-frame-to-buffer, fit-window-to-buffer): Doc fixes.
* etc/NEWS: Related edit.
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/window.el | 26 |
3 files changed, 26 insertions, 11 deletions
| @@ -851,8 +851,12 @@ now accept a third argument to avoid choosing the selected window. | |||
| 851 | *** `temp-buffer-resize-mode' no longer resizes windows that have been | 851 | *** `temp-buffer-resize-mode' no longer resizes windows that have been |
| 852 | reused. | 852 | reused. |
| 853 | 853 | ||
| 854 | *** New function `fit-frame-to-buffer' and new options | 854 | *** New command `fit-frame-to-buffer' adjusts the frame height to |
| 855 | `fit-frame-to-buffer' and `fit-frame-to-buffer-bottom-margin'. | 855 | fit the contents. |
| 856 | |||
| 857 | *** The command `fit-window-to-buffer' can adjust the frame height | ||
| 858 | if the new option `fit-frame-to-buffer' is non-nil. | ||
| 859 | |||
| 856 | +++ | 860 | +++ |
| 857 | *** New option switch-to-buffer-preserve-window-point to restore a | 861 | *** New option switch-to-buffer-preserve-window-point to restore a |
| 858 | window's point when switching buffers. | 862 | window's point when switching buffers. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a62288dd29a..74d66809d55 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-11-16 Glenn Morris <rgm@gnu.org> | 1 | 2012-11-16 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * window.el (fit-frame-to-buffer-bottom-margin) | ||
| 4 | (fit-frame-to-buffer, fit-window-to-buffer): Doc fixes. | ||
| 5 | |||
| 3 | * faces.el (face-underline-p): Use face-attribute-specified-or. | 6 | * faces.el (face-underline-p): Use face-attribute-specified-or. |
| 4 | 7 | ||
| 5 | 2012-11-15 Juanma Barranquero <lekktu@gmail.com> | 8 | 2012-11-15 Juanma Barranquero <lekktu@gmail.com> |
diff --git a/lisp/window.el b/lisp/window.el index 6ea66d9d0a2..c9ea8351e8c 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -6074,22 +6074,26 @@ of `fit-frame-to-buffer-max-height' and `window-min-height'." | |||
| 6074 | :group 'help) | 6074 | :group 'help) |
| 6075 | 6075 | ||
| 6076 | (defcustom fit-frame-to-buffer-bottom-margin 4 | 6076 | (defcustom fit-frame-to-buffer-bottom-margin 4 |
| 6077 | "Bottom margin for `fit-frame-to-buffer'. | 6077 | "Bottom margin for the command `fit-frame-to-buffer'. |
| 6078 | This is the number of lines `fit-frame-to-buffer' leaves free at the | 6078 | This is the number of lines that function leaves free at the bottom of |
| 6079 | bottom of the display in order to not obscure the system task bar." | 6079 | the display, in order to not obscure any system task bar or panel. |
| 6080 | If you do not have one (or if it is vertical) you might want to | ||
| 6081 | reduce this. If it is thicker, you might want to increase this." | ||
| 6082 | ;; If you set this too small, fit-frame-to-buffer can shift the | ||
| 6083 | ;; frame up to avoid the panel. | ||
| 6080 | :type 'integer | 6084 | :type 'integer |
| 6081 | :version "24.3" | 6085 | :version "24.3" |
| 6082 | :group 'windows) | 6086 | :group 'windows) |
| 6083 | 6087 | ||
| 6084 | (defun fit-frame-to-buffer (&optional frame max-height min-height) | 6088 | (defun fit-frame-to-buffer (&optional frame max-height min-height) |
| 6085 | "Adjust height of FRAME to display its buffer's contents exactly. | 6089 | "Adjust height of FRAME to display its buffer contents exactly. |
| 6086 | FRAME can be any live frame and defaults to the selected one. | 6090 | FRAME can be any live frame and defaults to the selected one. |
| 6087 | 6091 | ||
| 6088 | Optional argument MAX-HEIGHT specifies the maximum height of | 6092 | Optional argument MAX-HEIGHT specifies the maximum height of FRAME. |
| 6089 | FRAME and defaults to the height of the display below the current | 6093 | It defaults to the height of the display below the current |
| 6090 | top line of FRAME minus FIT-FRAME-TO-BUFFER-BOTTOM-MARGIN. | 6094 | top line of FRAME, minus `fit-frame-to-buffer-bottom-margin'. |
| 6091 | Optional argument MIN-HEIGHT specifies the minimum height of | 6095 | Optional argument MIN-HEIGHT specifies the minimum height of FRAME. |
| 6092 | FRAME." | 6096 | The default corresponds to `window-min-height'." |
| 6093 | (interactive) | 6097 | (interactive) |
| 6094 | (setq frame (window-normalize-frame frame)) | 6098 | (setq frame (window-normalize-frame frame)) |
| 6095 | (let* ((root (frame-root-window frame)) | 6099 | (let* ((root (frame-root-window frame)) |
| @@ -6166,6 +6170,10 @@ defaults to `window-min-height'. Both MAX-HEIGHT and MIN-HEIGHT | |||
| 6166 | are specified in lines and include the mode line and header line, | 6170 | are specified in lines and include the mode line and header line, |
| 6167 | if any. | 6171 | if any. |
| 6168 | 6172 | ||
| 6173 | If WINDOW is a full height window, then if the option | ||
| 6174 | `fit-frame-to-buffer' is non-nil, this calls the function | ||
| 6175 | `fit-frame-to-buffer' to adjust the frame height. | ||
| 6176 | |||
| 6169 | Return the number of lines by which WINDOW was enlarged or | 6177 | Return the number of lines by which WINDOW was enlarged or |
| 6170 | shrunk. If an error occurs during resizing, return nil but don't | 6178 | shrunk. If an error occurs during resizing, return nil but don't |
| 6171 | signal an error. | 6179 | signal an error. |