+(defun-maybe walk-windows (proc &optional minibuf all-frames)
+ "Cycle through all visible windows, calling PROC for each one.
+PROC is called with a window as argument.
+
+Optional second arg MINIBUF t means count the minibuffer window even
+if not active. MINIBUF nil or omitted means count the minibuffer iff
+it is active. MINIBUF neither t nor nil means not to count the
+minibuffer even if it is active.
+Optional third argument ALL-FRAMES is ignored in this implementation."
+ (if (window-minibuffer-p (selected-window))
+ (setq minibuf t))
+ (let* ((walk-windows-start (selected-window))
+ (walk-windows-current walk-windows-start))
+ (unwind-protect
+ (while (progn
+ (setq walk-windows-current
+ (next-window walk-windows-current minibuf))
+ (funcall proc walk-windows-current)
+ (not (eq walk-windows-current walk-windows-start))))
+ (select-window walk-windows-start))))
+
+(defun buffer-disable-undo (&optional buffer)
+ "Make BUFFER stop keeping undo information.
+No argument or nil as argument means do this for the current buffer."
+ (buffer-flush-undo (or buffer (current-buffer))))
+
+
+;;; @@ Frame (Emacs 18 cannot make frame)
+;;;
+;; The following four are frequently used for manipulating the current frame.
+;; frame.el has `screen-width', `screen-height', `set-screen-width' and
+;; `set-screen-height' for backward compatibility and declare them as obsolete.
+(defun frame-width (&optional frame)
+ "Return number of columns available for display on FRAME.
+If FRAME is omitted, describe the currently selected frame."
+ (screen-width))
+
+(defun frame-height (&optional frame)
+ "Return number of lines available for display on FRAME.
+If FRAME is omitted, describe the currently selected frame."
+ (screen-height))
+
+(defun set-frame-width (frame cols &optional pretend)
+ "Specify that the frame FRAME has COLS columns.
+Optional third arg non-nil means that redisplay should use COLS columns
+but that the idea of the actual width of the frame should not be changed."
+ (set-screen-width cols pretend))
+
+(defun set-frame-height (frame lines &optional pretend)
+ "Specify that the frame FRAME has LINES lines.
+Optional third arg non-nil means that redisplay should use LINES lines
+but that the idea of the actual height of the frame should not be changed."
+ (set-screen-height lines pretend))
+