emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/window.c,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/src/window.c,v
Date: Sat, 29 Mar 2008 23:04:56 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     08/03/29 23:04:56

Index: window.c
===================================================================
RCS file: /sources/emacs/emacs/src/window.c,v
retrieving revision 1.604
retrieving revision 1.605
diff -u -b -r1.604 -r1.605
--- window.c    19 Mar 2008 15:18:29 -0000      1.604
+++ window.c    29 Mar 2008 23:04:56 -0000      1.605
@@ -3848,6 +3848,12 @@
       else
        window = Fget_largest_window (frames, Qt);
 
+      if (!NILP (Vsplit_window_preferred_function))
+       tem = call1 (Vsplit_window_preferred_function, window);
+
+      if (!NILP (tem))
+       window = tem;
+      else
       /* If the largest window is tall enough, full-width, and either eligible
         for splitting or the only window, split it.  */
       if (!NILP (window)
@@ -3857,7 +3863,7 @@
                   || (NILP (XWINDOW (window)->parent)))
          && (window_height (window)
              >= (2 * window_min_size_2 (XWINDOW (window), 0))))
-       window = call1 (Vsplit_window_preferred_function, window);
+         window = Fsplit_window (window, Qnil, Qnil);
       else
        {
          Lisp_Object upper, other;
@@ -3872,7 +3878,7 @@
                       || (NILP (XWINDOW (window)->parent)))
                   && (window_height (window)
                       >= (2 * window_min_size_2 (XWINDOW (window), 0))))
-           window = call1 (Vsplit_window_preferred_function, window);
+           window = Fsplit_window (window, Qnil, Qnil);
          else
            window = Fget_lru_window (frames, Qnil);
          /* If Fget_lru_window returned nil, try other approaches.  */
@@ -7596,9 +7602,12 @@
               doc: /* Function to use to split a window.
 This is used by `display-buffer' to allow the user to choose whether
 to split windows horizontally or vertically or some mix of the two.
+When this variable is nil, `display-buffer' splits windows vertically.
+Otherwise, `display-buffer' calls this function to split a window.
 It is called with a window as single argument and should split it in two
-and return the new window.  */);
-  Vsplit_window_preferred_function = intern ("split-window");
+and return the new window, or return an appropriate existing window
+if splitting is not eligible.  */);
+  Vsplit_window_preferred_function = Qnil;
 
   DEFVAR_INT ("window-min-height", &window_min_height,
              doc: /* *Delete any window less than this tall (including its 
mode line).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]