]> granicus.if.org Git - vim/commitdiff
patch 8.2.4793: recognizing Maxima filetype even though it might be another v8.2.4793
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Apr 2022 18:38:38 +0000 (19:38 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Apr 2022 18:38:38 +0000 (19:38 +0100)
Problem:    Recognizing Maxima filetype even though it might be another.
Solution:   Remove *.mc and *.dem patterns from Maxima files

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index c32a566ed75754aafd804b58ca8700da940cc034..9dcca898c7a9d0cd4c95e6fe2c788738cf94fe05 100644 (file)
@@ -155,18 +155,21 @@ au BufNewFile,BufRead *.asp
        \   setf aspvbs |
        \ endif
 
-" Grub (must be before catch *.lst)
+" Grub (must be before pattern *.lst)
 au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
 
 " Maxima, see:
 " https://maxima.sourceforge.io/docs/manual/maxima_71.html#file_005ftype_005fmaxima
-au BufNewFile,BufRead *.mc,*.demo,*.dem,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
+" Must be before the pattern *.mac.
+" *.dem omitted - also used by gnuplot demos
+" *.mc omitted - used by dist#ft#McSetf()
+au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
 
 " Assembly (all kinds)
 " *.lst is not pure assembly, it has two extra columns (address, byte codes)
 au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst  call dist#ft#FTasm()
 
-" Macro (VAX)
+" Assembly - Macro (VAX)
 au BufNewFile,BufRead *.mar                    setf vmasm
 
 " Atlas
@@ -1682,7 +1685,8 @@ au BufNewFile,BufRead *.siv,*.sieve               setf sieve
 " Sendmail
 au BufNewFile,BufRead sendmail.cf              setf sm
 
-" Sendmail .mc files are actually m4.  Could also be MS Message text file.
+" Sendmail .mc files are actually m4.  Could also be MS Message text file or
+" Maxima.
 au BufNewFile,BufRead *.mc                     call dist#ft#McSetf()
 
 " Services
index f0d46a45b6c2819e4ac85d8413dbb5c09e57686e..888ff7a92b6a27b45097b070aa0d76b4e3704dd8 100644 (file)
@@ -338,7 +338,7 @@ let s:filename_checks = {
     \ 'markdown': ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
     \ 'mason': ['file.mason', 'file.mhtml', 'file.comp'],
     \ 'master': ['file.mas', 'file.master'],
-    \ 'maxima': ['file.mc', 'file.demo', 'file.dem', 'file.dmt', 'file.dm1', 'file.dm2', 'file.dm3',
+    \ 'maxima': ['file.demo', 'file.dmt', 'file.dm1', 'file.dm2', 'file.dm3',
     \            'file.wxm', 'maxima-init.mac'],
     \ 'mel': ['file.mel'],
     \ 'meson': ['meson.build', 'meson_options.txt'],
index 82d10a285a68abe94b76fd84f46ef3cb2c1c2deb..901df55c7034ab1389d6d6666651d38fc6115d88 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4793,
 /**/
     4792,
 /**/