aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2017-08-19 10:55:04 +0200
committerMartin Rudalics2017-08-19 10:55:04 +0200
commit8a9905e2f723d757f1a75d2b45855f7fb1074632 (patch)
treeecd09fc606e35cbb5d3f4c14708b0a1318b6b24d
parent82b05985ba55761c497810cf9e14fd530253a1b2 (diff)
downloademacs-8a9905e2f723d757f1a75d2b45855f7fb1074632.tar.gz
emacs-8a9905e2f723d757f1a75d2b45855f7fb1074632.zip
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'.
-rw-r--r--doc/lispref/windows.texi12
-rw-r--r--lisp/window.el12
2 files changed, 12 insertions, 12 deletions
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
1319@code{delete-other-windows}. @xref{Window Parameters}. 1319@code{delete-other-windows}. @xref{Window Parameters}.
1320 1320
1321Also, if @code{ignore-window-parameters} is @code{nil}, this function 1321Also, if @code{ignore-window-parameters} is @code{nil}, this function
1322does not delete any window whose @code{no-delete-other-window} parameter 1322does not delete any window whose @code{no-delete-other-windows}
1323is non-@code{nil}. 1323parameter is non-@code{nil}.
1324@end deffn 1324@end deffn
1325 1325
1326@deffn Command delete-windows-on &optional buffer-or-name frame 1326@deffn Command delete-windows-on &optional buffer-or-name frame
@@ -3381,7 +3381,7 @@ producing the frame layout sketched above.
3381@example 3381@example
3382@group 3382@group
3383(defvar parameters 3383(defvar parameters
3384 '(window-parameters . ((no-other-window . t) (no-delete-other-window . t)))) 3384 '(window-parameters . ((no-other-window . t) (no-delete-other-windows . t))))
3385 3385
3386(setq fit-window-to-buffer-horizontally t) 3386(setq fit-window-to-buffer-horizontally t)
3387(setq window-resize-pixelwise t) 3387(setq window-resize-pixelwise t)
@@ -3423,7 +3423,7 @@ retain their respective sizes when maximizing the frame, the variable
3423are accessible via @kbd{C-x o} by installing the @code{no-other-window} 3423are accessible via @kbd{C-x o} by installing the @code{no-other-window}
3424parameter for each of these windows. In addition, it makes sure that 3424parameter for each of these windows. In addition, it makes sure that
3425side windows are not deleted via @kbd{C-x 1} by installing the 3425side windows are not deleted via @kbd{C-x 1} by installing the
3426@code{no-delete-other-window} parameter for each of these windows. 3426@code{no-delete-other-windows} parameter for each of these windows.
3427 3427
3428 Since @code{dired} buffers have no fixed names, we use a special 3428 Since @code{dired} buffers have no fixed names, we use a special
3429function @code{dired-default-directory-on-left} in order to display a 3429function @code{dired-default-directory-on-left} in order to display a
@@ -4990,8 +4990,8 @@ This parameter affects the execution of @code{delete-window}
4990This parameter affects the execution of @code{delete-other-windows} 4990This parameter affects the execution of @code{delete-other-windows}
4991(@pxref{Deleting Windows}). 4991(@pxref{Deleting Windows}).
4992 4992
4993@item no-delete-other-window 4993@item no-delete-other-windows
4994@vindex no-delete-other-window, a window parameter 4994@vindex no-delete-other-windows, a window parameter
4995This parameter marks the window as not deletable by 4995This parameter marks the window as not deletable by
4996@code{delete-other-windows} (@pxref{Deleting Windows}). 4996@code{delete-other-windows} (@pxref{Deleting Windows}).
4997 4997
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.
999This function installs the `window-side' and `window-slot' 999This function installs the `window-side' and `window-slot'
1000parameters and makes them persistent. It neither modifies ALIST 1000parameters and makes them persistent. It neither modifies ALIST
1001nor installs any other window parameters unless they have been 1001nor installs any other window parameters unless they have been
1002explicitly provided via a `window-parameter' entry in ALIST." 1002explicitly provided via a `window-parameters' entry in ALIST."
1003 (let* ((side (or (cdr (assq 'side alist)) 'bottom)) 1003 (let* ((side (or (cdr (assq 'side alist)) 'bottom))
1004 (slot (or (cdr (assq 'slot alist)) 0)) 1004 (slot (or (cdr (assq 'slot alist)) 0))
1005 (left-or-right (memq side '(left right))) 1005 (left-or-right (memq side '(left right)))
@@ -4106,7 +4106,7 @@ Else, if WINDOW is part of an atomic window, call this function
4106with the root of the atomic window as its argument. Signal an 4106with the root of the atomic window as its argument. Signal an
4107error if that root window is the root window of WINDOW's frame. 4107error if that root window is the root window of WINDOW's frame.
4108Also signal an error if WINDOW is a side window. Do not delete 4108Also signal an error if WINDOW is a side window. Do not delete
4109any window whose `no-delete-other-window' parameter is non-nil." 4109any window whose `no-delete-other-windows' parameter is non-nil."
4110 (interactive) 4110 (interactive)
4111 (setq window (window-normalize-window window)) 4111 (setq window (window-normalize-window window))
4112 (let* ((frame (window-frame window)) 4112 (let* ((frame (window-frame window))
@@ -4137,17 +4137,17 @@ any window whose `no-delete-other-window' parameter is non-nil."
4137 4137
4138 (cond 4138 (cond
4139 ((or ignore-window-parameters 4139 ((or ignore-window-parameters
4140 (not (window-with-parameter 'no-delete-other-window nil frame))) 4140 (not (window-with-parameter 'no-delete-other-windows nil frame)))
4141 (setq main (frame-root-window frame))) 4141 (setq main (frame-root-window frame)))
4142 ((catch 'tag 4142 ((catch 'tag
4143 (walk-window-tree 4143 (walk-window-tree
4144 (lambda (other) 4144 (lambda (other)
4145 (when (or (and (window-parameter other 'window-side) 4145 (when (or (and (window-parameter other 'window-side)
4146 (not (window-parameter 4146 (not (window-parameter
4147 other 'no-delete-other-window))) 4147 other 'no-delete-other-windows)))
4148 (and (not (window-parameter other 'window-side)) 4148 (and (not (window-parameter other 'window-side))
4149 (window-parameter 4149 (window-parameter
4150 other 'no-delete-other-window))) 4150 other 'no-delete-other-windows)))
4151 (throw 'tag nil)))) 4151 (throw 'tag nil))))
4152 t) 4152 t)
4153 (setq main (window-main-window frame))) 4153 (setq main (window-main-window frame)))
@@ -4158,7 +4158,7 @@ any window whose `no-delete-other-window' parameter is non-nil."
4158 (when (and (window-live-p other) 4158 (when (and (window-live-p other)
4159 (not (eq other window)) 4159 (not (eq other window))
4160 (not (window-parameter 4160 (not (window-parameter
4161 other 'no-delete-other-window)) 4161 other 'no-delete-other-windows))
4162 ;; When WINDOW and the other window are part of the 4162 ;; When WINDOW and the other window are part of the
4163 ;; same atomic window, don't delete the other. 4163 ;; same atomic window, don't delete the other.
4164 (or (not atom-root) 4164 (or (not atom-root)