Skip to content

Commit d8ddc5d

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 9b6331e + 90f5d0a commit d8ddc5d

7 files changed

Lines changed: 50 additions & 102 deletions

File tree

runtime/filetype.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim support file to detect file types
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2015 Oct 13
4+
" Last Change: 2015 Dec 03
55

66
" Listen very carefully, I will say this only once
77
if exists("did_load_filetypes")
@@ -1400,7 +1400,7 @@ else
14001400
au BufNewFile,BufRead *.pl call s:FTpl()
14011401
endif
14021402
au BufNewFile,BufRead *.plx,*.al setf perl
1403-
au BufNewFile,BufRead *.p6,*.pm6 setf perl6
1403+
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
14041404

14051405
func! s:FTpl()
14061406
if exists("g:filetype_pl")
@@ -1429,6 +1429,7 @@ au BufNewFile,BufRead *.pm
14291429

14301430
" Perl POD
14311431
au BufNewFile,BufRead *.pod setf pod
1432+
au BufNewFile,BufRead *.pod6 setf pod6
14321433

14331434
" Php, php3, php4, etc.
14341435
" Also Phtml (was used for PHP 2 in the past)

src/Make_mvc.mak

Lines changed: 26 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@
117117
# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
118118
# doesn't work)
119119
#
120-
# Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
121-
#
122120
# Static Code Analysis: ANALYZE=yes (works with VS2012 only)
123121
#
124122
# You can combine any of these interfaces
@@ -379,91 +377,29 @@ DEL_TREE = deltree /y
379377
INTDIR=$(OBJDIR)
380378
OUTDIR=$(OBJDIR)
381379

382-
# Derive version of VC being used from nmake if not specified
383-
!if "$(MSVCVER)" == ""
384-
!if "$(_NMAKE_VER)" == ""
385-
MSVCVER = 4.0
386-
!endif
387-
!if "$(_NMAKE_VER)" == "162"
388-
MSVCVER = 5.0
389-
!endif
390-
!if "$(_NMAKE_VER)" == "6.00.8168.0"
391-
MSVCVER = 6.0
392-
CPU = ix86
393-
!endif
394-
!if "$(_NMAKE_VER)" == "6.00.9782.0"
395-
MSVCVER = 6.0
396-
CPU = ix86
397-
!endif
398-
!if "$(_NMAKE_VER)" == "7.00.9466"
399-
MSVCVER = 7.0
400-
!endif
401-
!if "$(_NMAKE_VER)" == "7.10.3077"
402-
MSVCVER = 7.1
403-
!endif
404-
!if "$(_NMAKE_VER)" == "8.00.50727.42"
405-
MSVCVER = 8.0
406-
!endif
407-
!if "$(_NMAKE_VER)" == "8.00.50727.762"
408-
MSVCVER = 8.0
409-
!endif
410-
!if "$(_NMAKE_VER)" == "9.00.20706.01"
411-
MSVCVER = 9.0
412-
!endif
413-
!if "$(_NMAKE_VER)" == "9.00.21022.08"
414-
MSVCVER = 9.0
415-
!endif
416-
!if "$(_NMAKE_VER)" == "9.00.30729.01"
417-
MSVCVER = 9.0
418-
!endif
419-
!if "$(_NMAKE_VER)" == "10.00.20506.01"
420-
MSVCVER = 10.0
421-
!endif
422-
!if "$(_NMAKE_VER)" == "10.00.30128.01"
423-
MSVCVER = 10.0
424-
!endif
425-
!if "$(_NMAKE_VER)" == "10.00.30319.01"
426-
MSVCVER = 10.0
427-
!endif
428-
!if "$(_NMAKE_VER)" == "10.00.40219.01"
429-
MSVCVER = 10.0
430-
!endif
431-
!if "$(_NMAKE_VER)" == "11.00.50727.1"
432-
MSVCVER = 11.0
433-
!endif
434-
!if "$(_NMAKE_VER)" == "11.00.51106.1"
435-
MSVCVER = 11.0
436-
!endif
437-
!if "$(_NMAKE_VER)" == "11.00.60315.1"
438-
MSVCVER = 11.0
439-
!endif
440-
!if "$(_NMAKE_VER)" == "11.00.60610.1"
441-
MSVCVER = 11.0
442-
!endif
443-
!if "$(_NMAKE_VER)" == "11.00.61030.0"
444-
MSVCVER = 11.0
445-
!endif
446-
!if "$(_NMAKE_VER)" == "12.00.21005.1"
447-
MSVCVER = 12.0
380+
!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
381+
!message *** ERROR
382+
!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
383+
!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
384+
!error Make aborted.
385+
!else
386+
!include msvcver.~
387+
!if [del msvcver.c msvcver.~]
448388
!endif
449-
!if ("$(_NMAKE_VER)" == "14.00.22609.0") || ("$(_NMAKE_VER)" == "14.00.22816.0") || ("$(_NMAKE_VER)" == "14.00.23026.0")
450-
MSVCVER = 14.0
451389
!endif
390+
391+
!if $(MSVCVER) < 1900
392+
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
393+
!else
394+
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
452395
!endif
453396

