Karsten Hopp 4e368c
To: vim_dev@googlegroups.com
Karsten Hopp 4e368c
Subject: Patch 7.3.869
Karsten Hopp 4e368c
Fcc: outbox
Karsten Hopp 4e368c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4e368c
Mime-Version: 1.0
Karsten Hopp 4e368c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 4e368c
Content-Transfer-Encoding: 8bit
Karsten Hopp 4e368c
------------
Karsten Hopp 4e368c
Karsten Hopp 4e368c
Patch 7.3.869
Karsten Hopp 4e368c
Problem:    bufwinnr() matches buffers in other tabs.
Karsten Hopp 4e368c
Solution:   For bufwinnr() and ? only match buffers in the current tab.
Karsten Hopp 4e368c
	    (Alexey Radkov)
Karsten Hopp 4e368c
Files:	    src/buffer.c, src/diff.c, src/eval.c, src/ex_docmd.c,
Karsten Hopp 4e368c
	    src/if_perl.xs, src/proto/buffer.pro
Karsten Hopp 4e368c
Karsten Hopp 4e368c
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/buffer.c	2013-02-17 15:45:34.000000000 +0100
Karsten Hopp 4e368c
--- src/buffer.c	2013-03-19 14:19:17.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 928,934 ****
Karsten Hopp 4e368c
  		if (!VIM_ISDIGIT(*arg))
Karsten Hopp 4e368c
  		{
Karsten Hopp 4e368c
  		    p = skiptowhite_esc(arg);
Karsten Hopp 4e368c
! 		    bnr = buflist_findpat(arg, p, command == DOBUF_WIPE, FALSE);
Karsten Hopp 4e368c
  		    if (bnr < 0)	    /* failed */
Karsten Hopp 4e368c
  			break;
Karsten Hopp 4e368c
  		    arg = p;
Karsten Hopp 4e368c
--- 928,935 ----
Karsten Hopp 4e368c
  		if (!VIM_ISDIGIT(*arg))
Karsten Hopp 4e368c
  		{
Karsten Hopp 4e368c
  		    p = skiptowhite_esc(arg);
Karsten Hopp 4e368c
! 		    bnr = buflist_findpat(arg, p, command == DOBUF_WIPE,
Karsten Hopp 4e368c
! 								FALSE, FALSE);
Karsten Hopp 4e368c
  		    if (bnr < 0)	    /* failed */
Karsten Hopp 4e368c
  			break;
Karsten Hopp 4e368c
  		    arg = p;
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 2129,2146 ****
Karsten Hopp 4e368c
      return NULL;
Karsten Hopp 4e368c
  }
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
! #if defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) || defined(PROTO)
Karsten Hopp 4e368c
  /*
Karsten Hopp 4e368c
   * Find file in buffer list by a regexp pattern.
Karsten Hopp 4e368c
   * Return fnum of the found buffer.
Karsten Hopp 4e368c
   * Return < 0 for error.
Karsten Hopp 4e368c
   */
Karsten Hopp 4e368c
      int
Karsten Hopp 4e368c
! buflist_findpat(pattern, pattern_end, unlisted, diffmode)
Karsten Hopp 4e368c
      char_u	*pattern;
Karsten Hopp 4e368c
      char_u	*pattern_end;	/* pointer to first char after pattern */
Karsten Hopp 4e368c
      int		unlisted;	/* find unlisted buffers */
Karsten Hopp 4e368c
      int		diffmode UNUSED; /* find diff-mode buffers only */
Karsten Hopp 4e368c
  {
Karsten Hopp 4e368c
      buf_T	*buf;
Karsten Hopp 4e368c
      regprog_T	*prog;
Karsten Hopp 4e368c
--- 2130,2149 ----
Karsten Hopp 4e368c
      return NULL;
Karsten Hopp 4e368c
  }
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
! #if defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) \
Karsten Hopp 4e368c
! 	|| defined(PROTO)
Karsten Hopp 4e368c
  /*
Karsten Hopp 4e368c
   * Find file in buffer list by a regexp pattern.
Karsten Hopp 4e368c
   * Return fnum of the found buffer.
Karsten Hopp 4e368c
   * Return < 0 for error.
Karsten Hopp 4e368c
   */
Karsten Hopp 4e368c
      int
Karsten Hopp 4e368c
! buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only)
Karsten Hopp 4e368c
      char_u	*pattern;
Karsten Hopp 4e368c
      char_u	*pattern_end;	/* pointer to first char after pattern */
Karsten Hopp 4e368c
      int		unlisted;	/* find unlisted buffers */
Karsten Hopp 4e368c
      int		diffmode UNUSED; /* find diff-mode buffers only */
