Commit: runtime(doc): GTK: document that "font" in a highlight group has no effect

Christian Brabandt <[email protected]> Wed, 29 Jul 2026 20:45:08 +0200
Newsgroups gmane.editors.vim.devel
Message-ID <[email protected]>
runtime(doc): GTK: document that "font" in a highlight group has no effect

Commit: https://github.com/vim/vim/commit/4a997e146f0451de97ac936b582d379ff429e231
Author: Hirohito Higashi <[email protected]>
Date:   Tue Jul 28 20:53:34 2026 +0000

    runtime(doc): GTK: document that "font" in a highlight group has no effect
    
    Problem:  It is not documented that in the GTK GUI the "font" item of a
              highlight group only works for the "Normal" group.  The example
              even uses another group, so it does not work there.
    Solution: Mention the restriction and use the "Normal" group in the
              example.
    
    closes: #20867
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    Signed-off-by: Hirohito Higashi <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index f50e12a9a..7b555d3ca 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt*	For Vim version 9.2.  Last change: 2026 Jun 21
+*syntax.txt*	For Vim version 9.2.  Last change: 2026 Jul 29
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -5870,6 +5870,8 @@ font={font-name}					*highlight-font*
 	When setting the font for the "Normal" group, this becomes the default
 	font (until the 'guifont' option is changed; the last one set is
 	used).
+	In the GTK GUI, a font can only be set for the "Normal" group; for
+	other groups it is accepted but has no effect.
 	The following only works with Motif, not with other GUIs:
 	When setting the font for the "Menu" group, the menus will be changed.
 	When setting the font for the "Tooltip" group, the tooltips will be
@@ -5880,7 +5882,7 @@ font={font-name}					*highlight-font*
 	To use a font name with an embedded space or other special character,
 	put it in single quotes.  The single quote cannot be used then.
 	Example: >
-	    :hi comment font='Monospace 10'
+	    :hi Normal font='Monospace 10'
 
 guifg={color-name}					*highlight-guifg*
 guibg={color-name}					*highlight-guibg*

-- 
-- 
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/E1wp9HA-002sXZ-7s%40256bit.org.