
(defconst wconfig-ring-max 10 "\
*Maximum length of window configuration ring before oldest elements are deleted.")

(defun wconfig-delete-pop nil "\
Replaces current window config with most recently saved config in ring.
Then deletes this new configuration from the ring." (interactive) (byte-code "? ΒΓ! Δ@!	= AA" [wconfig-ring wconfig-ring-yank-pointer error "Window configuration save ring is empty" set-window-configuration] 4))

(defun wconfig-ring-save nil "\
Saves the current window configuration onto the save ring.
Use {\\[wconfig-yank-pop]} to restore it at a later time." (interactive) (byte-code "Δ BG	V ΕΖ	S\"Β\"ΗGS!ΘΙ!" [wconfig-ring wconfig-ring-max nil wconfig-ring-yank-pointer current-window-configuration setcdr nthcdr wconfig-rotate-yank-pointer message "Window configuration saved.  Use 'wconfig-yank-pop' to restore."] 6))

(defun wconfig-rotate-yank-pointer (arg) "\
Rotates the yanking point prefix ARG elements in the window configuration save ring.
Interactively, default value of ARG = 1." (interactive "p") (byte-code "	GΔ! ΕΖ! ΗΘ
GZ\\\"	\")" [length wconfig-ring wconfig-ring-yank-pointer arg zerop error "Window configuration save ring is empty" nthcdr %] 7))

(defun wconfig-yank-pop (n) "\
Replaces current window config with prefix arg Nth prior one in save ring.
Interactively, default value of N = 1, meaning the last saved window
configuration is displayed.

The sequence of window configurations wraps around, so that after the oldest
one comes the newest one." (interactive "p") (byte-code "Β!Γ	@!" [n wconfig-ring-yank-pointer wconfig-rotate-yank-pointer set-window-configuration] 3))

(defvar wconfig-ring nil "\
List of saved window configurations.")

(defvar wconfig-ring-yank-pointer nil "\
The tail of the window configuration ring whose car is the last thing yanked.")

(run-hooks (quote wconfig-load-hook))

(provide (quote wconfig))