Karsten Hopp 4e368c
+     int		curtab_only;	/* find buffers in current tab only */
Karsten Hopp 4e368c
  {
Karsten Hopp 4e368c
      buf_T	*buf;
Karsten Hopp 4e368c
      regprog_T	*prog;
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 2208,2213 ****
Karsten Hopp 4e368c
--- 2211,2233 ----
Karsten Hopp 4e368c
  #endif
Karsten Hopp 4e368c
  			    && buflist_match(prog, buf) != NULL)
Karsten Hopp 4e368c
  		    {
Karsten Hopp 4e368c
+ 			if (curtab_only)
Karsten Hopp 4e368c
+ 			{
Karsten Hopp 4e368c
+ 			    /* Ignore the match if the buffer is not open in
Karsten Hopp 4e368c
+ 			     * the current tab. */
Karsten Hopp 4e368c
+ #ifdef FEAT_WINDOWS
Karsten Hopp 4e368c
+ 			    win_T	*wp;
Karsten Hopp 4e368c
+ 
Karsten Hopp 4e368c
+ 			    for (wp = firstwin; wp != NULL; wp = wp->w_next)
Karsten Hopp 4e368c
+ 				if (wp->w_buffer == buf)
Karsten Hopp 4e368c
+ 				    break;
Karsten Hopp 4e368c
+ 			    if (wp == NULL)
Karsten Hopp 4e368c
+ 				continue;
Karsten Hopp 4e368c
+ #else
Karsten Hopp 4e368c
+ 			    if (curwin->w_buffer != buf)
Karsten Hopp 4e368c
+ 				continue;
Karsten Hopp 4e368c
+ #endif
Karsten Hopp 4e368c
+ 			}
Karsten Hopp 4e368c
  			if (match >= 0)		/* already found a match */
Karsten Hopp 4e368c
  			{
Karsten Hopp 4e368c
  			    match = -2;
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/diff.c	2012-10-21 22:18:17.000000000 +0200
Karsten Hopp 4e368c
--- src/diff.c	2013-03-19 14:11:40.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 2152,2158 ****
Karsten Hopp 4e368c
  	    i = atol((char *)eap->arg);
Karsten Hopp 4e368c
  	else
Karsten Hopp 4e368c
  	{
Karsten Hopp 4e368c
! 	    i = buflist_findpat(eap->arg, p, FALSE, TRUE);
Karsten Hopp 4e368c
  	    if (i < 0)
Karsten Hopp 4e368c
  		return;		/* error message already given */
Karsten Hopp 4e368c
  	}
Karsten Hopp 4e368c
--- 2152,2158 ----
Karsten Hopp 4e368c
  	    i = atol((char *)eap->arg);
Karsten Hopp 4e368c
  	else
Karsten Hopp 4e368c
  	{
Karsten Hopp 4e368c
! 	    i = buflist_findpat(eap->arg, p, FALSE, TRUE, FALSE);
Karsten Hopp 4e368c
  	    if (i < 0)
Karsten Hopp 4e368c
  		return;		/* error message already given */
Karsten Hopp 4e368c
  	}
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/eval.c	2013-03-16 14:20:45.000000000 +0100
Karsten Hopp 4e368c
--- src/eval.c	2013-03-19 14:11:40.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 9019,9032 ****
Karsten Hopp 4e368c
      rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL);
Karsten Hopp 4e368c
  }
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
! static buf_T *get_buf_tv __ARGS((typval_T *tv));
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
  /*
Karsten Hopp 4e368c
   * Get buffer by number or pattern.
Karsten Hopp 4e368c
   */
Karsten Hopp 4e368c
      static buf_T *
Karsten Hopp 4e368c
! get_buf_tv(tv)
Karsten Hopp 4e368c
      typval_T	*tv;
Karsten Hopp 4e368c
  {
Karsten Hopp 4e368c
      char_u	*name = tv->vval.v_string;
Karsten Hopp 4e368c
      int		save_magic;
Karsten Hopp 4e368c
--- 9019,9033 ----
Karsten Hopp 4e368c
      rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL);
Karsten Hopp 4e368c
  }
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
! static buf_T *get_buf_tv __ARGS((typval_T *tv, int curtab_only));
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
  /*
Karsten Hopp 4e368c
   * Get buffer by number or pattern.
Karsten Hopp 4e368c
   */
Karsten Hopp 4e368c
      static buf_T *
Karsten Hopp 4e368c
! get_buf_tv(tv, curtab_only)
Karsten Hopp 4e368c
      typval_T	*tv;
