;;; thai-word.el -- find Thai word boundaries
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Keywords: thai, word break, emacs
-;; This program is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
-;; This program is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;; The used Thai word list has been taken from IBM's ICU4J project
;; (file `thai6.ucs', version 1.4, converted to TIS encoding, with
;; written authorization of the copyright holder.
+;;; Commentary:
+
;; This file implements an algorithm to find Thai word breaks using a
;; dictionary. It is based on the C program `cttex' written by
;; Vuthichai Ampornaramveth <vuthi@nii.ac.jp>.
(coding-system-for-read 'thai-tis620)
(table (if append thai-word-table (list 'thai-words))))
(unwind-protect
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(insert-file-contents file)
(goto-char (point-min))
(while (re-search-forward "\\ct+" nil t)
;; end of thai-word.el
-;; arch-tag: 29927f02-e177-4224-a270-7e67210b038a