3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.234
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.234
3ef2ca
Problem:    Can't get the command that was used to start Vim.
3ef2ca
Solution:   Add v:progpath. (Viktor Kojouharov)
3ef2ca
Files:	    runtime/doc/eval.txt, src/eval.c, src/main.c, src/vim.h
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.233/runtime/doc/eval.txt	2014-03-25 18:23:27.054087691 +0100
3ef2ca
--- runtime/doc/eval.txt	2014-04-01 19:33:25.516805743 +0200
3ef2ca
***************
3ef2ca
*** 1557,1562 ****
3ef2ca
--- 1558,1569 ----
3ef2ca
  		|evim| etc., or any other name you might symlink to Vim.
3ef2ca
  		Read-only.
3ef2ca
  
3ef2ca
+ 					*v:progpath* *progpath-variable*
3ef2ca
+ v:progpath	Contains the command with which Vim was invoked, including the
3ef2ca
+ 		path.  Useful if you want to message a Vim server using a
3ef2ca
+ 		|--remote-expr|.
3ef2ca
+ 		Read-only.
3ef2ca
+ 
3ef2ca
  					*v:register* *register-variable*
3ef2ca
  v:register	The name of the register in effect for the current normal mode
3ef2ca
  		command (regardless of whether that command actually used a
3ef2ca
*** ../vim-7.4.233/src/eval.c	2014-03-30 16:49:06.412565288 +0200
3ef2ca
--- src/eval.c	2014-04-01 19:34:13.164805087 +0200
3ef2ca
***************
3ef2ca
*** 361,366 ****
3ef2ca
--- 361,367 ----
3ef2ca
      {VV_NAME("hlsearch",	 VAR_NUMBER), 0},
3ef2ca
      {VV_NAME("oldfiles",	 VAR_LIST), 0},
3ef2ca
      {VV_NAME("windowid",	 VAR_NUMBER), VV_RO},
3ef2ca
+     {VV_NAME("progpath",	 VAR_STRING), VV_RO},
3ef2ca
  };
3ef2ca
  
3ef2ca
  /* shorthand */
3ef2ca
*** ../vim-7.4.233/src/main.c	2014-03-23 15:12:29.923264336 +0100
3ef2ca
--- src/main.c	2014-04-01 19:34:13.164805087 +0200
3ef2ca
***************
3ef2ca
*** 1602,1607 ****
3ef2ca
--- 1602,1608 ----
3ef2ca
  
3ef2ca
  #ifdef FEAT_EVAL
3ef2ca
      set_vim_var_string(VV_PROGNAME, initstr, -1);
3ef2ca
+     set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1);
3ef2ca
  #endif
3ef2ca
  
3ef2ca
      if (TOLOWER_ASC(initstr[0]) == 'r')
3ef2ca
*** ../vim-7.4.233/src/vim.h	2014-03-24 19:43:56.600837795 +0100
3ef2ca
--- src/vim.h	2014-04-01 19:34:13.164805087 +0200
3ef2ca
***************
3ef2ca
*** 1880,1886 ****
3ef2ca
  #define VV_HLSEARCH	54
3ef2ca
  #define VV_OLDFILES	55
3ef2ca
  #define VV_WINDOWID	56
3ef2ca
! #define VV_LEN		57	/* number of v: vars */
3ef2ca
  
3ef2ca
  #ifdef FEAT_CLIPBOARD
3ef2ca
  
3ef2ca
--- 1880,1887 ----
3ef2ca
  #define VV_HLSEARCH	54
3ef2ca
  #define VV_OLDFILES	55
3ef2ca
  #define VV_WINDOWID	56
3ef2ca
! #define VV_PROGPATH	57
3ef2ca
! #define VV_LEN		58	/* number of v: vars */
3ef2ca
  
3ef2ca
  #ifdef FEAT_CLIPBOARD
3ef2ca
  
3ef2ca
*** ../vim-7.4.233/src/version.c	2014-04-01 18:54:44.316837673 +0200
3ef2ca
--- src/version.c	2014-04-01 19:28:05.092810150 +0200
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     234,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
hundred-and-one symptoms of being an internet addict:
3ef2ca
18. Your wife drapes a blond wig over your monitor to remind you of what she
3ef2ca
    looks like.
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///