# HG changeset patch # User stephent # Date 1026207421 0 # Node ID aa5bf79c0076cf407655407e61a93d12339ce5c9 # Parent 6a68d74d1a04be454b65a5040172979765577de6 [xemacs-hg @ 2002-07-09 09:36:53 by stephent] fix kinsoku diff -r 6a68d74d1a04 -r aa5bf79c0076 lisp/ChangeLog --- a/lisp/ChangeLog Tue Jul 09 05:59:55 2002 +0000 +++ b/lisp/ChangeLog Tue Jul 09 09:37:01 2002 +0000 @@ -1,3 +1,15 @@ +2001-07-10 Katsumi Yamaoka + + * mule/kinsoku.el (kinsoku-bol-p): Work with ascii and non-ascii + mixed text. + (kinsoku-eol-p): Ditto. + +2001-07-09 Katsumi Yamaoka + + * mule/kinsoku.el (kinsoku-ascii-eol, kinsoku-gb-bol, + kinsoku-gb-eol, kinsoku-big5-bol, kinsoku-big5-eol): Assign + characters as the category `s' or `e' correctly. + 2002-06-26 John Paul Wallington * derived.el (define-derived-mode): Put `derived-mode-parent' diff -r 6a68d74d1a04 -r aa5bf79c0076 lisp/mule/kinsoku.el --- a/lisp/mule/kinsoku.el Tue Jul 09 05:59:55 2002 +0000 +++ b/lisp/mule/kinsoku.el Tue Jul 09 09:37:01 2002 +0000 @@ -172,7 +172,7 @@ ;; kinsoku ascii (loop for char in (string-to-list kinsoku-ascii-bol) do (modify-category-entry char ?s)) -(loop for char in kinsoku-ascii-eol +(loop for char in (string-to-list kinsoku-ascii-eol) do (modify-category-entry char ?e)) ;; kinsoku-jis (loop for char in (string-to-list kinsoku-jis-bol) @@ -180,14 +180,14 @@ (loop for char in (string-to-list kinsoku-jis-eol) do (modify-category-entry char ?e)) ;; kinsoku-gb -(loop for char in kinsoku-gb-bol +(loop for char in (string-to-list kinsoku-gb-bol) do (modify-category-entry char ?s)) -(loop for char in kinsoku-gb-eol +(loop for char in (string-to-list kinsoku-gb-eol) do (modify-category-entry char ?e)) ;; kinsoku-big5 -(loop for char in kinsoku-big5-bol +(loop for char in (string-to-list kinsoku-big5-bol) do (modify-category-entry char ?s)) -(loop for char in kinsoku-big5-eol +(loop for char in (string-to-list kinsoku-big5-eol) do (modify-category-entry char ?e)) (defun kinsoku-bol-p () @@ -195,14 +195,21 @@ Uses category \'s\' to check. pointで改行すると行頭禁則に触れるかどうかをかえす。 行頭禁則文字は\'s\'のcategoryで指定する。" - (let ((ch (char-after))) - (if (and ch + (let ((before (char-before)) + (after (char-after))) + (if (and after (or - (and kinsoku-ascii (char-in-category-p ch ?a)) - (and kinsoku-jis (char-in-category-p ch ?j)) - (and kinsoku-gb (char-in-category-p ch ?c)) - (and kinsoku-big5 (char-in-category-p ch ?t)))) - (char-in-category-p ch ?s) + (and kinsoku-ascii (char-in-category-p after ?a)) + (and kinsoku-jis (or (char-in-category-p after ?j) + (and before + (char-in-category-p before ?j)))) + (and kinsoku-gb (or (char-in-category-p after ?c) + (and before + (char-in-category-p before ?c)))) + (and kinsoku-big5 (or (char-in-category-p after ?t) + (and before + (char-in-category-p before ?t)))))) + (char-in-category-p after ?s) nil))) (defun kinsoku-eol-p () @@ -210,14 +217,21 @@ Uses category \'e\' to check. pointで改行すると行末禁則に触れるかどうかをかえす。 行末禁則文字は\'s\'のcategoryで指定する。" - (let ((ch (char-before))) - (if (and ch + (let ((before (char-before)) + (after (char-after))) + (if (and before (or - (and kinsoku-ascii (char-in-category-p ch ?a)) - (and kinsoku-jis (char-in-category-p ch ?j)) - (and kinsoku-gb (char-in-category-p ch ?c)) - (and kinsoku-big5 (char-in-category-p ch ?t)))) - (char-in-category-p ch ?e) + (and kinsoku-ascii (char-in-category-p before ?a)) + (and kinsoku-jis (or (char-in-category-p before ?j) + (and after + (char-in-category-p after ?j)))) + (and kinsoku-gb (or (char-in-category-p before ?c) + (and after + (char-in-category-p after ?c)))) + (and kinsoku-big5 (or (char-in-category-p before ?t) + (and after + (char-in-category-p after ?t)))))) + (char-in-category-p before ?e) nil))) (defvar kinsoku-extend-limit nil