diff runtime/syntax/doxygen.vim @ 29269:0fdf36de4018

Update runtime files Commit: https://github.com/vim/vim/commit/8cc5b559f70041361612b8a6a87922503b33baa6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 23 13:04:20 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Jun 2022 14:15:04 +0200
parents 11b656e74444
children dc4de65a7fb7
line wrap: on
line diff
--- a/runtime/syntax/doxygen.vim
+++ b/runtime/syntax/doxygen.vim
@@ -498,12 +498,16 @@ endif
 
     syn match doxygenLeadingWhite +\(^\s*\*\)\@<=\s*+ contained
 
-    " This is still a proposal, but won't do any harm.
-    aug doxygengroup
-    au!
-    au Syntax UserColor_reset nested call s:Doxygen_Hilights_Base()
-    au Syntax UserColor_{on,reset,enable} nested call s:Doxygen_Hilights()
-    aug END
+    " This is still a proposal, but it is probably fine.  However, it doesn't
+    " work when 'syntax' is set in a modeline, catch the security error.
+    try
+      aug doxygengroup
+        au!
+        au Syntax UserColor_reset nested call s:Doxygen_Hilights_Base()
+        au Syntax UserColor_{on,reset,enable} nested call s:Doxygen_Hilights()
+      aug END
+    catch /E12:/
+    endtry
 
 
     SynLink doxygenBody                   Comment