home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.1 / 7.1.295 < prev    next >
Encoding:
Internet Message Format  |  2008-05-06  |  6.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.1.295
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.1.295
  11. Problem:    Vimtutor only works with vim, not gvim.
  12. Solution:   Add the -g flag to vimtutor. (Dominique Pelle)  Add gvimtutor.
  13. Files:        src/Makefile, src/gvimtutor, src/vimtutor, runtime/doc/vimtutor.1
  14.  
  15.  
  16. *** ../vim-7.1.294/src/Makefile    Wed May  7 13:09:17 2008
  17. --- src/Makefile    Wed May  7 17:34:31 2008
  18. ***************
  19. *** 1867,1872 ****
  20. --- 1872,1879 ----
  21.   installtutorbin: $(DEST_VIM)
  22.       $(INSTALL_DATA) vimtutor $(DEST_BIN)/$(VIMNAME)tutor
  23.       chmod $(SCRIPTMOD) $(DEST_BIN)/$(VIMNAME)tutor
  24. +     $(INSTALL_DATA) gvimtutor $(DEST_BIN)/$(GVIMNAME)tutor
  25. +     chmod $(SCRIPTMOD) $(DEST_BIN)/$(GVIMNAME)tutor
  26.   
  27.   installtutor: $(DEST_RT) $(DEST_TUTOR)
  28.       -$(INSTALL_DATA) $(TUTORSOURCE)/README* $(TUTORSOURCE)/tutor* $(DEST_TUTOR)
  29. ***************
  30. *** 2075,2080 ****
  31. --- 2082,2088 ----
  32.   uninstall: uninstall_runtime
  33.       -rm -f $(DEST_BIN)/$(VIMTARGET)
  34.       -rm -f $(DEST_BIN)/vimtutor
  35. +     -rm -f $(DEST_BIN)/gvimtutor
  36.       -rm -f $(DEST_BIN)/$(EXTARGET) $(DEST_BIN)/$(VIEWTARGET)
  37.       -rm -f $(DEST_BIN)/$(GVIMTARGET) $(DEST_BIN)/$(GVIEWTARGET)
  38.       -rm -f $(DEST_BIN)/$(RVIMTARGET) $(DEST_BIN)/$(RVIEWTARGET)
  39. ***************
  40. *** 2171,2177 ****
  41.   
  42.   shadow:    runtime pixmaps
  43.       mkdir $(SHADOWDIR)
  44. !     cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../mkinstalldirs .
  45.       mkdir $(SHADOWDIR)/auto
  46.       cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
  47.       cd $(SHADOWDIR); rm -f auto/link.sed
  48. --- 2179,2185 ----
  49.   
  50.   shadow:    runtime pixmaps
  51.       mkdir $(SHADOWDIR)
  52. !     cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../gvimtutor ../mkinstalldirs .
  53.       mkdir $(SHADOWDIR)/auto
  54.       cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
  55.       cd $(SHADOWDIR); rm -f auto/link.sed
  56. *** ../vim-7.1.294/src/gvimtutor    Wed May  7 17:38:10 2008
  57. --- src/gvimtutor    Wed May  7 17:29:35 2008
  58. ***************
  59. *** 0 ****
  60. --- 1,8 ----
  61. + #!/bin/sh
  62. + # Start GUI Vim on a copy of the tutor file.
  63. + # Usage: gvimtutor [xx]
  64. + # See vimtutor for usage.
  65. + exec `dirname $0`/vimtutor -g "$@"
  66. *** ../vim-7.1.294/src/vimtutor    Tue Jul 17 14:32:07 2007
  67. --- src/vimtutor    Sat Apr  5 12:21:11 2008
  68. ***************
  69. *** 2,12 ****
  70.   
  71.   # Start Vim on a copy of the tutor file.
  72.   
  73. ! # Usage: vimtutor [xx], where xx is a language code like "es" or "nl".
  74.   # When an argument is given, it tries loading that tutor.
  75.   # When this fails or no argument was given, it tries using 'v:lang'
  76.   # When that also fails, it uses the English version.
  77.   
  78.   xx=$1
  79.   export xx
  80.   
  81. --- 2,25 ----
  82.   
  83.   # Start Vim on a copy of the tutor file.
  84.   
  85. ! # Usage: vimtutor [-g] [xx]
  86. ! # Where optional argument -g starts vimtutor in gvim (GUI) instead of vim.
  87. ! # and xx is a language code like "es" or "nl".
  88.   # When an argument is given, it tries loading that tutor.
  89.   # When this fails or no argument was given, it tries using 'v:lang'
  90.   # When that also fails, it uses the English version.
  91.   
  92. + # Vim could be called "vim" or "vi".  Also check for "vimN", for people who
  93. + # have Vim installed with its version number.
  94. + # We anticipate up to a future Vim 8 version :-).
  95. + seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
  96. + if test "$1" = "-g"; then 
  97. +   # Try to use the GUI version of Vim if possible, it will fall back
  98. +   # on Vim if Gvim is not installed.
  99. +   seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
  100. +   shift
  101. + fi
  102.   xx=$1
  103.   export xx
  104.   
  105. ***************
  106. *** 39,48 ****
  107.   # remove the copy of the tutor on exit
  108.   trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
  109.   
  110. - # Vim could be called "vim" or "vi".  Also check for "vimN", for people who
  111. - # have Vim installed with its version number.
  112. - # We anticipate up to a future Vim 8 version :-).
  113. - seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
  114.   for i in $seq; do
  115.       testvim=`which $i 2>/dev/null`
  116.       if test -f "$testvim"; then
  117. --- 52,57 ----
  118. ***************
  119. *** 59,65 ****
  120.   
  121.   # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
  122.   # The script tutor.vim tells Vim which file to copy
  123. ! $VIM -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
  124.   
  125.   # Start vim without any .vimrc, set 'nocompatible'
  126. ! $VIM -u NONE -c "set nocp" $TUTORCOPY
  127. --- 68,74 ----
  128.   
  129.   # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
  130.   # The script tutor.vim tells Vim which file to copy
  131. ! $VIM -f -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
  132.   
  133.   # Start vim without any .vimrc, set 'nocompatible'
  134. ! $VIM -f -u NONE -c "set nocp" $TUTORCOPY
  135. *** ../vim-7.1.294/runtime/doc/vimtutor.1    Sun Jun 13 18:50:18 2004
  136. --- runtime/doc/vimtutor.1    Sat Apr  5 12:21:11 2008
  137. ***************
  138. *** 3,9 ****
  139.   vimtutor \- the Vim tutor
  140.   .SH SYNOPSIS
  141.   .br
  142. ! .B vimtutor [language]
  143.   .SH DESCRIPTION
  144.   .B Vimtutor
  145.   starts the
  146. --- 3,9 ----
  147.   vimtutor \- the Vim tutor
  148.   .SH SYNOPSIS
  149.   .br
  150. ! .B vimtutor [-g] [language]
  151.   .SH DESCRIPTION
  152.   .B Vimtutor
  153.   starts the
  154. ***************
  155. *** 18,23 ****
  156. --- 18,26 ----
  157.   .B Vim
  158.   commands.
  159.   .PP
  160. + The optional argument -g starts vimtutor with gvim rather than vim, if the
  161. + GUI version of vim is available, or falls back to Vim if gvim is not found.
  162. + .PP
  163.   The optional [language] argument is the two-letter name of a language, like
  164.   "it" or "es".
  165.   If the [language] argument is missing, the language of the current locale will
  166. *** ../vim-7.1.294/src/version.c    Wed May  7 13:09:12 2008
  167. --- src/version.c    Wed May  7 17:12:43 2008
  168. ***************
  169. *** 668,669 ****
  170. --- 673,676 ----
  171.   {   /* Add new patch number below this line */
  172. + /**/
  173. +     295,
  174.   /**/
  175.  
  176. -- 
  177. Time flies like an arrow.
  178. Fruit flies like a banana.
  179.  
  180.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  181. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  182. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  183.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  184.