Function: window-divider-mode-apply

window-divider-mode-apply is a byte-compiled function defined in frame.el.gz.

Signature

(window-divider-mode-apply ENABLE)

Documentation

Apply window divider places and widths to all frames.

If ENABLE is nil, apply default places and widths. Else reset all divider widths to zero.

Source Code

;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun window-divider-mode-apply (enable)
  "Apply window divider places and widths to all frames.
If ENABLE is nil, apply default places and widths.  Else reset
all divider widths to zero."
  (let ((bottom (if (and enable
                         (memq window-divider-default-places
                               '(bottom-only t)))
                    window-divider-default-bottom-width
                  0))
        (right (if (and enable
                        (memq window-divider-default-places
                              '(right-only t)))
                   window-divider-default-right-width
                 0)))
    (modify-all-frames-parameters
     (list (cons 'bottom-divider-width bottom)
           (cons 'right-divider-width right)))
    (setq default-frame-alist
          (assq-delete-all
           'bottom-divider-width default-frame-alist))
    (setq default-frame-alist
          (assq-delete-all
           'right-divider-width default-frame-alist))
    (when (> bottom 0)
      (setq default-frame-alist
            (cons
             (cons 'bottom-divider-width bottom)
             default-frame-alist)))
    (when (> right 0)
      (setq default-frame-alist
            (cons
             (cons 'right-divider-width right)
             default-frame-alist)))))