From: Martin Rudalics Date: Sat, 19 Aug 2017 08:55:04 +0000 (+0200) Subject: Fix two side window problems noted by Alex (Bug#27999) X-Git-Tag: emacs-26.0.90~410 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8a9905e2f723d757f1a75d2b45855f7fb1074632;p=emacs.git Fix two side window problems noted by Alex (Bug#27999) * lisp/window.el (display-buffer-in-side-window): Fix doc-string typo. (delete-other-windows): Rename the `no-delete-other-window' parameter to `no-delete-other-windows' (see the discussion in Bug#27999 for the rationale of this change). * doc/lispref/windows.texi (Deleting Windows) (Frame Layouts with Side Windows, Window Parameters): Rename `no-delete-other-window' to `no-delete-other-windows'. --- diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index eb5c2fc46be..0df8e5ee04b 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1319,8 +1319,8 @@ argument @var{window}, in lieu of the usual action of @code{delete-other-windows}. @xref{Window Parameters}. Also, if @code{ignore-window-parameters} is @code{nil}, this function -does not delete any window whose @code{no-delete-other-window} parameter -is non-@code{nil}. +does not delete any window whose @code{no-delete-other-windows} +parameter is non-@code{nil}. @end deffn @deffn Command delete-windows-on &optional buffer-or-name frame @@ -3381,7 +3381,7 @@ producing the frame layout sketched above. @example @group (defvar parameters - '(window-parameters . ((no-other-window . t) (no-delete-other-window . t)))) + '(window-parameters . ((no-other-window . t) (no-delete-other-windows . t)))) (setq fit-window-to-buffer-horizontally t) (setq window-resize-pixelwise t) @@ -3423,7 +3423,7 @@ retain their respective sizes when maximizing the frame, the variable are accessible via @kbd{C-x o} by installing the @code{no-other-window} parameter for each of these windows. In addition, it makes sure that side windows are not deleted via @kbd{C-x 1} by installing the -@code{no-delete-other-window} parameter for each of these windows. +@code{no-delete-other-windows} parameter for each of these windows. Since @code{dired} buffers have no fixed names, we use a special function @code{dired-default-directory-on-left} in order to display a @@ -4990,8 +4990,8 @@ This parameter affects the execution of @code{delete-window} This parameter affects the execution of @code{delete-other-windows} (@pxref{Deleting Windows}). -@item no-delete-other-window -@vindex no-delete-other-window, a window parameter +@item no-delete-other-windows +@vindex no-delete-other-windows, a window parameter This parameter marks the window as not deletable by @code{delete-other-windows} (@pxref{Deleting Windows}). diff --git a/lisp/window.el b/lisp/window.el index f1c82c759d8..7aea9ae7399 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -999,7 +999,7 @@ for displaying BUFFER, nil if no suitable window can be found. This function installs the `window-side' and `window-slot' parameters and makes them persistent. It neither modifies ALIST nor installs any other window parameters unless they have been -explicitly provided via a `window-parameter' entry in ALIST." +explicitly provided via a `window-parameters' entry in ALIST." (let* ((side (or (cdr (assq 'side alist)) 'bottom)) (slot (or (cdr (assq 'slot alist)) 0)) (left-or-right (memq side '(left right))) @@ -4106,7 +4106,7 @@ Else, if WINDOW is part of an atomic window, call this function with the root of the atomic window as its argument. Signal an error if that root window is the root window of WINDOW's frame. Also signal an error if WINDOW is a side window. Do not delete -any window whose `no-delete-other-window' parameter is non-nil." +any window whose `no-delete-other-windows' parameter is non-nil." (interactive) (setq window (window-normalize-window window)) (let* ((frame (window-frame window)) @@ -4137,17 +4137,17 @@ any window whose `no-delete-other-window' parameter is non-nil." (cond ((or ignore-window-parameters - (not (window-with-parameter 'no-delete-other-window nil frame))) + (not (window-with-parameter 'no-delete-other-windows nil frame))) (setq main (frame-root-window frame))) ((catch 'tag (walk-window-tree (lambda (other) (when (or (and (window-parameter other 'window-side) (not (window-parameter - other 'no-delete-other-window))) + other 'no-delete-other-windows))) (and (not (window-parameter other 'window-side)) (window-parameter - other 'no-delete-other-window))) + other 'no-delete-other-windows))) (throw 'tag nil)))) t) (setq main (window-main-window frame))) @@ -4158,7 +4158,7 @@ any window whose `no-delete-other-window' parameter is non-nil." (when (and (window-live-p other) (not (eq other window)) (not (window-parameter - other 'no-delete-other-window)) + other 'no-delete-other-windows)) ;; When WINDOW and the other window are part of the ;; same atomic window, don't delete the other. (or (not atom-root)