Function: thai-word-mode

thai-word-mode is an interactive and byte-compiled function defined in thai-util.el.gz.

Signature

(thai-word-mode &optional ARG)

Documentation

Minor mode to make word-oriented commands aware of Thai words.

The commands affected are M-f (forward-word), M-b (backward-word), M-d (kill-word), M-DEL (backward-kill-word), M-t (transpose-words), and M-q (fill-paragraph).

This is a global minor mode. If called interactively, toggle the Thai-Word mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate (default-value \=thai-word-mode)'.

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/language/thai-util.el.gz
(define-minor-mode thai-word-mode
  "Minor mode to make word-oriented commands aware of Thai words.

The commands affected are \\[forward-word], \\[backward-word],
\\[kill-word], \\[backward-kill-word], \\[transpose-words], and
\\[fill-paragraph]."
  :global t :group 'mule
  (cond (thai-word-mode
	 ;; This enables linebreak between Thai characters.
	 (modify-category-entry (make-char 'thai-tis620) ?|)
	 ;; This enables linebreak at a Thai word boundary.
	 (put-charset-property 'thai-tis620 'fill-find-break-point-function
			       'thai-fill-find-break-point))
	(t
	 (modify-category-entry (make-char 'thai-tis620) ?| nil t)
	 (put-charset-property 'thai-tis620 'fill-find-break-point-function
			       nil))))