diff -c3 -r -X patchtext tk8.1orig/generic/tkText.c tk8.1/generic/tkText.c
*** tk8.1orig/generic/tkText.c	Wed Apr 21 15:53:28 1999
--- tk8.1/generic/tkText.c	Sat Jun 05 18:32:16 1999
***************
*** 48,53 ****
--- 48,55 ----
      {TK_CONFIG_BOOLEAN, "-exportselection", "exportSelection",
  	"ExportSelection", DEF_TEXT_EXPORT_SELECTION,
  	Tk_Offset(TkText, exportSelection), 0},
+     {TK_CONFIG_INT, "-fixedtabs", "fixedTabs", "FixedTabs",
+ 	"8", Tk_Offset(TkText, fixedTabOption), 0},
      {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
  	(char *) NULL, 0, 0},
      {TK_CONFIG_FONT, "-font", "font", "Font",
***************
*** 260,265 ****
--- 262,268 ----
      textPtr->spacing1 = 0;
      textPtr->spacing2 = 0;
      textPtr->spacing3 = 0;
+     textPtr->fixedTabOption = 8;
      textPtr->tabOptionString = NULL;
      textPtr->tabArrayPtr = NULL;
      textPtr->wrapMode = Tk_GetUid("char");
***************
*** 795,800 ****
--- 798,806 ----
      }
      if (textPtr->spacing3 < 0) {
  	textPtr->spacing3 = 0;
+     }
+     if (textPtr->fixedTabOption <= 0) {
+ 	textPtr->fixedTabOption = 8;
      }
  
      /*
diff -c3 -r -X patchtext tk8.1orig/generic/tkText.h tk8.1/generic/tkText.h
*** tk8.1orig/generic/tkText.h	Thu Apr 15 19:51:23 1999
--- tk8.1/generic/tkText.h	Sat Jun 05 18:27:56 1999
***************
*** 609,614 ****
--- 609,617 ----
  				 * vertical scrollbar when view changes. */
      int flags;			/* Miscellaneous flags;  see below for
  				 * definitions. */
+     int fixedTabOption;			/* Used to set the number of char widths for tabs 
+                                  * when the -tabs option is unset. */
+ 
  } TkText;
  
  /*
diff -c3 -r -X patchtext tk8.1orig/generic/tkTextDisp.c tk8.1/generic/tkTextDisp.c
*** tk8.1orig/generic/tkTextDisp.c	Wed Apr 21 15:53:28 1999
--- tk8.1/generic/tkTextDisp.c	Sat Jun 05 18:33:02 1999
***************
*** 341,347 ****
  			    TkTextIndex *srcPtr, int distance,
  			    TkTextIndex *dstPtr));
  static int		NextTabStop _ANSI_ARGS_((Tk_Font tkfont, int x,
! 			    int tabOrigin));
  static void		UpdateDisplayInfo _ANSI_ARGS_((TkText *textPtr));
  static void		ScrollByLines _ANSI_ARGS_((TkText *textPtr,
  			    int offset));
--- 341,347 ----
  			    TkTextIndex *srcPtr, int distance,
  			    TkTextIndex *dstPtr));
  static int		NextTabStop _ANSI_ARGS_((Tk_Font tkfont, int x,
! 			    int tabOrigin, TkText *textPtr));
  static void		UpdateDisplayInfo _ANSI_ARGS_((TkText *textPtr));
  static void		ScrollByLines _ANSI_ARGS_((TkText *textPtr,
  			    int offset));
***************
*** 4664,4670 ****
  	 * interpretation of tabs.
  	 */
  
! 	desired = NextTabStop(textPtr->tkfont, x, 0);
  	goto update;
      }
  
--- 4664,4670 ----
  	 * interpretation of tabs.
  	 */
  
! 	desired = NextTabStop(textPtr->tkfont, x, 0, textPtr);
  	goto update;
      }
  
***************
*** 4822,4828 ****
      TkTextTabAlign alignment;
  
      if ((tabArrayPtr == NULL) || (tabArrayPtr->numTabs == 0)) {
! 	tabX = NextTabStop(textPtr->tkfont, x, 0);
  	return tabX - x;
      }
      if (index < tabArrayPtr->numTabs) {
--- 4822,4828 ----
      TkTextTabAlign alignment;
  
      if ((tabArrayPtr == NULL) || (tabArrayPtr->numTabs == 0)) {
! 	tabX = NextTabStop(textPtr->tkfont, x, 0, textPtr);
  	return tabX - x;
      }
      if (index < tabArrayPtr->numTabs) {
***************
*** 4904,4910 ****
   */
  
  static int
! NextTabStop(tkfont, x, tabOrigin)
      Tk_Font tkfont;		/* Font in which chunk that contains tab
  				 * stop will be drawn. */
      int x;			/* X-position in pixels where last
--- 4904,4910 ----
   */
  
  static int
! NextTabStop(tkfont, x, tabOrigin, textPtr)
      Tk_Font tkfont;		/* Font in which chunk that contains tab
  				 * stop will be drawn. */
      int x;			/* X-position in pixels where last
***************
*** 4912,4921 ****
  				 * occurs somewhere after this location. */
      int tabOrigin;		/* The origin for tab stops.  May be
  				 * non-zero if text has been scrolled. */
  {
      int tabWidth, rem;
      
!     tabWidth = Tk_TextWidth(tkfont, "0", 1) * 8;
      if (tabWidth == 0) {
  	tabWidth = 1;
      }
--- 4912,4923 ----
  				 * occurs somewhere after this location. */
      int tabOrigin;		/* The origin for tab stops.  May be
  				 * non-zero if text has been scrolled. */
+     TkText *textPtr;			/* Information about the text widget as
+ 				 * a whole. */
  {
      int tabWidth, rem;
      
!     tabWidth = Tk_TextWidth(tkfont, "0", 1) * textPtr->fixedTabOption;
      if (tabWidth == 0) {
  	tabWidth = 1;
      }
