Function: thai-update-word-table

thai-update-word-table is an interactive and byte-compiled function defined in thai-word.el.gz.

Signature

(thai-update-word-table FILE &optional APPEND)

Documentation

Update Thai word table by replacing the current word list with FILE.

If called with a prefix argument, FILE is appended instead to the current word list.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/language/thai-word.el.gz
(defun thai-update-word-table (file &optional append)
  "Update Thai word table by replacing the current word list with FILE.
If called with a prefix argument, FILE is appended instead to
the current word list."
  (interactive "FThai word table file: \nP")
  (let ((buf (generate-new-buffer "*thai-work*"))
	(coding-system-for-read 'thai-tis620)
	(table (if append thai-word-table (list 'thai-words))))
    (unwind-protect
	(with-current-buffer buf
	  (insert-file-contents file)
	  (goto-char (point-min))
	  (while (re-search-forward "\\ct+" nil t)
	    (set-nested-alist (match-string 0) 1 table)))
      (kill-buffer buf))
    (setq thai-word-table table)))