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