[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/language/thai-word.el
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/language/thai-word.el |
Date: |
Tue, 29 Mar 2005 02:47:10 -0500 |
Index: emacs/lisp/language/thai-word.el
diff -c emacs/lisp/language/thai-word.el:1.2
emacs/lisp/language/thai-word.el:1.3
*** emacs/lisp/language/thai-word.el:1.2 Sun Mar 20 01:49:13 2005
--- emacs/lisp/language/thai-word.el Tue Mar 29 07:47:09 2005
***************
*** 1,7 ****
;;; thai-word.el -- find Thai word boundaries
! ;; Copyright (C) 2000, 2001, 2002, 2003, 2004
! ;; Electrotechnical Laboratory, JAPAN.
;; Author: Kenichi HANDA <address@hidden>
--- 1,8 ----
;;; thai-word.el -- find Thai word boundaries
! ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
! ;; National Institute of Advanced Industrial Science and Technology (AIST)
! ;; Registration Number H14PRO021
;; Author: Kenichi HANDA <address@hidden>
***************
*** 72,84 ****
;; which means that you can easily index the list character by
;; character.
! (defconst thai-word-table nil)
!
!
! ;; Set up `thai-word-table'.
!
! (let
! ((l
'("¡¡"
"¡¡Å"
"¡¡Ø¸Àѳ±ì"
--- 73,82 ----
;; which means that you can easily index the list character by
;; character.
! (defvar thai-word-table
! (let ((table (list 'thai-words)))
! (dolist (elt
! ;;; The following is indented as this to minimize this file size.
'("¡¡"
"¡¡Å"
"¡¡Ø¸Àѳ±ì"
***************
*** 10732,10742 ****
"äÎâ¡ÃÁÔàµÍÃì"
"äÎâ´Ã¤ÒÃìºÍ¹"
"äÎâÅ"
! )))
! (setq thai-word-table (list 'thai-words))
! (while l
! (set-nested-alist (car l) 1 thai-word-table)
! (setq l (cdr l))))
(defun thai-update-word-table (file &optional append)
--- 10730,10739 ----
"äÎâ¡ÃÁÔàµÍÃì"
"äÎâ´Ã¤ÒÃìºÍ¹"
"äÎâÅ"
! ))
! (set-nested-alist elt 1 table))
! table)
! "Nested alist of Thai words.")
(defun thai-update-word-table (file &optional append)
***************
*** 11042,11047 ****
--- 11039,11071 ----
(thai-forward-word (- count)))
+ (defun thai-kill-word (arg)
+ "Like kill-word but pay attention to Thai word boundaries.
+ With argument, do this that many times."
+ (interactive "p")
+ (kill-region (point) (progn (thai-forward-word arg) (point))))
+
+
+ (defun thai-backward-kill-word (arg)
+ "Like backward-kill-word but pay attention to Thai word boundaries."
+ (interactive "p")
+ (thai-kill-word (- arg)))
+
+
+ (defun thai-transpose-words (arg)
+ "Like transpose-words but pay attention to Thai word boundaries."
+ (interactive "*p")
+ (transpose-subr 'thai-forward-word arg))
+
+ (defun thai-fill-find-break-point (linebeg)
+ "Go to a line breaking position near point considering Thai word
boundaries."
+ (let ((pos (point)))
+ (thai-forward-word -1)
+ (when (<= (point) linebeg)
+ (goto-char pos)
+ (thai-forward-word 1))
+ (kinsoku linebeg)))
+
(provide 'thai-word)