Patch 8.1.1762
Problem:    Some filetype rules are in the wrong place.
Solution:   Move to the right place.  Add a few more tests.
Files:      runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-8.1.1761/runtime/filetype.vim        2019-07-27 21:39:09.413360331 
+0200
--- runtime/filetype.vim        2019-07-27 21:42:07.092392021 +0200
***************
*** 1,7 ****
  " Vim support file to detect file types
  "
  " Maintainer: Bram Moolenaar <[email protected]>
! " Last Change:        2018 May 04
  
  " Listen very carefully, I will say this only once
  if exists("did_load_filetypes")
--- 1,7 ----
  " Vim support file to detect file types
  "
  " Maintainer: Bram Moolenaar <[email protected]>
! " Last Change:        2019 Jul 27
  
  " Listen very carefully, I will say this only once
  if exists("did_load_filetypes")
***************
*** 42,47 ****
--- 42,49 ----
  
  " Function used for patterns that end in a star: don't set the filetype if the
  " file name matches ft_ignore_pat.
+ " When using this, the entry should probably be further down below with the
+ " other StarSetf() calls.
  func! s:StarSetf(ft)
    if expand("<amatch>") !~ g:ft_ignore_pat
      exe 'setf ' . a:ft
***************
*** 54,59 ****
--- 56,64 ----
  " Abaqus or Trasys
  au BufNewFile,BufRead *.inp                   call dist#ft#Check_inp()
  
+ " 8th (Firth-derivative)
+ au BufNewFile,BufRead *.8th                   setf 8th
+ 
  " A-A-P recipe
  au BufNewFile,BufRead *.aap                   setf aap
  
***************
*** 92,102 ****
  " Arduino
  au BufNewFile,BufRead *.ino,*.pde             setf arduino
  
- " Apache style config file
- au BufNewFile,BufRead proftpd.conf*           call s:StarSetf('apachestyle')
- 
  " Apache config file
  au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf            setf apache
  
  " XA65 MOS6510 cross assembler
  au BufNewFile,BufRead *.a65                   setf a65
--- 97,105 ----
  " Arduino
  au BufNewFile,BufRead *.ino,*.pde             setf arduino
  
  " Apache config file
  au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf            setf apache
