aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEric Abrahamsen2019-04-21 11:04:20 -0700
committerEric Abrahamsen2019-09-21 18:41:22 -0700
commite1a45c26c4b951d1d2407c2f3075164866d8a0ea (patch)
tree728b1e1947db036248a827ab1cae068f0e6b4338 /lisp
parent14e7c01feeafd3852522c221187e7359d21079f5 (diff)
downloademacs-e1a45c26c4b951d1d2407c2f3075164866d8a0ea.tar.gz
emacs-e1a45c26c4b951d1d2407c2f3075164866d8a0ea.zip
New option for making Gnus window layouts atomic
* lisp/gnus/gnus-win.el (gnus-use-atomic-windows): New boolean customization option. (gnus-configure-windows): When removing old window layouts, check for and remove atomicity. (gnus-configure-windows): When gnus-use-atomic-windows is non-nil, make Gnus window layouts atomic. * doc/misc/gnus.texi (Window Layout): Document.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-win.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index e6906e99bb2..cc3141cf631 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -39,6 +39,11 @@
39 :group 'gnus-windows 39 :group 'gnus-windows
40 :type 'boolean) 40 :type 'boolean)
41 41
42(defcustom gnus-use-atomic-windows t
43 "If non-nil, Gnus' window compositions will be atomic."
44 :type 'boolean
45 :version "27.1")
46
42(defcustom gnus-window-min-width 2 47(defcustom gnus-window-min-width 2
43 "Minimum width of Gnus buffers." 48 "Minimum width of Gnus buffers."
44 :group 'gnus-windows 49 :group 'gnus-windows
@@ -402,6 +407,15 @@ See the Gnus manual for an explanation of the syntax used.")
402 (unless (gnus-buffer-live-p nntp-server-buffer) 407 (unless (gnus-buffer-live-p nntp-server-buffer)
403 (nnheader-init-server-buffer)) 408 (nnheader-init-server-buffer))
404 409
410 ;; Remove all 'window-atom parameters, as we're going to blast
411 ;; and recreate the window layout.
412 (when (window-parameter nil 'window-atom)
413 (let ((root (window-atom-root)))
414 (walk-window-subtree
415 (lambda (win)
416 (set-window-parameter win 'window-atom nil))
417 root t)))
418
405 ;; Either remove all windows or just remove all Gnus windows. 419 ;; Either remove all windows or just remove all Gnus windows.
406 (let ((frame (selected-frame))) 420 (let ((frame (selected-frame)))
407 (unwind-protect 421 (unwind-protect
@@ -423,6 +437,13 @@ See the Gnus manual for an explanation of the syntax used.")
423 (set-buffer nntp-server-buffer) 437 (set-buffer nntp-server-buffer)
424 (gnus-configure-frame split) 438 (gnus-configure-frame split)
425 (run-hooks 'gnus-configure-windows-hook) 439 (run-hooks 'gnus-configure-windows-hook)
440
441 ;; If we're using atomic windows, and the current frame has
442 ;; multiple windows, make them atomic.
443 (when (and gnus-use-atomic-windows
444 (window-parent (selected-window)))
445 (window-make-atom (window-parent (selected-window))))
446
426 (when gnus-window-frame-focus 447 (when gnus-window-frame-focus
427 (select-frame-set-input-focus 448 (select-frame-set-input-focus
428 (window-frame gnus-window-frame-focus))))))))) 449 (window-frame gnus-window-frame-focus)))))))))