Function: ediff-toggle-multiframe

ediff-toggle-multiframe is an autoloaded, interactive and byte-compiled function defined in ediff-util.el.gz.

Signature

(ediff-toggle-multiframe)

Documentation

Switch from multiframe display to single-frame display and back.

To change the default, set the variable ediff-window-setup-function, which see.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/ediff-util.el.gz
;;;###autoload
(defun ediff-toggle-multiframe ()
  "Switch from multiframe display to single-frame display and back.
To change the default, set the variable `ediff-window-setup-function',
which see."
  (interactive)
  (let (window-setup-func)
    (or (display-graphic-p)
	(user-error "Emacs is not running as a window application"))

  (cond ((eq ediff-window-setup-function #'ediff-setup-windows-multiframe)
	 (setq ediff-multiframe nil)
	 (setq window-setup-func #'ediff-setup-windows-plain)
         (message "ediff is now in `plain' mode"))
	((eq ediff-window-setup-function #'ediff-setup-windows-plain)
	 (if (and (ediff-buffer-live-p ediff-control-buffer)
		  (window-live-p ediff-control-window))
	     (set-window-dedicated-p ediff-control-window nil))
	 (setq ediff-multiframe t)
	 (setq window-setup-func #'ediff-setup-windows-multiframe)
         (message "ediff is now in `multiframe' mode"))
	(t
	 (if (and (ediff-buffer-live-p ediff-control-buffer)
		  (window-live-p ediff-control-window))
	     (set-window-dedicated-p ediff-control-window nil))
	 (setq ediff-multiframe t)
	 (setq window-setup-func #'ediff-setup-windows-multiframe))
         (message "ediff is now in `multiframe' mode"))

  ;; change default
  (setq-default ediff-window-setup-function window-setup-func)
  ;; change in all active ediff sessions
  (mapc (lambda(buf) (ediff-with-current-buffer buf
		       (setq ediff-window-setup-function window-setup-func
			     ediff-window-B nil)))
	ediff-session-registry)
  (if (ediff-in-control-buffer-p)
      (progn
	(set-window-dedicated-p (selected-window) nil)
	(ediff-recenter 'no-rehighlight)))))