aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-23 00:30:43 +0000
committerRichard M. Stallman1997-04-23 00:30:43 +0000
commit7d601aaaf6e49d6848cdea295f7501629cf57862 (patch)
tree571a40f42b509cff6186716aa579ae3ca2082eac /src/window.c
parent38c1d5e379193738b0c5856b9f6b112238bc505e (diff)
downloademacs-7d601aaaf6e49d6848cdea295f7501629cf57862.tar.gz
emacs-7d601aaaf6e49d6848cdea295f7501629cf57862.zip
(frame_allow_splitting): New variable.
(Fsplit_window): Ignore `unsplittable' if frame_allow_splitting. (syms_of_window): Set up Lisp var.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index 0ff3b0fb85c..982a7d1d96d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -119,6 +119,9 @@ Lisp_Object Vwindow_configuration_change_hook;
119 at the same screen height as previously. */ 119 at the same screen height as previously. */
120static int scroll_preserve_screen_position; 120static int scroll_preserve_screen_position;
121 121
122/* Non-nil means we can split a frame even if it is "unsplittable". */
123static int frame_override_unsplittable;
124
122#define min(a, b) ((a) < (b) ? (a) : (b)) 125#define min(a, b) ((a) < (b) ? (a) : (b))
123 126
124extern int scroll_margin; 127extern int scroll_margin;
@@ -2387,7 +2390,7 @@ and put SIZE columns in the first of the pair.")
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 ();
@@ -3767,6 +3770,12 @@ If there is only one window, it is split regardless of this value.");
3767The selected frae is the one whose configuration has changed."); 3770The selected frae is the one whose configuration has changed.");
3768 Vwindow_configuration_change_hook = Qnil; 3771 Vwindow_configuration_change_hook = Qnil;
3769 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\
3776Packages such as Ispell that work by splitting the selected frame\n\
3777can bind this, so that they will work when used in an unsplittable frame.");
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);