Variable: cjk-ambiguous-chars-are-wide

cjk-ambiguous-chars-are-wide is a customizable variable defined in characters.el.gz.

Value

t

Documentation

Whether the "ambiguous-width" characters take 2 columns on display.

Some of the characters are defined by Unicode as being of "ambiguous" width: the actual width, either 1 column or 2 columns, should be determined at display time, depending on the language context. If this variable is non-nil, Emacs will consider these characters as full-width, i.e. taking 2 columns; otherwise they are narrow characters taking 1 column on display. Which value is correct depends on the fonts being used. In some CJK locales the fonts are set so that these characters are displayed as full-width. This setting is most important for text-mode frames, because there Emacs cannot access the metrics of the fonts used by the console or the terminal emulator. You should configure the terminal emulator to behave consistently with the value of this option, by making sure it displays ambiguous-width characters as half-width or full-width, depending on the value of this option.

Do not set this directly via setq; instead, use setopt or the Customize commands. Alternatively, call update-cjk-ambiguous-char-widths passing it the symbol of the current locale environment, after changing the value of the variable with setq.

This variable was added, or its default value changed, in Emacs 30.1.

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/international/characters.el.gz
(defcustom cjk-ambiguous-chars-are-wide t
  "Whether the \"ambiguous-width\" characters take 2 columns on display.

Some of the characters are defined by Unicode as being of \"ambiguous\"
width: the actual width, either 1 column or 2 columns, should be
determined at display time, depending on the language context.
If this variable is non-nil, Emacs will consider these characters as
full-width, i.e. taking 2 columns; otherwise they are narrow characters
taking 1 column on display.  Which value is correct depends on the
fonts being used.  In some CJK locales the fonts are set so that
these characters are displayed as full-width.  This setting is most
important for text-mode frames, because there Emacs cannot access the
metrics of the fonts used by the console or the terminal emulator.
You should configure the terminal emulator to behave consistently
with the value of this option, by making sure it displays ambiguous-width
characters as half-width or full-width, depending on the value of this
option.

Do not set this directly via `setq'; instead, use `setopt' or the
Customize commands.  Alternatively, call `update-cjk-ambiguous-char-widths'
passing it the symbol of the current locale environment, after changing
the value of the variable with `setq'."
  :type 'boolean
  :set (lambda (symbol value)
         (set-default symbol value)
         (let ((locsym (get-language-info current-language-environment
                                          'cjk-locale-symbol)))
           (when locsym
             (update-cjk-ambiguous-char-widths locsym))))
  :version "30.1"
  :group 'display)