+ au BufNewFile,BufRead */etc/apache2/sites-*/*.com             setf apache
  
  " XA65 MOS6510 cross assembler
  au BufNewFile,BufRead *.a65                   setf a65
***************
*** 651,657 ****
  
  " Gitolite
  au BufNewFile,BufRead gitolite.conf           setf gitolite
- au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
  au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc     setf perl
  
  " Gnuplot scripts
--- 654,659 ----
***************
*** 705,713 ****
  " HTML (.shtml and .stm for server side)
  au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm  call dist#ft#FThtml()
  
- " Vue.js Single File Component
- au BufNewFile,BufRead *.vue                   setf vue
- 
  " HTML with Ruby - eRuby
  au BufNewFile,BufRead *.erb,*.rhtml           setf eruby
  
--- 707,712 ----
***************
*** 803,809 ****
  
  " Java Properties resource file (note: doesn't catch font.properties.pl)
  au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf 
jproperties
- au BufNewFile,BufRead *.properties_??_??_*    call s:StarSetf('jproperties')
  
  " Jess
  au BufNewFile,BufRead *.clp                   setf jess
--- 802,807 ----
***************
*** 1465,1471 ****
  
  " SGML catalog file
  au BufNewFile,BufRead catalog                 setf catalog
- au BufNewFile,BufRead sgml.catalog*           call s:StarSetf('catalog')
  
  " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
  " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
--- 1463,1468 ----
***************
*** 1620,1625 ****
--- 1617,1626 ----
  
  " Systemd unit files
  au BufNewFile,BufRead 
*/systemd/*.{automount,mount,path,service,socket,swap,target,timer}     setf 
systemd
+ " Systemd overrides
+ au BufNewFile,BufRead /etc/systemd/system/*.d/*.conf  setf systemd
+ " Systemd temp files
+ au BufNewFile,BufRead /etc/systemd/system/*.d/.#*     setf systemd
  
  " Synopsys Design Constraints
  au BufNewFile,BufRead *.sdc                   setf sdc
***************
*** 1745,1751 ****
  
  " VHDL
  au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst  setf vhdl
- au BufNewFile,BufRead *.vhdl_[0-9]*           call s:StarSetf('vhdl')
  
  " Vim script
  au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim
--- 1746,1751 ----
***************
*** 1776,1787 ****
  " Vroom (vim testing and executable documentation)
  au BufNewFile,BufRead *.vroom                 setf vroom
  
! " Webmacro
! au BufNewFile,BufRead *.wm                    setf webmacro
  
  " WebAssembly
  au BufNewFile,BufRead *.wast,*.wat            setf wast
  
  " Wget config
  au BufNewFile,BufRead .wgetrc,wgetrc          setf wget
  
--- 1776,1790 ----
  " Vroom (vim testing and executable documentation)
  au BufNewFile,BufRead *.vroom                 setf vroom
  
! " Vue.js Single File Component
! au BufNewFile,BufRead *.vue                   setf vue
  
  " WebAssembly
  au BufNewFile,BufRead *.wast,*.wat            setf wast
  
+ " Webmacro
+ au BufNewFile,BufRead *.wm                    setf webmacro
+ 
  " Wget config
  au BufNewFile,BufRead .wgetrc,wgetrc          setf wget
  
***************
*** 1867,1873 ****
  au BufNewFile,BufRead *.csproj,*.csproj.user  setf xml
  
  " Qt Linguist translation source and Qt User Interface Files are XML
! au BufNewFile,BufRead *.ts,*.ui                       setf xml
  
  " TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
  au BufNewFile,BufRead *.tpm                   setf xml
--- 1870,1877 ----
  au BufNewFile,BufRead *.csproj,*.csproj.user  setf xml
  
  " Qt Linguist translation source and Qt User Interface Files are XML
! " However, for .ts Typescript is more common.
! au BufNewFile,BufRead *.ui                    setf xml
  
  " TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
  au BufNewFile,BufRead *.tpm                   setf xml
***************
*** 1958,1963 ****
--- 1962,1968 ----
  
  " More Apache style config files
  au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/*    call 
s:StarSetf('apachestyle')
+ au BufNewFile,BufRead proftpd.conf*                                   call 
s:StarSetf('apachestyle')
  
  " More Apache config files
  au BufNewFile,BufRead 
access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*   call 
s:StarSetf('apache')
***************
*** 2014,2019 ****
--- 2019,2030 ----
  " Gedcom
  au BufNewFile,BufRead */tmp/lltmp*            call s:StarSetf('gedcom')
  
