comparison lisp/window.el @ 820:cd6b1e1da3fc

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sun, 19 Jul 1992 05:05:19 +0000
parents c2dbf1fe0506
children 2cdce064065f
comparison
equal deleted inserted replaced
819:5bbabfcef929 820:cd6b1e1da3fc
108 (defun shrink-window-horizontally (arg) 108 (defun shrink-window-horizontally (arg)
109 "Make current window ARG columns narrower." 109 "Make current window ARG columns narrower."
110 (interactive "p") 110 (interactive "p")
111 (shrink-window arg t)) 111 (shrink-window arg t))
112 112
113 (defun window-config-to-register (name)
114 "Save the current window configuration in register REG (a letter).
115 It can be later retrieved using \\[M-x register-to-window-config]."
116 (interactive "cSave window configuration in register: ")
117 (set-register name (current-window-configuration)))
118
119 (defun register-to-window-config (name)
120 "Restore (make current) the window configuration in register REG (a letter).
121 Use with a register previously set with \\[window-config-to-register]."
122 (interactive "cRestore window configuration from register: ")
123 (set-window-configuration (get-register name)))
124
125 (define-key ctl-x-map "2" 'split-window-vertically) 113 (define-key ctl-x-map "2" 'split-window-vertically)
126 (define-key ctl-x-map "3" 'split-window-horizontally) 114 (define-key ctl-x-map "3" 'split-window-horizontally)
127 (define-key ctl-x-map "6" 'window-config-to-register)
128 (define-key ctl-x-map "7" 'register-to-window-config)
129 (define-key ctl-x-map "}" 'enlarge-window-horizontally) 115 (define-key ctl-x-map "}" 'enlarge-window-horizontally)
130 (define-key ctl-x-map "{" 'shrink-window-horizontally) 116 (define-key ctl-x-map "{" 'shrink-window-horizontally)
131 117
132 ;;; windows.el ends here 118 ;;; windows.el ends here