To: vim_dev@googlegroups.com Subject: Patch 8.2.4778 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4778 Problem: Pacman files use dosini filetype. Solution: Use conf instead. (Chaoren Lin, closes #10213) Files: runtime/filetype.vim, src/testdir/test_filetype.vim *** ../vim-8.2.4777/runtime/filetype.vim 2022-04-16 21:33:50.515066896 +0100 --- runtime/filetype.vim 2022-04-17 21:12:47.989358525 +0100 *************** *** 1287,1299 **** " Packet filter conf au BufNewFile,BufRead pf.conf setf pf ! " Pacman Config (close enough to dosini) ! au BufNewFile,BufRead */etc/pacman.conf setf dosini " Pacman hooks au BufNewFile,BufRead *.hook \ if getline(1) == '[Trigger]' | ! \ setf dosini | \ endif " Pam conf --- 1287,1299 ---- " Packet filter conf au BufNewFile,BufRead pf.conf setf pf ! " Pacman config ! au BufNewFile,BufRead */etc/pacman.conf setf conf " Pacman hooks au BufNewFile,BufRead *.hook \ if getline(1) == '[Trigger]' | ! \ setf conf | \ endif " Pam conf *** ../vim-8.2.4777/src/testdir/test_filetype.vim 2022-04-16 21:33:50.515066896 +0100 --- src/testdir/test_filetype.vim 2022-04-17 21:12:47.989358525 +0100 *************** *** 113,119 **** \ 'cobol': ['file.cbl', 'file.cob', 'file.lib'], \ 'coco': ['file.atg'], \ 'conaryrecipe': ['file.recipe'], ! \ 'conf': ['auto.master'], \ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file'], \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'], \ 'cook': ['file.cook'], --- 113,119 ---- \ 'cobol': ['file.cbl', 'file.cob', 'file.lib'], \ 'coco': ['file.atg'], \ 'conaryrecipe': ['file.recipe'], ! \ 'conf': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'auto.master'], \ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file'], \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'], \ 'cook': ['file.cook'], *************** *** 152,158 **** \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'], \ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile', 'Dockerfile.debian', 'Containerfile.something'], \ 'dosbatch': ['file.bat'], ! \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'], \ 'dot': ['file.dot', 'file.gv'], \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'], \ 'dtd': ['file.dtd'], --- 152,158 ---- \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'], \ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile', 'Dockerfile.debian', 'Containerfile.something'], \ 'dosbatch': ['file.bat'], ! \ 'dosini': ['.editorconfig', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'], \ 'dot': ['file.dot', 'file.gv'], \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'], \ 'dtd': ['file.dtd'], *************** *** 1198,1209 **** call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook') split Xfile.hook ! call assert_equal('dosini', &filetype) bwipe! call writefile(['not pacman'], 'Xfile.hook') split Xfile.hook ! call assert_notequal('dosini', &filetype) bwipe! call delete('Xfile.hook') --- 1198,1209 ---- call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook') split Xfile.hook ! call assert_equal('conf', &filetype) bwipe! call writefile(['not pacman'], 'Xfile.hook') split Xfile.hook ! call assert_notequal('conf', &filetype) bwipe! call delete('Xfile.hook') *** ../vim-8.2.4777/src/version.c 2022-04-17 19:20:27.117987300 +0100 --- src/version.c 2022-04-17 21:14:30.841314706 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4778, /**/ -- hundred-and-one symptoms of being an internet addict: 16. You step out of your room and realize that your parents have moved and you don't have a clue when it happened. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///