Function: halfwidth-region
halfwidth-region is an interactive and byte-compiled function defined
in text-mode.el.gz.
Signature
(halfwidth-region FROM TO)
Documentation
Convert fullwidth characters in the region to their ASCII variants.
This converts 1 to 1, A to A, etc. When called from Lisp, FROM and TO are character positions that define the region in which to convert characters.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/text-mode.el.gz
(defun halfwidth-region (from to)
"Convert fullwidth characters in the region to their ASCII variants.
This converts 1 to 1, A to A, etc.
When called from Lisp, FROM and TO are character positions that define
the region in which to convert characters."
(interactive "r")
(translate-region from to
(char-table-extra-slot (text-mode--get-fullwidth-table)
0)))