runtime(javacc): Check for existence of javaFuncDef syn group before clearing it

Commit: 
https://github.com/vim/vim/commit/bfebd1209bd39b3c8afe5dceae37a20152efac35
Author: Christian Brabandt <[email protected]>
Date:   Mon May 11 10:15:02 2026 +0200

    runtime(javacc): Check for existence of javaFuncDef syn group before 
clearing it
    
    fixes: https://github.com/vim/vim/issues/20190
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/javacc.vim b/runtime/syntax/javacc.vim
index a80572d51..f81e12d29 100644
--- a/runtime/syntax/javacc.vim
+++ b/runtime/syntax/javacc.vim
@@ -3,6 +3,7 @@
 " Maintainer:  Claudio Fleiner <[email protected]>
 " URL:         http://www.fleiner.com/vim/syntax/javacc.vim
 " Last Change: 2012 Oct 05
+" 2026 May 11 by Vim project: check for existence of javaFuncDef before 
clearing it
 
 " Uses java.vim, and adds a few special things for JavaCC Parser files.
 " Those files usually have the extension  *.jj
@@ -33,7 +34,9 @@ syn clear     javaError2
 " remove function definitions (they look different) (first define in
 " in case it was not defined in java.vim)
 "syn match javaFuncDef "--"
-syn clear javaFuncDef
+if hlexists('javaFuncDef')
+  syn clear javaFuncDef
+endif
 syn match javaFuncDef "[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)[    ]*:" 
contains=javaType
 
 syn keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHEAD 
DEBUG_TOKEN_MANAGER

-- 
-- 
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 visit 
https://groups.google.com/d/msgid/vim_dev/E1wMM1e-00GkHg-I9%40256bit.org.

Raspunde prin e-mail lui