comparison lisp/language/thai-word.el @ 90718:f1d13e615070

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 523-544) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 168-171) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-150
author Miles Bader <miles@gnu.org>
date Thu, 07 Dec 2006 04:14:14 +0000
parents f9a65d7ebd29 e56f52b00e2d
children 6588c6259dfb
comparison
equal deleted inserted replaced
90717:06937e972ad0 90718:f1d13e615070
10803 (setq this (and (< pos limit) (cdr (assq char this))))) 10803 (setq this (and (< pos limit) (cdr (assq char this)))))
10804 positions))) 10804 positions)))
10805 10805
10806 10806
10807 ;; Move point forward to the end of Thai word which follows point and 10807 ;; Move point forward to the end of Thai word which follows point and
10808 ;; update VEC. VEC is a vector of three elements used to cache word 10808 ;; update VEC. VEC is a vector of three elements used to cache word
10809 ;; end positions. The Nth element, if non-nil, is a list of end 10809 ;; end positions. The Nth element, if non-nil, is a list of end
10810 ;; points of the Nth word, or t indicating that there is no Thai 10810 ;; points of the Nth word, or t indicating that there is no Thai
10811 ;; character. LIMIT limits the point movement. 10811 ;; character. LIMIT limits the point movement.
10812 10812
10813 (defun thai-forward-word-update-info (vec limit) 10813 (defun thai-forward-word-update-info (vec limit)
10884 (setq v0 (cdr v0))) 10884 (setq v0 (cdr v0)))
10885 ;; No success. 10885 ;; No success.
10886 nil) 10886 nil)
10887 (progn 10887 (progn
10888 ;; We found four succeeding Thai words (or LIMIT has been 10888 ;; We found four succeeding Thai words (or LIMIT has been
10889 ;; reached). Move to the end of the first word. 10889 ;; reached). Move to the end of the first word.
10890 (goto-char (car v0)) 10890 (goto-char (car v0))
10891 ;; Update VEC for the next function call. If no larger word 10891 ;; Update VEC for the next function call. If no larger word
10892 ;; positions have been found, set the corresponding vector 10892 ;; positions have been found, set the corresponding vector
10893 ;; element to nil. 10893 ;; element to nil.
10894 (if (and (consp v1) (< (car v1) (car (aref vec 1)))) 10894 (if (and (consp v1) (< (car v1) (car (aref vec 1))))
10897 (if (and (consp v2) (< (car v2) (car (aref vec 2)))) 10897 (if (and (consp v2) (< (car v2) (car (aref vec 2))))
10898 (aset vec 1 nil) 10898 (aset vec 1 nil)
10899 (aset vec 1 v2) 10899 (aset vec 1 v2)
10900 (aset vec 2 v3)))) ; exit function successfully 10900 (aset vec 2 v3)))) ; exit function successfully
10901 10901
10902 ;; We didn't find four consecutive words. If we have found a 10902 ;; We didn't find four consecutive words. If we have found a
10903 ;; `second best' solution and the length of those two words is 10903 ;; `second best' solution and the length of those two words is
10904 ;; longer than the longest word we can see at the current point, 10904 ;; longer than the longest word we can see at the current point,
10905 ;; adopt the second best solution. This decision is based on 10905 ;; adopt the second best solution. This decision is based on
10906 ;; heuristic tests. 10906 ;; heuristic tests.
10907 (if (and second-best 10907 (if (and second-best