454-
# Abort building VIM if version of VC is unrecognised.
455-
!ifndef MSVCVER
456-
!message *** ERROR
457-
!message Cannot determine Visual C version being used. If you are using the
458-
!message Windows SDK then you must have the environment variable MSVCVER set to
459-
!message your version of the VC compiler. If you are not using the Express
460-
!message version of Visual C, you can either set MSVCVER or update this makefile
461-
!message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
462-
!error Make aborted.
397+
!if $(MSVC_MAJOR) == 6
398+
CPU = ix86
463399
!endif
464400

465401
# Convert processor ID to MVC-compatible number
466-
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0") && ("$(MSVCVER)" != "14.0")
402+
!if $(MSVC_MAJOR) < 8
467403
!if "$(CPUNR)" == "i386"
468404
CPUARG = /G3
469405
!elseif "$(CPUNR)" == "i486"
@@ -488,7 +424,7 @@ LIBC =
488424
DEBUGINFO = /Zi
489425

490426
# Don't use /nodefaultlib on MSVC 14
491-
!if "$(MSVCVER)" == "14.0"
427+
!if $(MSVC_MAJOR) >= 14
492428
NODEFAULTLIB =
493429
!else
494430
NODEFAULTLIB = /nodefaultlib
@@ -504,20 +440,21 @@ OPTFLAG = /O2
504440
OPTFLAG = /Ox
505441
!endif
506442

507-
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
443+
!if $(MSVC_MAJOR) >= 8
508444
# Use link time code generation if not worried about size
509445
!if "$(OPTIMIZE)" != "SPACE"
510446
OPTFLAG = $(OPTFLAG) /GL
511447
!endif
512448
!endif
513449

514450
# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
515-
!if ("$(MSVCVER)" == "7.0") || ("$(MSVCVER)" == "7.1") || ("$(MSVCVER)" == "8.0")
451+
!if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8)
516452
CFLAGS=$(CFLAGS) $(WP64CHECK)
517453
!endif
518454

519-
# Static code analysis generally available starting with VS2012
520-
!if ("$(ANALYZE)" == "yes") && (("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0"))
455+
# Static code analysis generally available starting with VS2012 (VC11) or
456+
# Windows SDK 7.1 (VC10)
457+
!if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
521458
CFLAGS=$(CFLAGS) /analyze
522459
!endif
523460

@@ -538,7 +475,7 @@ DEBUGINFO = /ZI
538475
CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
539476
RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
540477
# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
541-
! if "$(MSVCVER)" == "4.0"
478+
! if $(MSVC_MAJOR) == 4
542479
LIBC =
543480
! else
544481
LIBC = /fixed:no
@@ -993,7 +930,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib
993930

