073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.237
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.237 (after 7.4.236)
073263
Problem:    When some patches was not included has("patch-7.4.123") may return
073263
	    true falsely.
073263
Solution:   Check for the specific patch number.
073263
Files:	    runtime/doc/eval.txt, src/eval.c
073263
073263
073263
*** ../vim-7.4.236/runtime/doc/eval.txt	2014-04-01 22:08:51.008677463 +0200
073263
--- runtime/doc/eval.txt	2014-04-02 12:09:35.991983552 +0200
073263
***************
073263
*** 1681,1687 ****
073263
  		is 501.  Read-only.  "version" also works, for backwards
073263
  		compatibility.
073263
  		Use |has()| to check if a certain patch was included, e.g.: >
073263
! 			if has("patch123")
073263
  <		Note that patch numbers are specific to the version, thus both
073263
  		version 5.0 and 5.1 may have a patch 123, but these are
073263
  		completely different.
073263
--- 1682,1688 ----
073263
  		is 501.  Read-only.  "version" also works, for backwards
073263
  		compatibility.
073263
  		Use |has()| to check if a certain patch was included, e.g.: >
073263
! 			if has("patch-7.4.123")
073263
  <		Note that patch numbers are specific to the version, thus both
073263
  		version 5.0 and 5.1 may have a patch 123, but these are
073263
  		completely different.
073263
***************
073263
*** 6397,6415 ****
073263
  <							*has-patch*
073263
  3.  Included patches.  The "patch123" feature means that patch 123 has been
073263
      included.  Note that this form does not check the version of Vim, you need
073263
!     to inspect |v:version| for that:
073263
      Example (checking version 6.2.148 or later): >
073263
  	:if v:version > 602 || v:version == 602 && has("patch148")
073263
  <    Note that it's possible for patch 147 to be omitted even though 148 is
073263
      included.
073263
  
073263
! 4.  Beyond a certain patch level.  The "patch-7.4.123" feature means that
073263
!     the Vim version is 7.4 and patch 123 or later was included, or the Vim
073263
!     version is later than 7.4.
073263
      The example above can be simplified to: >
073263
  	:if has("patch-6.2.148")
073263
! <    Note that this does not check if the patch was actually included, some
073263
!     patches may have been skipped.  That is unusual though.
073263
  
073263
  acl			Compiled with |ACL| support.
073263
  all_builtin_terms	Compiled with all builtin terminals enabled.
073263
--- 6410,6428 ----
073263
  <							*has-patch*
073263
  3.  Included patches.  The "patch123" feature means that patch 123 has been
073263
      included.  Note that this form does not check the version of Vim, you need
073263
!     to inspect |v:version| for that.
073263
      Example (checking version 6.2.148 or later): >
073263
  	:if v:version > 602 || v:version == 602 && has("patch148")
073263
  <    Note that it's possible for patch 147 to be omitted even though 148 is
073263
      included.
073263
  
073263
! 4.  Beyond a certain version or at a certain version and including a specific
073263
!     patch.  The "patch-7.4.123" feature means that the Vim version is 7.5 or
073263
!     later, or it is version 7.4 and patch 123 was included.
073263
      The example above can be simplified to: >
073263
  	:if has("patch-6.2.148")
073263
! <    Note that it's possible for patch 147 to be omitted even though 148 is
073263
!     included.
073263
  
073263
  acl			Compiled with |ACL| support.
073263
  all_builtin_terms	Compiled with all builtin terminals enabled.
073263
*** ../vim-7.4.236/src/eval.c	2014-04-01 22:08:51.016677463 +0200
073263
--- src/eval.c	2014-04-02 12:04:41.179987607 +0200
073263
***************
073263
*** 12647,12660 ****
073263
  	    {
073263
  		int major = atoi((char *)name + 6);
073263
  		int minor = atoi((char *)name + 8);
073263
- 		int patch = atoi((char *)name + 10);
073263
  
073263
  		/* Expect "patch-9.9.01234". */
073263
  		n = (major < VIM_VERSION_MAJOR
073263
  		     || (major == VIM_VERSION_MAJOR
073263
  			 && (minor < VIM_VERSION_MINOR
073263
  			     || (minor == VIM_VERSION_MINOR
073263
! 				 && patch <= highest_patch()))));
073263
  	    }
073263
  	    else
073263
  		n = has_patch(atoi((char *)name + 5));
073263
--- 12647,12659 ----
073263
  	    {
073263
  		int major = atoi((char *)name + 6);
073263
  		int minor = atoi((char *)name + 8);
073263
  
073263
  		/* Expect "patch-9.9.01234". */
073263
  		n = (major < VIM_VERSION_MAJOR
073263
  		     || (major == VIM_VERSION_MAJOR
073263
  			 && (minor < VIM_VERSION_MINOR
073263
  			     || (minor == VIM_VERSION_MINOR
073263
! 				 && has_patch(atoi((char *)name + 10))))));
073263
  	    }
073263
  	    else
073263
  		n = has_patch(atoi((char *)name + 5));
073263
*** ../vim-7.4.236/src/version.c	2014-04-01 22:08:51.016677463 +0200
073263
--- src/version.c	2014-04-02 12:10:48.911982549 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     237,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
22. You've already visited all the links at Yahoo and you're halfway through
073263
    Lycos.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///