comparison src/window.c @ 17540:eb82c4de9dea

(frame_allow_splitting): New variable. (Fsplit_window): Ignore `unsplittable' if frame_allow_splitting. (syms_of_window): Set up Lisp var.
author Richard M. Stallman <rms@gnu.org>
date Wed, 23 Apr 1997 00:30:43 +0000
parents fc2ec9ced22f
children 0b6db83d4663
comparison
equal deleted inserted replaced
17539:f5fce4963979 17540:eb82c4de9dea
116 Lisp_Object Vwindow_configuration_change_hook; 116 Lisp_Object Vwindow_configuration_change_hook;
117 117
118 /* Nonzero means scroll commands try to put point 118 /* Nonzero means scroll commands try to put point
119 at the same screen height as previously. */ 119 at the same screen height as previously. */
120 static int scroll_preserve_screen_position; 120 static int scroll_preserve_screen_position;
121
122 /* Non-nil means we can split a frame even if it is "unsplittable". */
123 static int frame_override_unsplittable;
121 124
122 #define min(a, b) ((a) < (b) ? (a) : (b)) 125 #define min(a, b) ((a) < (b) ? (a) : (b))
123 126
124 extern int scroll_margin; 127 extern int scroll_margin;
125 128
2385 size_int = XINT (size); 2388 size_int = XINT (size);
2386 } 2389 }
2387 2390
2388 if (MINI_WINDOW_P (o)) 2391 if (MINI_WINDOW_P (o))
2389 error ("Attempt to split minibuffer window"); 2392 error ("Attempt to split minibuffer window");
2390 else if (FRAME_NO_SPLIT_P (fo)) 2393 else if (FRAME_NO_SPLIT_P (fo) && ! frame_override_unsplittable)
2391 error ("Attempt to split unsplittable frame"); 2394 error ("Attempt to split unsplittable frame");
2392 2395
2393 check_min_window_sizes (); 2396 check_min_window_sizes ();
2394 2397
2395 if (NILP (horflag)) 2398 if (NILP (horflag))
3764 DEFVAR_LISP ("window-configuration-change-hook", 3767 DEFVAR_LISP ("window-configuration-change-hook",
3765 &Vwindow_configuration_change_hook, 3768 &Vwindow_configuration_change_hook,
3766 "Functions to call when window configuration changes.\n\ 3769 "Functions to call when window configuration changes.\n\
3767 The selected frae is the one whose configuration has changed."); 3770 The selected frae is the one whose configuration has changed.");
3768 Vwindow_configuration_change_hook = Qnil; 3771 Vwindow_configuration_change_hook = Qnil;
3772
3773 DEFVAR_BOOL ("frame-override-unsplittable", &frame_override_unsplittable,
3774 "Non-nil means allow splitting an `unsplittable' frame.\n\
3775 \(That means, a frame whise `unsplittable' parameter is non-nil.)\n\
3776 Packages such as Ispell that work by splitting the selected frame\n\
3777 can bind this, so that they will work when used in an unsplittable frame.");
3769 3778
3770 defsubr (&Sselected_window); 3779 defsubr (&Sselected_window);
3771 defsubr (&Sminibuffer_window); 3780 defsubr (&Sminibuffer_window);
3772 defsubr (&Swindow_minibuffer_p); 3781 defsubr (&Swindow_minibuffer_p);
3773 defsubr (&Swindowp); 3782 defsubr (&Swindowp);