+ " Git
+ au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/*     call 
s:StarSetf('gitconfig')
+ 
+ " Gitolite
+ au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
+ 
  " GTK RC
  au BufNewFile,BufRead .gtkrc*,gtkrc*          call s:StarSetf('gtkrc')
  
***************
*** 2026,2031 ****
--- 2037,2045 ----
        \|  call s:StarSetf('jargon')
        \|endif
  
+ " Java Properties resource file (note: doesn't catch font.properties.pl)
+ au BufNewFile,BufRead *.properties_??_??_*    call s:StarSetf('jproperties')
+ 
  " Kconfig
  au BufNewFile,BufRead Kconfig.*                       call 
s:StarSetf('kconfig')
  
***************
*** 2087,2092 ****
--- 2101,2109 ----
  " Remind
  au BufNewFile,BufRead .reminders*             call s:StarSetf('remind')
  
+ " SGML catalog file
+ au BufNewFile,BufRead sgml.catalog*           call s:StarSetf('catalog')
+ 
  " Shell scripts ending in a star
  au BufNewFile,BufRead 
.bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD*
 call dist#ft#SetFileTypeSH("bash")
  au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
***************
*** 2098,2103 ****
--- 2115,2123 ----
  " csh scripts ending in a star
  au BufNewFile,BufRead .login*,.cshrc*  call dist#ft#CSH()
  
+ " VHDL
+ au BufNewFile,BufRead *.vhdl_[0-9]*           call s:StarSetf('vhdl')
+ 
  " Vim script
  au BufNewFile,BufRead *vimrc*                 call s:StarSetf('vim')
  
*** ../vim-8.1.1761/src/testdir/test_filetype.vim       2019-07-27 
21:39:09.413360331 +0200
--- src/testdir/test_filetype.vim       2019-07-27 21:54:56.912132129 +0200
***************
*** 44,51 ****
--- 44,53 ----
  
  " Filetypes detected just from matching the file name.
  let s:filename_checks = {
+     \ '8th': ['file.8th'],
      \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc'],
      \ 'a65': ['file.a65'],
+     \ 'aap': ['file.aap'],
      \ 'abap': ['file.abap'],
      \ 'abc': ['file.abc'],
      \ 'abel': ['file.abl'],
***************
*** 56,62 ****
      \ 'aml': ['file.aml'],
      \ 'ampl': ['file.run'],
      \ 'ant': ['build.xml'],
!     \ 'apache': ['.htaccess', '/etc/httpd/file.conf'],
      \ 'applescript': ['file.scpt'],
      \ 'aptconf': ['apt.conf', '/.aptitude/config'],
      \ 'arch': ['.arch-inventory'],
--- 58,65 ----
      \ 'aml': ['file.aml'],
      \ 'ampl': ['file.run'],
      \ 'ant': ['build.xml'],
!     \ 'apache': ['.htaccess', '/etc/httpd/file.conf', 
'/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', 
'/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', 
'/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config'],
!     \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file'],
      \ 'applescript': ['file.scpt'],
      \ 'aptconf': ['apt.conf', '/.aptitude/config'],
      \ 'arch': ['.arch-inventory'],
***************
*** 81,87 ****
      \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c'],
      \ 'cabal': ['file.cabal'],
      \ 'calendar': ['calendar'],
!     \ 'catalog': ['catalog'],
      \ 'cdl': ['file.cdl'],
      \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', 
'/etc/default/cdrdao', '.cdrdao'],
      \ 'cdrtoc': ['file.toc'],
--- 84,90 ----
      \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c'],
      \ 'cabal': ['file.cabal'],
      \ 'calendar': ['calendar'],
!     \ 'catalog': ['catalog', 'sgml.catalogfile'],
      \ 'cdl': ['file.cdl'],
      \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', 
'/etc/default/cdrdao', '.cdrdao'],
      \ 'cdrtoc': ['file.toc'],
***************
*** 425,431 ****
      \ 'svg': ['file.svg'],
      \ 'svn': ['svn-commitfile.tmp'],
      \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'],
!     \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 
'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 
'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer'],
      \ 'systemverilog': ['file.sv', 'file.svh'],
      \ 'tags': ['tags'],
      \ 'tak': ['file.tak'],
--- 428,434 ----
      \ 'svg': ['file.svg'],
      \ 'svn': ['svn-commitfile.tmp'],
      \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'],
!     \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 
'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 
'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', 
'/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file'],
      \ 'systemverilog': ['file.sv', 'file.svh'],
      \ 'tags': ['tags'],
      \ 'tak': ['file.tak'],
***************
*** 468,474 ****
      \ 'verilog': ['file.v'],
      \ 'verilogams': ['file.va', 'file.vams'],
      \ 'vgrindefs': ['vgrindefs'],
!     \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst'],
      \ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc'],
      \ 'viminfo': ['.viminfo', '_viminfo'],
      \ 'vmasm': ['file.mar'],
--- 471,477 ----
      \ 'verilog': ['file.v'],
      \ 'verilogams': ['file.va', 'file.vams'],
      \ 'vgrindefs': ['vgrindefs'],
!     \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 
'file.vhdl_123'],
      \ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc'],
      \ 'viminfo': ['.viminfo', '_viminfo'],
      \ 'vmasm': ['file.mar'],
***************
*** 503,509 ****
      \ 'zimbutempl': ['file.zut'],
      \ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh'],
      \
-     \ 'aap': ['file.aap'],
      \ 'help': [$VIMRUNTIME . '/doc/help.txt'],
      \ 'xpm': ['file.xpm'],
      \ }
--- 506,511 ----
***************
*** 517,523 ****
      for i in range(0, len(names) - 1)
        new
        try
!         exe 'edit ' . names[i]
        catch
        call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg)
        endtry
--- 519,525 ----
      for i in range(0, len(names) - 1)
        new
        try
!         exe 'edit ' . fnameescape(names[i])
        catch
        call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg)
        endtry
*** ../vim-8.1.1761/src/version.c       2019-07-27 21:39:09.413360331 +0200
--- src/version.c       2019-07-27 21:55:53.904168843 +0200
***************
*** 779,780 ****
--- 779,782 ----
  {   /* Add new patch number below this line */
+ /**/
+     1762,
  /**/

-- 
I have read and understood the above. X________________

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201907271958.x6RJw5Er011695%40masaka.moolenaar.net.

Raspunde prin e-mail lui