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


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/window.c
Date: Tue, 01 Nov 2005 03:01:41 -0500

Index: emacs/src/window.c
diff -c emacs/src/window.c:1.523 emacs/src/window.c:1.524
*** emacs/src/window.c:1.523    Thu Oct 20 15:04:05 2005
--- emacs/src/window.c  Tue Nov  1 08:01:40 2005
***************
*** 2000,2006 ****
            if (!NILP (obj) && !WINDOW_FULL_WIDTH_P (w))
              break;
            /* Ignore dedicated windows and minibuffers.  */
!           if (MINI_WINDOW_P (w) || EQ (w->dedicated, Qt))
              break;
            if (NILP (best_window)
                || (XFASTINT (XWINDOW (best_window)->use_time)
--- 2000,2006 ----
            if (!NILP (obj) && !WINDOW_FULL_WIDTH_P (w))
              break;
            /* Ignore dedicated windows and minibuffers.  */
!           if (MINI_WINDOW_P (w) || (!mini && EQ (w->dedicated, Qt)))
              break;
            if (NILP (best_window)
                || (XFASTINT (XWINDOW (best_window)->use_time)
***************
*** 2053,2059 ****
          case GET_LARGEST_WINDOW:
            {
              /* Ignore dedicated windows and minibuffers.  */
!             if (MINI_WINDOW_P (w) || EQ (w->dedicated, Qt))
                break;
  
              if (NILP (best_window))
--- 2053,2059 ----
          case GET_LARGEST_WINDOW:
            {
              /* Ignore dedicated windows and minibuffers.  */
!             if (MINI_WINDOW_P (w) || (!mini && EQ (w->dedicated, Qt)))
                break;
  
              if (NILP (best_window))
***************
*** 2147,2189 ****
    window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt);
  }
  
! DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 1, 0,
         doc: /* Return the window least recently selected or used for display.
  Return a full-width window if possible.
  A minibuffer window is never a candidate.
! A dedicated window is never a candidate, so if all windows are dedicated,
! the value is nil.
  If optional argument FRAME is `visible', search all visible frames.
  If FRAME is 0, search all visible and iconified frames.
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
!      (frame)
!      Lisp_Object frame;
  {
    register Lisp_Object w;
    /* First try for a window that is full-width */
!   w = window_loop (GET_LRU_WINDOW, Qt, 0, frame);
    if (!NILP (w) && !EQ (w, selected_window))
      return w;
    /* If none of them, try the rest */
!   return window_loop (GET_LRU_WINDOW, Qnil, 0, frame);
  }
  
! DEFUN ("get-largest-window", Fget_largest_window, Sget_largest_window, 0, 1, 
0,
         doc: /* Return the largest window in area.
  A minibuffer window is never a candidate.
! A dedicated window is never a candidate, so if all windows are dedicated,
! the value is nil.
  If optional argument FRAME is `visible', search all visible frames.
  If FRAME is 0, search all visible and iconified frames.
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
!      (frame)
!      Lisp_Object frame;
  {
!   return window_loop (GET_LARGEST_WINDOW, Qnil, 0,
                      frame);
  }
  
--- 2147,2189 ----
    window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt);
  }
  
! DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 2, 0,
         doc: /* Return the window least recently selected or used for display.
  Return a full-width window if possible.
  A minibuffer window is never a candidate.
! A dedicated window is never a candidate, unless DEDICATED is non-nil,
!   so if all windows are dedicated, the value is nil.
  If optional argument FRAME is `visible', search all visible frames.
  If FRAME is 0, search all visible and iconified frames.
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
!   (frame, dedicated)
!      Lisp_Object frame, dedicated;
  {
    register Lisp_Object w;
    /* First try for a window that is full-width */
!   w = window_loop (GET_LRU_WINDOW, Qt, !NILP (dedicated), frame);
    if (!NILP (w) && !EQ (w, selected_window))
      return w;
    /* If none of them, try the rest */
!   return window_loop (GET_LRU_WINDOW, Qnil, !NILP (dedicated), frame);
  }
  
! DEFUN ("get-largest-window", Fget_largest_window, Sget_largest_window, 0, 2, 
0,
         doc: /* Return the largest window in area.
  A minibuffer window is never a candidate.
! A dedicated window is never a candidate unless DEDICATED is non-nil,
!   so if all windows are dedicated, the value is nil.
  If optional argument FRAME is `visible', search all visible frames.
  If FRAME is 0, search all visible and iconified frames.
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
!     (frame, dedicated)
!      Lisp_Object frame, dedicated;
  {
!   return window_loop (GET_LARGEST_WINDOW, Qnil, !NILP (dedicated),
                      frame);
  }
  
***************
*** 3503,3517 ****
        if (FRAME_NO_SPLIT_P (NILP (frames) ? f : last_nonminibuf_frame))
        {
          /* Try visible frames first.  */
!         window = Fget_largest_window (Qvisible);
          /* If that didn't work, try iconified frames.  */
          if (NILP (window))
!           window = Fget_largest_window (make_number (0));
          if (NILP (window))
!           window = Fget_largest_window (Qt);
        }
        else
!       window = Fget_largest_window (frames);
  
        /* If we got a tall enough full-width window that can be split,
         split it.  */
--- 3503,3519 ----
        if (FRAME_NO_SPLIT_P (NILP (frames) ? f : last_nonminibuf_frame))
        {
          /* Try visible frames first.  */
!         window = Fget_largest_window (Qvisible, Qt);
          /* If that didn't work, try iconified frames.  */
          if (NILP (window))
!           window = Fget_largest_window (make_number (0), Qt);
! #if 0     /* Don't try windows on other displays.  */
          if (NILP (window))
!           window = Fget_largest_window (Qt, Qt);
! #endif
        }
        else
!       window = Fget_largest_window (frames, Qt);
  
        /* If we got a tall enough full-width window that can be split,
         split it.  */
***************
*** 3524,3530 ****
        {
          Lisp_Object upper, lower, other;
  
!         window = Fget_lru_window (frames);
          /* If the LRU window is selected, and big enough,
             and can be split, split it.  */
          if (!NILP (window)
--- 3526,3532 ----
        {
          Lisp_Object upper, lower, other;
  
!         window = Fget_lru_window (frames, Qt);
          /* If the LRU window is selected, and big enough,
             and can be split, split it.  */
          if (!NILP (window)
***************
*** 3539,3555 ****
          if (NILP (window))
            window = Fget_buffer_window (buffer, Qvisible);
          if (NILP (window))
!           window = Fget_largest_window (Qvisible);
          /* If that didn't work, try iconified frames.  */
          if (NILP (window))
            window = Fget_buffer_window (buffer, make_number (0));
          if (NILP (window))
!           window = Fget_largest_window (make_number (0));
!         /* Try invisible frames.  */
          if (NILP (window))
            window = Fget_buffer_window (buffer, Qt);
          if (NILP (window))
!           window = Fget_largest_window (Qt);
          /* As a last resort, make a new frame.  */
          if (NILP (window))
            window = Fframe_selected_window (call0 (Vpop_up_frame_function));
--- 3541,3559 ----
          if (NILP (window))
            window = Fget_buffer_window (buffer, Qvisible);
          if (NILP (window))
!           window = Fget_largest_window (Qvisible, Qnil);
          /* If that didn't work, try iconified frames.  */
          if (NILP (window))
            window = Fget_buffer_window (buffer, make_number (0));
          if (NILP (window))
!           window = Fget_largest_window (make_number (0), Qnil);
! 
! #if 0     /* Don't try frames on other displays.  */
          if (NILP (window))
            window = Fget_buffer_window (buffer, Qt);
          if (NILP (window))
!           window = Fget_largest_window (Qt, Qnil);
! #endif
          /* As a last resort, make a new frame.  */
          if (NILP (window))
            window = Fframe_selected_window (call0 (Vpop_up_frame_function));
***************
*** 3576,3582 ****
        }
      }
    else
!     window = Fget_lru_window (Qnil);
  
    Fset_window_buffer (window, buffer, Qnil);
    return display_buffer_1 (window);
--- 3580,3586 ----
        }
      }
    else
!     window = Fget_lru_window (Qnil, Qnil);
  
    Fset_window_buffer (window, buffer, Qnil);
    return display_buffer_1 (window);




reply via email to

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