changeset 35712:56b9e0fdafec v9.1.0591

patch 9.1.0591: filetype: *.wl files are not recognized Commit: https://github.com/vim/vim/commit/c6d7dc039342fbe1cf432c7f8e7e391063de210b Author: Jonas Dujava <jonas.dujava@gmail.com> Date: Tue Jul 16 20:37:41 2024 +0200 patch 9.1.0591: filetype: *.wl files are not recognized Problem: filetype: *.wl files are not recognized Solution: Detect '*.wl' files as Mathematica package files (Jonas Dujava) closes: #15269 Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 17 Jul 2024 08:13:57 +0200
parents 960025b0bcc9
children e042ab784b6f
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1418,8 +1418,8 @@ au BufNewFile,BufRead *.mason,*.mhtml,*.
 " Mathematica, Matlab, Murphi, Objective C or Octave
 au BufNewFile,BufRead *.m			call dist#ft#FTm()
 
-" Mathematica notebook
-au BufNewFile,BufRead *.nb			setf mma
+" Mathematica notebook and package files
+au BufNewFile,BufRead *.nb,*.wl			setf mma
 
 " Maya Extension Language
 au BufNewFile,BufRead *.mel			setf mel
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -471,7 +471,7 @@ def s:GetFilenameChecks(): dict<list<str
     mgp: ['file.mgp'],
     mib: ['file.mib', 'file.my'],
     mix: ['file.mix', 'file.mixal'],
-    mma: ['file.nb'],
+    mma: ['file.nb', 'file.wl'],
     mmp: ['file.mmp'],
     modconf: ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
     modula3: ['file.m3', 'file.mg', 'file.i3', 'file.ig', 'file.lm3'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    591,
+/**/
     590,
 /**/
     589,