aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2012-09-30 11:10:59 +0200
committerMartin Rudalics2012-09-30 11:10:59 +0200
commit5938d5196d09aff887aa74603c102b1f303a613a (patch)
tree57c528aafa761114bf2528593a85642e6e3e5e21 /src
parenta97dc380601446c00adfbd1d8e86e73e7d81a359 (diff)
downloademacs-5938d5196d09aff887aa74603c102b1f303a613a.tar.gz
emacs-5938d5196d09aff887aa74603c102b1f303a613a.zip
Handle window-height and window-width alist entries in `display-buffer'.
In buffer display functions handle window-height/window-width alist entries. Suggested by Juri Linkov as fix for Bug#1806. * window.el (window--display-buffer): New argument ALIST. Obey window-height and window-width alist entries. (window--try-to-split-window): New argument ALIST. Bind window-combination-limit to t when the window's size shall be changed and window-combination-limit equals `window-size'. (display-buffer-in-atom-window) (display-buffer-in-major-side-window) (display-buffer-in-side-window, display-buffer-same-window) (display-buffer-reuse-window, display-buffer-pop-up-frame) (display-buffer-pop-up-window, display-buffer-below-selected) (display-buffer-at-bottom, display-buffer-in-previous-window) (display-buffer-use-some-window): Adjust all callers of window--display-buffer and window--try-to-split-window. (fit-frame-to-buffer): New option. (fit-window-to-buffer): Can resize frames if fit-frame-to-buffer is non-nil. (display-buffer-in-major-side-window): Evaluate window-height / window-width alist entries. * help.el (temp-buffer-resize-frames) (temp-buffer-resize-regexps): Remove options. (temp-buffer-resize-mode): Adjust doc-string. (resize-temp-buffer-window): Don't consult temp-buffer-resize-regexps. Use fit-frame-to-buffer instead of temp-buffer-resize-frames. * dired.el (dired-mark-pop-up): Call display-buffer-below-selected with a fit-window-to-buffer alist entry. * window.c (Vwindow_combination_limit): New default value. (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/window.c20
2 files changed, 16 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e07f7e131cb..12992f1de0a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-09-30 Martin Rudalics <rudalics@gmx.at>
2
3 * window.c (Vwindow_combination_limit): New default value.
4 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
5
12012-09-30 Paul Eggert <eggert@cs.ucla.edu> 62012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING. 8 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
@@ -131,6 +136,7 @@
131 (redisplay_internal): Record itself in backtrace_list. 136 (redisplay_internal): Record itself in backtrace_list.
132 (syms_of_xdisp): Define Qautomatic_redisplay. 137 (syms_of_xdisp): Define Qautomatic_redisplay.
133 138
1392012-09-25 Eli Zaretskii <eliz@gnu.org>
1342012-09-25 Juanma Barranquero <lekktu@gmail.com> 1402012-09-25 Juanma Barranquero <lekktu@gmail.com>
135 141
136 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies. 142 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
diff --git a/src/window.c b/src/window.c
index 86f86deedb2..bb3b73f9acd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -60,7 +60,7 @@ static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer;
60static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; 60static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window;
61static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; 61static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically;
62static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; 62static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
63static Lisp_Object Qsafe, Qabove, Qbelow, Qtemp_buffer_resize, Qclone_of; 63static Lisp_Object Qsafe, Qabove, Qbelow, Qwindow_size, Qclone_of;
64 64
65static int displayed_window_lines (struct window *); 65static int displayed_window_lines (struct window *);
66static int count_windows (struct window *); 66static int count_windows (struct window *);
@@ -6704,7 +6704,7 @@ syms_of_window (void)
6704 DEFSYM (Qreplace_buffer_in_windows, "replace-buffer-in-windows"); 6704 DEFSYM (Qreplace_buffer_in_windows, "replace-buffer-in-windows");
6705 DEFSYM (Qrecord_window_buffer, "record-window-buffer"); 6705 DEFSYM (Qrecord_window_buffer, "record-window-buffer");
6706 DEFSYM (Qget_mru_window, "get-mru-window"); 6706 DEFSYM (Qget_mru_window, "get-mru-window");
6707 DEFSYM (Qtemp_buffer_resize, "temp-buffer-resize"); 6707 DEFSYM (Qwindow_size, "window-size");
6708 DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook"); 6708 DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook");
6709 DEFSYM (Qabove, "above"); 6709 DEFSYM (Qabove, "above");
6710 DEFSYM (Qbelow, "below"); 6710 DEFSYM (Qbelow, "below");
@@ -6804,19 +6804,19 @@ This variable takes no effect if `window-combination-limit' is non-nil. */);
6804The following values are recognized: 6804The following values are recognized:
6805 6805
6806nil means splitting a window will create a new parent window only if the 6806nil means splitting a window will create a new parent window only if the
6807 window has no parent window or the window shall become a combination 6807 window has no parent window or the window shall become part of a
6808 orthogonal to the one it is part of. 6808 combination orthogonal to the one it is part of.
6809 6809
6810`temp-buffer-resize' means that splitting a window for displaying a 6810`window-size' means that splitting a window for displaying a buffer
6811 temporary buffer makes a new parent window provided 6811 makes a new parent window provided `display-buffer' is supposed to
6812 `temp-buffer-resize-mode' is enabled. Otherwise, this value is 6812 explicitly set the window's size due to the presence of a
6813 handled like nil. 6813 `window-height' or `window-width' entry in the alist used by
6814 `display-buffer'. Otherwise, this value is handled like nil.
6814 6815
6815`temp-buffer' means that splitting a window for displaying a temporary 6816`temp-buffer' means that splitting a window for displaying a temporary
6816 buffer always makes a new parent window. Otherwise, this value is 6817 buffer always makes a new parent window. Otherwise, this value is
6817 handled like nil. 6818 handled like nil.
6818 6819
6819
6820`display-buffer' means that splitting a window for displaying a buffer 6820`display-buffer' means that splitting a window for displaying a buffer
6821 always makes a new parent window. Since temporary buffers are 6821 always makes a new parent window. Since temporary buffers are
6822 displayed by the function `display-buffer', this value is stronger 6822 displayed by the function `display-buffer', this value is stronger
@@ -6829,7 +6829,7 @@ t means that splitting a window always creates a new parent window. If
6829 sibling. 6829 sibling.
6830 6830
6831Other values are reserved for future use. */); 6831Other values are reserved for future use. */);
6832 Vwindow_combination_limit = Qtemp_buffer_resize; 6832 Vwindow_combination_limit = Qwindow_size;
6833 6833
6834 DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, 6834 DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters,
6835 doc: /* Alist of persistent window parameters. 6835 doc: /* Alist of persistent window parameters.