public static float makeTokenListStartAt(Token tokenList, int pos,
									TabExpander e,
									final RSyntaxTextArea textArea,
									float x0) {

		Token t = tokenList;

		// Loop through the token list until you find the one that contains
		// pos.  Remember the cumulative width of all of these tokens.
		while (t!=null && t.isPaintable() && !t.containsPosition(pos)) {
			x0 += t.getWidth(textArea, e, x0);
			t = t.getNextToken();
		}

		// Make the token that contains pos start at pos.
		if (t!=null && t.isPaintable() && t.offset!=pos) {
			// Number of chars between p0 and token start.
			int difference = pos - t.offset;
			x0 += t.getWidthUpTo(t.textCount-difference+1, textArea, e, x0);
			t.makeStartAt(pos);
		}

		// Make the passed-in token list point to the proper place.
		// t can be null, for example, if line ends with unended MLC.
		if (t!=null && t.isPaintable())
			tokenList.copyFrom(t);
		else
			tokenList = null;
		t = null;

		// Return the x-offset (in pixels) of the newly-modified t.
		return x0;

	}