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 [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/window.c [lexbind]
Date: Wed, 15 Oct 2003 02:54:58 -0400

Index: emacs/src/window.c
diff -c emacs/src/window.c:1.417.2.2 emacs/src/window.c:1.417.2.3
*** emacs/src/window.c:1.417.2.2        Tue Oct 14 19:22:48 2003
--- emacs/src/window.c  Wed Oct 15 02:54:54 2003
***************
*** 5856,5879 ****
  {
    struct window *w = decode_window (window);
  
    if (!NILP (left))
!     CHECK_NUMBER (left);
!   if (!NILP (right))
!     CHECK_NUMBER (right);
  
!   /* Check widths < 0 and translate a zero width to nil.
!      Margins that are too wide have to be checked elsewhere.  */
!   if ((INTEGERP (left) && XINT (left) < 0)
!       || (FLOATP (left) && XFLOAT_DATA (left) <= 0))
!      XSETFASTINT (left, 0);
!   if (INTEGERP (left) && XFASTINT (left) == 0)
!     left = Qnil;
! 
!   if ((INTEGERP (right) && XINT (right) < 0)
!       || (FLOATP (right) && XFLOAT_DATA (right) <= 0))
!     XSETFASTINT (right, 0);
!   if (INTEGERP (right) && XFASTINT (right) == 0)
!     right = Qnil;
  
    if (!EQ (w->left_margin_cols, left)
        || !EQ (w->right_margin_cols, right))
--- 5856,5877 ----
  {
    struct window *w = decode_window (window);
  
+   /* Translate negative or zero widths to nil.
+      Margins that are too wide have to be checked elsewhere.  */
+ 
    if (!NILP (left))
!     {
!       CHECK_NUMBER (left);
!       if (XINT (left) <= 0)
!       left = Qnil;
!     }
  
!   if (!NILP (right))
!     {
!       CHECK_NUMBER (right);
!       if (XINT (right) <= 0)
!       right = Qnil;
!     }
  
    if (!EQ (w->left_margin_cols, left)
        || !EQ (w->right_margin_cols, right))
***************
*** 5913,5928 ****
  
  DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes,
         2, 4, 0,
!        doc: /* Set width of fringes of window WINDOW.
  
! If window is nil, set fringes of the currently selected window.
! Second parameter LEFT-WIDTH specifies the number of pixels to reserve
! for the left fringe.  Third parameter RIGHT-WIDTH does the same for
! the right fringe.  Fourth parameter OUTSIDE-MARGINS non-nil specifies
! that fringes are drawn outside of the display margins; by default, fringes
! are drawn between display marginal areas and the text area.
! A nil width parameter means to use the frame's default fringe width;
! default fringe widths can be set with the command `set-fringe-style'. */)
       (window, left, right, outside_margins)
       Lisp_Object window, left, right, outside_margins;
  {
--- 5911,5930 ----
  
  DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes,
         2, 4, 0,
!        doc: /* Set the fringe widths of window WINDOW.
! 
! If WINDOW is nil, set the fringe widths of the currently selected
! window.
  
! The second parameter LEFT-WIDTH specifies the number of pixels to
! reserve for the left fringe.  The third parameter RIGHT-WIDTH
! specifies the right fringe width.  If a fringe width parameter is nil,
! that means to use the frame's default fringe width.  Default fringe
! widths can be set with the command `set-fringe-style'.
! 
! If the fourth parameter OUTSIDE-MARGINS is non-nil, draw the fringes
! outside of the display margins.  By default, fringes are drawn between
! display marginal areas and the text area.  */)
       (window, left, right, outside_margins)
       Lisp_Object window, left, right, outside_margins;
  {




reply via email to

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