changeset 756:0276f8eb306f

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Fri, 10 Jul 1992 02:33:41 +0000
parents e43123226372
children 745b7fc3a3d3
files lisp/buff-menu.el lisp/frame.el src/frame.c src/xterm.c
diffstat 4 files changed, 38 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/buff-menu.el	Fri Jul 10 01:16:40 1992 +0000
+++ b/lisp/buff-menu.el	Fri Jul 10 02:33:41 1992 +0000
@@ -102,7 +102,7 @@
 	      (error "No buffer named \"%s\"" string)
 	    nil)))))
 
-(defun buffer-menu (arg)
+(defun buffer-menu (&optional arg)
   "Make a menu of buffers so you can save, delete or select them.
 With argument, show only buffers that are visiting files.
 Type ? after invocation to get help on commands available.
--- a/lisp/frame.el	Fri Jul 10 01:16:40 1992 +0000
+++ b/lisp/frame.el	Fri Jul 10 02:33:41 1992 +0000
@@ -201,7 +201,39 @@
   (let ((screen (selected-screen)))
     (if (eq (screen-visible-p screen) t)
 	(iconify-screen screen)
-      (deiconify-screen screen))))
+      (make-screen-visible screen))))
+
+
+;;;; Screen configurations
+
+(defun current-screen-configuration ()
+  "Return a list describing the positions and states of all screens.
+Each element is a list of the form (SCREEN ALIST WINDOW-CONFIG), where
+SCREEN is a screen object, ALIST is an association list specifying
+some of SCREEN's parameters, and WINDOW-CONFIG is a window
+configuration object for SCREEN."
+  (mapcar (function
+	   (lambda (screen)
+	     (list screen
+		   (screen-parameters screen)
+		   (current-window-configuration screen))))
+	  (screen-list)))
+
+(defun set-screen-configuration (configuration)
+  "Restore the screens to the state described by CONFIGURATION.
+Each screen listed in CONFIGURATION has its position, size, window
+configuration, and other parameters set as specified in CONFIGURATION."
+  (let (screens-to-delete)
+    (mapcar (function
+	     (lambda (screen)
+	       (let ((parameters (assq screen configuration)))
+		 (if parameters
+		     (progn
+		       (modify-screen-parameters screen (nth 1 parameters))
+		       (set-window-configuration (nth 2 parameters)))
+		   (setq screens-to-delete (cons screen screens-to-delete))))))
+	    (screen-list))
+    (mapcar 'delete-screen screens-to-delete)))
 
 
 ;;;; Convenience functions for dynamically changing screen parameters
--- a/src/frame.c	Fri Jul 10 01:16:40 1992 +0000
+++ b/src/frame.c	Fri Jul 10 02:33:41 1992 +0000
@@ -641,7 +641,9 @@
 
 #if 0
 /* ??? Can this be replaced with a Lisp function?
-   It is used in minibuf.c.  Can we get rid of that?  */
+   It is used in minibuf.c.  Can we get rid of that?
+   Yes.  All uses in minibuf.c are gone, and parallels to these
+   functions have been defined in screen.el.  */
 
 DEFUN ("screen-configuration", Fscreen_configuration, Sscreen_configuration,
        0, 0, 0,
@@ -872,7 +874,7 @@
 	error ("Surrogate minibuffer windows must be minibuffer windows.");
 
       if (SCREEN_HAS_MINIBUF (s) || SCREEN_MINIBUF_ONLY_P (s))
-	error ("Can't change surrogate minibuffer on screens with their own minibuffers.");
+	error ("Can't change the surrogate minibuffer of a screen with its own minibuffer.");
 
       /* Install the chosen minibuffer window, with proper buffer.  */
       s->minibuffer_window = val;
--- a/src/xterm.c	Fri Jul 10 01:16:40 1992 +0000
+++ b/src/xterm.c	Fri Jul 10 02:33:41 1992 +0000
@@ -3374,10 +3374,8 @@
   if (! SCREEN_VISIBLE_P (s))
     {
 #ifdef HAVE_X11
-#if 0
       if (! EQ (Vx_no_window_manager, Qt))
 	x_wm_set_window_state (s, NormalState);
-#endif
 
       XMapWindow (XDISPLAY s->display.x->window_desc);
       if (s->display.x->v_scrollbar != 0 || s->display.x->h_scrollbar != 0)