From: Martin Rudalics Date: Tue, 13 Dec 2011 13:37:48 +0000 (+0100) Subject: Minor fixes in window handling code and docs. X-Git-Tag: emacs-pretest-24.0.93~175 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=454592a615ac4d86a6ce594945487642be5013d7;p=emacs.git Minor fixes in window handling code and docs. * window.c (Vwindow_combination_resize) (Vwindow_combination_limit): Use t instead of non-nil in doc-strings. * window.el (delete-other-windows): Use correct frame in call to window-with-parameter. * windows.texi (Splitting Windows): Use t instead of non-nil when describing window-combination-resize. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 44d44e7528c..a03521d449b 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-12-13 Martin Rudalics + + * windows.texi (Splitting Windows): Use t instead of non-nil + when describing window-combination-resize. + 2011-12-05 Stefan Monnier * text.texi (Special Properties): Warn against `intangible' properties diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 437b6db8d58..df631158689 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -793,20 +793,20 @@ the new root window. @defopt window-combination-resize If this variable is @code{nil}, @code{split-window} can only split a -window (denoted by @var{window}) if @var{window}'s screen area is -large enough to accommodate both itself and the new window. This is -the default. - -If this variable is non-@code{nil}, @code{split-window} tries to -resize all windows that are part of the same combination as -@var{window}, in order to accommodate the new window. In particular, -this may allow @code{split-window} to succeed even if @var{window} is -a fixed-size window or too small to ordinarily split. Furthermore, -subsequently resizing or deleting @var{window} may resize all other -windows in its combination. - -This variable has no effect if @code{window-combination-limit} is -non-@code{nil} (see below). +window (denoted by @var{window}) if @var{window}'s screen area is large +enough to accommodate both itself and the new window. + +If this variable is @code{t}, @code{split-window} tries to resize all +windows that are part of the same combination as @var{window}, in order +to accommodate the new window. In particular, this may allow +@code{split-window} to succeed even if @var{window} is a fixed-size +window or too small to ordinarily split. Furthermore, subsequently +resizing or deleting @var{window} may resize all other windows in its +combination. + +The default is @code{nil}. Other values are reserved for future use. +The value of this variable is ignored when +@code{window-combination-limit} is non-@code{nil} (see below). @end defopt To illustrate the effect of @code{window-combination-resize}, @@ -857,9 +857,9 @@ If @code{window-combination-resize} is @code{nil}, splitting window @end smallexample @noindent -If @code{window-combination-resize} is non-@code{nil}, splitting -@code{W3} instead leaves all three live windows with approximately the -same height: +If @code{window-combination-resize} is @code{t}, splitting @code{W3} +instead leaves all three live windows with approximately the same +height: @smallexample @group diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80eb82a521d..31533082b77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-13 Martin Rudalics + + * window.el (delete-other-windows): Use correct frame in call to + window-with-parameter. + 2011-12-12 Daniel Pfeiffer * progmodes/make-mode.el: Bring it up to date with makepp V2.0. diff --git a/lisp/window.el b/lisp/window.el index 4838dfa7969..dcf7394b204 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2455,7 +2455,7 @@ window signal an error." (throw 'done (delete-other-windows atom-root))) ((eq window-side 'none) ;; Set side-main to the major non-side window. - (setq side-main (window-with-parameter 'window-side 'none nil t))) + (setq side-main (window-with-parameter 'window-side 'none frame t))) ((memq window-side window-sides) (error "Cannot make side window the only window"))) ;; If WINDOW is the main non-side window, do nothing. diff --git a/src/ChangeLog b/src/ChangeLog index 221ba913a80..5cdbd528a2e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-12-13 Martin Rudalics + + * window.c (Vwindow_combination_resize) + (Vwindow_combination_limit): Use t instead of non-nil in + doc-strings. + 2011-12-11 Kenichi Handa * coding.c (Funencodable_char_position): Pay attention to the diff --git a/src/window.c b/src/window.c index b908749ea4a..f007aaf52cd 100644 --- a/src/window.c +++ b/src/window.c @@ -6506,22 +6506,24 @@ frame to be redrawn only if it is a tty frame. */); Vrecenter_redisplay = Qtty; DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize, - doc: /* Non-nil means resize window combinations proportionally. + doc: /* If t, resize window combinations proportionally. If this variable is nil, splitting a window gets the entire screen space for displaying the new window from the window to split. Deleting and resizing a window preferably resizes one adjacent window only. -If this variable is non-nil, splitting a window tries to get the space +If this variable is t, splitting a window tries to get the space proportionally from all windows in the same combination. This also allows to split a window that is otherwise too small or of fixed size. Resizing and deleting a window proportionally resize all windows in the same combination. +Other values are reserved for future use. + This variable takes no effect if `window-combination-limit' is non-nil. */); Vwindow_combination_resize = Qnil; DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit, - doc: /* Non-nil means splitting a window makes a new parent window. + doc: /* If t, splitting a window makes a new parent window. If this variable is nil, splitting a window will create a new parent window only if the window has no parent window or the window shall become a combination orthogonal to the one it is part of.