Function: halfwidth-word

halfwidth-word is an interactive and byte-compiled function defined in text-mode.el.gz.

Signature

(halfwidth-word ARG)

Documentation

Convert characters in word at point to fullwidth, moving over the word.

This converts ASCII characters to their fullwidth variants:
1 to 1, A to A, etc.
With numerical argument ARG, convert that many words starting from point. With negative argument, convert previous words, but do not move point. If point is in the middle of a word, the part of that word before point is ignored when converting forward, and the part of that word after point is ignored when converting backward.

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-word (arg)
  "Convert characters in word at point to fullwidth, moving over the word.
This converts ASCII characters to their fullwidth variants:
1 to 1, A to A, etc.
With numerical argument ARG, convert that many words starting from point.
With negative argument, convert previous words, but do not move point.
If point is in the middle of a word, the part of that word before point
is ignored when converting forward, and the part of that word after
point is ignored when converting backward."
  (interactive "p")
  (let* ((pt (point-marker))
         (beg pt)
         (end (progn
                (forward-word arg)
                (point))))
    (halfwidth-region beg end)
    (or (> arg 0) (goto-char pt))))