Karsten Hopp 4e368c
+     int		curtab_only;
Karsten Hopp 4e368c
  {
Karsten Hopp 4e368c
      char_u	*name = tv->vval.v_string;
Karsten Hopp 4e368c
      int		save_magic;
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 9049,9055 ****
Karsten Hopp 4e368c
      p_cpo = (char_u *)"";
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      buf = buflist_findnr(buflist_findpat(name, name + STRLEN(name),
Karsten Hopp 4e368c
! 								TRUE, FALSE));
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      p_magic = save_magic;
Karsten Hopp 4e368c
      p_cpo = save_cpo;
Karsten Hopp 4e368c
--- 9050,9056 ----
Karsten Hopp 4e368c
      p_cpo = (char_u *)"";
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      buf = buflist_findnr(buflist_findpat(name, name + STRLEN(name),
Karsten Hopp 4e368c
! 						    TRUE, FALSE, curtab_only));
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      p_magic = save_magic;
Karsten Hopp 4e368c
      p_cpo = save_cpo;
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 9073,9079 ****
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0]);
Karsten Hopp 4e368c
      rettv->v_type = VAR_STRING;
Karsten Hopp 4e368c
      if (buf != NULL && buf->b_fname != NULL)
Karsten Hopp 4e368c
  	rettv->vval.v_string = vim_strsave(buf->b_fname);
Karsten Hopp 4e368c
--- 9074,9080 ----
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0], FALSE);
Karsten Hopp 4e368c
      rettv->v_type = VAR_STRING;
Karsten Hopp 4e368c
      if (buf != NULL && buf->b_fname != NULL)
Karsten Hopp 4e368c
  	rettv->vval.v_string = vim_strsave(buf->b_fname);
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 9096,9102 ****
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0]);
Karsten Hopp 4e368c
      --emsg_off;
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      /* If the buffer isn't found and the second argument is not zero create a
Karsten Hopp 4e368c
--- 9097,9103 ----
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0], FALSE);
Karsten Hopp 4e368c
      --emsg_off;
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      /* If the buffer isn't found and the second argument is not zero create a
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 9131,9137 ****
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0]);
Karsten Hopp 4e368c
  #ifdef FEAT_WINDOWS
Karsten Hopp 4e368c
      for (wp = firstwin; wp; wp = wp->w_next)
Karsten Hopp 4e368c
      {
Karsten Hopp 4e368c
--- 9132,9138 ----
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0], TRUE);
Karsten Hopp 4e368c
  #ifdef FEAT_WINDOWS
Karsten Hopp 4e368c
      for (wp = firstwin; wp; wp = wp->w_next)
Karsten Hopp 4e368c
      {
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 11095,11101 ****
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0]);
Karsten Hopp 4e368c
      --emsg_off;
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      lnum = get_tv_lnum_buf(&argvars[1], buf);
Karsten Hopp 4e368c
--- 11096,11102 ----
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0], FALSE);
Karsten Hopp 4e368c
      --emsg_off;
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      lnum = get_tv_lnum_buf(&argvars[1], buf);
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 11123,11129 ****
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      varname = get_tv_string_chk(&argvars[1]);
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0]);
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      if (argvars[2].v_type != VAR_UNKNOWN)
Karsten Hopp 4e368c
  	/* set the default value */
Karsten Hopp 4e368c
--- 11124,11130 ----
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      varname = get_tv_string_chk(&argvars[1]);
Karsten Hopp 4e368c
      ++emsg_off;
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0], FALSE);
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      if (argvars[2].v_type != VAR_UNKNOWN)
Karsten Hopp 4e368c
  	/* set the default value */
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 16216,16222 ****
Karsten Hopp 4e368c
  	return;
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      varname = get_tv_string_chk(&argvars[1]);
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0]);
Karsten Hopp 4e368c
      varp = &argvars[2];
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      if (buf != NULL && varname != NULL && varp != NULL)
Karsten Hopp 4e368c
--- 16217,16223 ----
Karsten Hopp 4e368c
  	return;
Karsten Hopp 4e368c
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
Karsten Hopp 4e368c
      varname = get_tv_string_chk(&argvars[1]);
Karsten Hopp 4e368c
!     buf = get_buf_tv(&argvars[0], FALSE);
Karsten Hopp 4e368c
      varp = &argvars[2];
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
      if (buf != NULL && varname != NULL && varp != NULL)
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/ex_docmd.c	2013-03-13 18:30:39.000000000 +0100
Karsten Hopp 4e368c
--- src/ex_docmd.c	2013-03-19 14:15:17.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 2645,2651 ****
Karsten Hopp 4e368c
  	    while (p > ea.arg && vim_iswhite(p[-1]))
Karsten Hopp 4e368c
  		--p;
Karsten Hopp 4e368c
  	}
Karsten Hopp 4e368c
! 	ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0, FALSE);
Karsten Hopp 4e368c
  	if (ea.line2 < 0)	    /* failed */
Karsten Hopp 4e368c
  	    goto doend;
Karsten Hopp 4e368c
  	ea.addr_count = 1;
Karsten Hopp 4e368c
--- 2645,2652 ----
Karsten Hopp 4e368c
  	    while (p > ea.arg && vim_iswhite(p[-1]))
