Variable: word-wrap-by-category
word-wrap-by-category is a customizable variable defined in xdisp.c.
Value
nil
Documentation
Non-nil means also wrap after characters of a certain category.
Normally when word-wrap is on, Emacs only breaks lines after
whitespace characters. When this option is turned on, Emacs also
breaks lines after characters that have the "|" category (defined in
characters.el). This is useful for allowing breaking after CJK
characters and improves the word-wrapping for CJK text mixed with
Latin text.
If this variable is set using Customize, Emacs automatically loads
kinsoku.el. When kinsoku.el is loaded, Emacs respects kinsoku rules
when breaking lines. That means characters with the ">" category
don't appear at the beginning of a line (e.g., FULLWIDTH COMMA), and
characters with the "<" category don't appear at the end of a line
(e.g., LEFT DOUBLE ANGLE BRACKET).
This variable was added, or its default value changed, in Emacs 28.1.
Probably introduced at or before Emacs version 28.1.
Source Code
// Defined in /usr/src/emacs/src/xdisp.c
DEFVAR_BOOL("word-wrap-by-category", word_wrap_by_category, doc: /*
Non-nil means also wrap after characters of a certain category.
Normally when `word-wrap' is on, Emacs only breaks lines after
whitespace characters. When this option is turned on, Emacs also
breaks lines after characters that have the "|" category (defined in
characters.el). This is useful for allowing breaking after CJK
characters and improves the word-wrapping for CJK text mixed with
Latin text.
If this variable is set using Customize, Emacs automatically loads
kinsoku.el. When kinsoku.el is loaded, Emacs respects kinsoku rules
when breaking lines. That means characters with the ">" category
don't appear at the beginning of a line (e.g., FULLWIDTH COMMA), and
characters with the "<" category don't appear at the end of a line
(e.g., LEFT DOUBLE ANGLE BRACKET). */);