Mercurial > emacs
diff lisp/international/kinsoku.el @ 88123:375f2633d815
New directory
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 08 Sep 2003 11:56:09 +0000 |
parents | 695cf19ef79e |
children | 68c22ea6027c |
line wrap: on
line diff
--- a/lisp/international/kinsoku.el Thu Sep 04 04:00:49 2003 +0000 +++ b/lisp/international/kinsoku.el Mon Sep 08 11:56:09 2003 +0000 @@ -121,17 +121,11 @@ ;; Try to resolve `kinsoku' restriction by making the current line longer. (defun kinsoku-longer () - (let ((pos-and-column - (save-excursion - (forward-char 1) - (while (and (not (eobp)) - (or (aref (char-category-set (following-char)) ?>) - ;; protect non-kinsoku words - (not (or (eq (preceding-char) ? ) - (aref (char-category-set (preceding-char)) - ?|))))) - (forward-char 1)) - (cons (point) (current-column))))) + (let ((pos-and-column (save-excursion + (forward-char 1) + (while (aref (char-category-set (following-char)) ?>) + (forward-char 1)) + (cons (point) (current-column))))) (if (or (<= kinsoku-limit 0) (< (cdr pos-and-column) (+ (current-fill-column) kinsoku-limit))) (goto-char (car pos-and-column))))) @@ -141,14 +135,9 @@ (defun kinsoku-shorter (linebeg) (let ((pos (save-excursion (forward-char -1) - (while (and - (< linebeg (point)) - (or (aref (char-category-set (preceding-char)) ?<) - (aref (char-category-set (following-char)) ?>) - ;; protect non-kinsoku words - (not (or (eq (preceding-char) ? ) - (aref (char-category-set (preceding-char)) - ?|))))) + (while (and (< linebeg (point)) + (or (aref (char-category-set (preceding-char)) ?<) + (aref (char-category-set (following-char)) ?>))) (forward-char -1)) (point)))) (if (< linebeg pos) @@ -181,5 +170,4 @@ (aref (char-category-set (preceding-char)) ?<)) (kinsoku-shorter linebeg)))) -;;; arch-tag: e6b036bc-9e5b-4e9f-a22c-4ed04e37777e ;;; kinsoku.el ends here