help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expand/unexpand window possible?


From: Andy Stewart
Subject: Re: Expand/unexpand window possible?
Date: Thu, 12 Mar 2009 22:38:45 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Lars Haugseth <address@hidden> writes:

> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
(defvar toggle-one-window-window-configuration nil
  "The window configuration use for `toggle-one-window'.")

(defun toggle-one-window ()
  "Toggle between window layout and one window."
  (interactive)
  (if (one-window-p t)
      (if toggle-one-window-window-configuration
          (progn
            (set-window-configuration toggle-one-window-window-configuration)
            (setq toggle-one-window-window-configuration nil))
        (message "No other windows exist."))
    (setq toggle-one-window-window-configuration (current-window-configuration))
    (delete-other-windows)))

Above the code that i use.

  -- Andy





reply via email to

[Prev in Thread] Current Thread [Next in Thread]