1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Minor fixes for last change

* lisp/international/kinsoku.el (kinsoku): Provide 'kinsoku'.
* lisp/cus-start.el (standard): Use 'require' instead of 'load.

* etc/NEWS:
* doc/emacs/display.texi (Visual Line Mode): Improve wording and
markup of last change.
This commit is contained in:
Eli Zaretskii 2020-08-23 10:10:47 +03:00
parent 0d1ca2ac38
commit 4e97019a77
4 changed files with 23 additions and 18 deletions

View File

@ -1813,21 +1813,23 @@ variable @code{visual-line-fringe-indicators}.
@findex char-category-set
@findex category-set-mnemonics
By default, Emacs only breaks lines after whitespace characters.
That strategy produces bad results when CJK and Latin text are mixed
That produces incorrect results when CJK and Latin text are mixed
together (because CJK characters don't use whitespace to separate
words). You can customize @code{word-wrap-by-category} to allow Emacs
to break lines after any character with ``|'' category
words). You can customize the option @code{word-wrap-by-category} to
allow Emacs to break lines after any character with ``|'' category
(@pxref{Categories,,, elisp, the Emacs Lisp Reference Manual}), which
includes CJK characters. Also, 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).
You can view the categories of a character by @code{char-category-set}
and @code{category-set-mnemonics}, or type @kbd{C-u C-x =} with point
on the character and look at the ``category'' section in the report.
You can add categories to a character by @code{modify-category-entry}.
provides better support for CJK characters. Also, if this variable is
set using Customize, Emacs automatically loads @file{kinsoku.el}.
When @file{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., U+FF0C FULLWIDTH COMMA), and
characters with the ``<'' category don't appear at the end of a line
(e.g., U+300A LEFT DOUBLE ANGLE BRACKET). You can view the category
set of a character using the commands @code{char-category-set} and
@code{category-set-mnemonics}, or by typing @kbd{C-u C-x =} with point
on the character and looking at the ``category'' section in the
report. You can add categories to a character using the command
@code{modify-category-entry}.
@node Display Custom
@section Customization of Display

View File

@ -93,11 +93,12 @@ specify 'cursor-type' to be '(box . SIZE)', the cursor becomes a hollow
box if the point is on an image larger than 'SIZE' pixels in any
dimension.
+++
** New custom option 'word-wrap-by-category'.
When word-wrap is enabled, this option allows Emacs to break lines
after more characters (instead of just whitespace characters), that
means word-wrapping for CJK text mixed with Latin text is improved.
When word-wrap is enabled, and this option is non-nil, that allows
Emacs to break lines after more characters than just whitespace
characters. In particular, this significantly improves word-wrapping
for CJK text mixed with Latin text.
---
*** Improved language transliteration in Malayalam input methods.

View File

@ -102,7 +102,7 @@
display boolean "28.1"
:set (lambda (symbol value)
(set-default symbol value)
(when value (load "kinsoku.el"))))
(when value (require 'kinsoku))))
(selective-display-ellipses display boolean)
(indicate-empty-lines fringe boolean)
(indicate-buffer-boundaries

View File

@ -182,4 +182,6 @@ the context of text formatting."
(aref (char-category-set (preceding-char)) ?<))
(kinsoku-shorter linebeg))))
(provide 'kinsoku)
;;; kinsoku.el ends here