994931
# Report link time code generation progress if used.
995932
!ifdef NODEBUG
996-
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
933+
!if $(MSVC_MAJOR) >= 8
997934
!if "$(OPTIMIZE)" != "SPACE"
998935
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
999936
!endif
@@ -1090,7 +1027,7 @@ testclean:
10901027

10911028
# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
10921029
# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
1093-
!IF "$(MSVCVER)" == "4.0"
1030+
!IF "$(_NMAKE_VER)" == ""
10941031
.c{$(OUTDIR)/}.obj:
10951032
!ELSE
10961033
.c{$(OUTDIR)/}.obj::
@@ -1099,7 +1036,7 @@ testclean:
10991036

11001037
# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
11011038
# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
1102-
!IF "$(MSVCVER)" == "4.0"
1039+
!IF "$(_NMAKE_VER)" == ""
11031040
.cpp{$(OUTDIR)/}.obj:
11041041
!ELSE
11051042
.cpp{$(OUTDIR)/}.obj::

src/fileio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7426,10 +7426,12 @@ vim_tempname(extra_char, keep)
74267426
long off;
74277427
# endif
74287428

7429-
/* expand $TMP, leave room for "/v1100000/999999999" */
7429+
/* Expand $TMP, leave room for "/v1100000/999999999".
7430+
* Skip the directory check if the expansion fails. */
74307431
expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
7431-
if (mch_isdir(itmp)) /* directory exists */
7432+
if (itmp[0] != '$' && mch_isdir(itmp))
74327433
{
7434+
/* directory exists */
74337435
# ifdef __EMX__
74347436
/* If $TMP contains a forward slash (perhaps using bash or
74357437
* tcsh), don't add a backslash, use a forward slash!

src/if_lua.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,14 +1561,15 @@ luaV_setref (lua_State *L)
15611561
{
15621562
tv.v_type = VAR_LIST;
15631563
tv.vval.v_list = (list_T *) lua_touserdata(L, 4); /* key */
1564+
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
15641565
}
15651566
else if (lua_rawequal(L, -1, 3)) /* dict? */
15661567
{
15671568
tv.v_type = VAR_DICT;
15681569
tv.vval.v_dict = (dict_T *) lua_touserdata(L, 4); /* key */
1570+
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
15691571
}
15701572
lua_pop(L, 2); /* metatable and value */
1571-
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
15721573
}
15731574
lua_pushinteger(L, abort);
15741575
return 1;

src/term.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,14 +1880,6 @@ set_termname(term)
18801880

18811881
p = (char_u *)"";
18821882
# ifdef FEAT_MOUSE_XTERM
1883-
# ifdef FEAT_CLIPBOARD
1884-
# ifdef FEAT_GUI
1885-
if (!gui.in_use)
1886-
# endif
1887-
# ifndef FEAT_CYGWIN_WIN32_CLIPBOARD
1888-
clip_init(FALSE);
1889-
# endif
1890-
# endif
18911883
if (use_xterm_like_mouse(term))
18921884
{
18931885
if (use_xterm_mouse())

src/testdir/test_tagcase.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Tests for 'tagcase' option
22

33
STARTTEST
44
:so small.vim
5+
:lang mess C
56
:/^start text$/+1,/^end text$/w! Xtext
67
:/^start tags$/+1,/^end tags$/-1w! Xtags
78
:set tags=Xtags

src/version.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,20 @@ static char *(features[]) =
756756

757757
static int included_patches[] =
758758
{ /* Add new patch number below this line */
759+
/**/
760+
960,
761+
/**/
762+
959,
763+
/**/
764+
958,
765+
/**/
766+
957,
767+
/**/
768+
956,
769+
/**/
770+
955,
771+
/**/
772+
954,
759773
/**/
760774
953,
761775
/**/

0 commit comments

Comments
 (0)