Karsten Hopp 4e368c
  		--p;
Karsten Hopp 4e368c
  	}
Karsten Hopp 4e368c
! 	ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0,
Karsten Hopp 4e368c
! 								FALSE, FALSE);
Karsten Hopp 4e368c
  	if (ea.line2 < 0)	    /* failed */
Karsten Hopp 4e368c
  	    goto doend;
Karsten Hopp 4e368c
  	ea.addr_count = 1;
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/if_perl.xs	2013-02-14 22:19:47.000000000 +0100
Karsten Hopp 4e368c
--- src/if_perl.xs	2013-03-19 14:15:46.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 1056,1062 ****
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
  		pat = (char_u *)SvPV(sv, len);
Karsten Hopp 4e368c
  		++emsg_off;
Karsten Hopp 4e368c
! 		b = buflist_findpat(pat, pat+len, FALSE, FALSE);
Karsten Hopp 4e368c
  		--emsg_off;
Karsten Hopp 4e368c
  	    }
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
--- 1056,1062 ----
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
  		pat = (char_u *)SvPV(sv, len);
Karsten Hopp 4e368c
  		++emsg_off;
Karsten Hopp 4e368c
! 		b = buflist_findpat(pat, pat+len, FALSE, FALSE, FALSE);
Karsten Hopp 4e368c
  		--emsg_off;
Karsten Hopp 4e368c
  	    }
Karsten Hopp 4e368c
  
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/proto/buffer.pro	2012-10-03 18:24:55.000000000 +0200
Karsten Hopp 4e368c
--- src/proto/buffer.pro	2013-03-19 14:16:22.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 17,23 ****
Karsten Hopp 4e368c
  void buflist_getfpos __ARGS((void));
Karsten Hopp 4e368c
  buf_T *buflist_findname_exp __ARGS((char_u *fname));
Karsten Hopp 4e368c
  buf_T *buflist_findname __ARGS((char_u *ffname));
Karsten Hopp 4e368c
! int buflist_findpat __ARGS((char_u *pattern, char_u *pattern_end, int unlisted, int diffmode));
Karsten Hopp 4e368c
  int ExpandBufnames __ARGS((char_u *pat, int *num_file, char_u ***file, int options));
Karsten Hopp 4e368c
  buf_T *buflist_findnr __ARGS((int nr));
Karsten Hopp 4e368c
  char_u *buflist_nr2name __ARGS((int n, int fullname, int helptail));
Karsten Hopp 4e368c
--- 17,23 ----
Karsten Hopp 4e368c
  void buflist_getfpos __ARGS((void));
Karsten Hopp 4e368c
  buf_T *buflist_findname_exp __ARGS((char_u *fname));
Karsten Hopp 4e368c
  buf_T *buflist_findname __ARGS((char_u *ffname));
Karsten Hopp 4e368c
! int buflist_findpat __ARGS((char_u *pattern, char_u *pattern_end, int unlisted, int diffmode, int curtab_only));
Karsten Hopp 4e368c
  int ExpandBufnames __ARGS((char_u *pat, int *num_file, char_u ***file, int options));
Karsten Hopp 4e368c
  buf_T *buflist_findnr __ARGS((int nr));
Karsten Hopp 4e368c
  char_u *buflist_nr2name __ARGS((int n, int fullname, int helptail));
Karsten Hopp 4e368c
*** ../vim-7.3.868/src/version.c	2013-03-19 13:56:03.000000000 +0100
Karsten Hopp 4e368c
--- src/version.c	2013-03-19 14:23:42.000000000 +0100
Karsten Hopp 4e368c
***************
Karsten Hopp 4e368c
*** 730,731 ****
Karsten Hopp 4e368c
--- 730,733 ----
Karsten Hopp 4e368c
  {   /* Add new patch number below this line */
Karsten Hopp 4e368c
+ /**/
Karsten Hopp 4e368c
+     869,
Karsten Hopp 4e368c
  /**/
Karsten Hopp 4e368c
Karsten Hopp 4e368c
-- 
Karsten Hopp 4e368c
Proof techniques #2: Proof by Oddity.
Karsten Hopp 4e368c
	SAMPLE: To prove that horses have an infinite number of legs.
Karsten Hopp 4e368c
(1) Horses have an even number of legs.
Karsten Hopp 4e368c
(2) They have two legs in back and fore legs in front.
Karsten Hopp 4e368c
(3) This makes a total of six legs, which certainly is an odd number of
Karsten Hopp 4e368c
    legs for a horse.
Karsten Hopp 4e368c
(4) But the only number that is both odd and even is infinity.
Karsten Hopp 4e368c
(5) Therefore, horses must have an infinite number of legs.
Karsten Hopp 4e368c
Karsten Hopp 4e368c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4e368c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4e368c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 4e368c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///